сбой плагина maven - PullRequest
       14

сбой плагина maven

0 голосов
/ 18 сентября 2018

Когда я пытаюсь сделать:

> maven release:prepare

Я получаю ошибку:

release:prepare error

Я пытался изменить mvn.cmd на mvn.bat, но это не помогло:

" Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project sfg-pet-clinic: Failed to invoke Maven build. Error configuring command-line. Reason: Maven executable not found at: C:\Program Files\JetBrains\IntelliJ IDEA 2018.1.1\plugins\maven\lib\maven3\bin\mvn.bat"

Ниже приведен след моей сборки maven

> "C:\Program Files\Java\jdk1.8.0_181\bin\java.exe"
> -Dmaven.multiModuleProjectDirectory=C:\Users\Charles\Desktop\kurs\sfg-pet-clinic
> "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA
> 2018.1.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA
> 2018.1.1\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA
> 2018.1.1\lib\idea_rt.jar=64828:C:\Program Files\JetBrains\IntelliJ IDEA 2018.1.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program
> Files\JetBrains\IntelliJ IDEA
> 2018.1.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.1.1
> org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare -f pom.xml
> 
> [INFO] Scanning for projects...
> 
> [INFO]
> ------------------------------------------------------------------------
> 
> [INFO] Reactor Build Order:
> 
> [INFO]
> 
> [INFO] sfg-pet-clinic
> 
> [INFO] pet-clinic-data
> 
> [INFO] pet-clinic-web
> 
> [INFO]                                                                
> 
> 
> [INFO]
> ------------------------------------------------------------------------
> 
> [INFO] Building sfg-pet-clinic 0.0.1
> 
> [INFO]
> ------------------------------------------------------------------------
> 
> [INFO]
> 
> [INFO] --- maven-release-plugin:2.3.2:prepare (default-cli) @
> sfg-pet-clinic ---
> 
> [INFO] Resuming release from phase 'run-preparation-goals'
> 
> [INFO] Executing goals 'clean verify'...
> 
> [INFO]
> ------------------------------------------------------------------------
> 
> [INFO] Reactor Summary:
> 
> [INFO]
> 
> [INFO] sfg-pet-clinic ..................................... FAILURE [ 
> 2.356 s]
> 
> [INFO] pet-clinic-data .................................... SKIPPED
> 
> [INFO] pet-clinic-web ..................................... SKIPPED
> 
> [INFO]
> ------------------------------------------------------------------------
> 
> [INFO] BUILD FAILURE
> 
> [INFO]
> ------------------------------------------------------------------------
> 
> [INFO] Total time: 3.110 s
> 
> [INFO] Finished at: 2018-09-18T13:51:01+02:00
> 
> [INFO] Final Memory: 17M/228M
> 
> [INFO]
> ------------------------------------------------------------------------
> 
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare
> (default-cli) on project sfg-pet-clinic: Failed to invoke Maven build.
> Error configuring command-line. Reason: Maven executable not found at:
> C:\Program Files\JetBrains\IntelliJ IDEA
> 2018.1.1\plugins\maven\lib\maven3\bin\mvn.bat -> [Help 1]
> 
> [ERROR]
> 
> [ERROR] To see the full stack trace of the errors, re-run Maven with
> the -e switch.
> 
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> 
> [ERROR]
> 
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> 
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> 
> 
> 
> Process finished with exit code 1

POM

    <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>guru.springframework</groupId>
    <artifactId>sfg-pet-clinic</artifactId>
    <version>0.0.1</version>
    <modules>
        <module>pet-clinic-data</module>
        <module>pet-clinic-web</module>
    </modules>
    <packaging>pom</packaging>

    <name>sfg-pet-clinic</name>
    <description>SFG Pet Clinic Project</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.5.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
                <configuration>
                    <goals>install</goals>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

после того, как maven можно найти в командной строке IЯ пытался выполнить с терминала, и все еще у меня сбой

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project sfg-pet-clinic: U
nable to tag SCM
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] Host key verification failed.
[ERROR] fatal: Could not read from remote repository.
[ERROR]
[ERROR] Please make sure you have the correct access rights
[ERROR] and the repository exists.
[ERROR]
[ERROR] -> [Help 1]
[ERROR]

    enter code here
...