繁体   English   中英

无法执行目标 org.apache.maven.plugins:maven-release-plugin:2.5.3

[英]Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3

我正在开发一个 spring-boot 应用程序,它现在有一个 2 模块 pet-clinic-web 和 pet-clinic-data 我没有任何类或查看页面,除了我的 pet-clinic-data 上的一些数据模型类,我我使用 maven 作为我的依赖管理我需要在终端上做mvn release:prepare但我在一个过程中出错

错误

Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project sfg-pet-clinic: You don't have a SNAPSHOT project in the reactor projects list.

项目专家

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>
    <modules>
        <module>pet-clinic-data</module>
        <module>pet-clinic-web</module>
    </modules>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.3.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    <groupId>gure.springframework</groupId>
    <artifactId>sfg-pet-clinic</artifactId>
    <version>0.0.5</version>
    <name>sfg-pet-clinic</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <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>
                <configuration>
                    <goals>install</goals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>

                </configuration>
            </plugin>
        </plugins>
    </build>
<scm>
    <developerConnection>scm:git:https://github.com/springframeworkguru/sfg-pet-clinic.git</developerConnection>
  <tag>sfg-pet-clinic-0.0.5</tag>
  </scm>
</project>

宠物诊所数据

<?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">
    <parent>
        <artifactId>sfg-pet-clinic</artifactId>
        <groupId>gure.springframework</groupId>
        <version>0.0.5</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>pet-clinic-data</artifactId>
    <properties>
        <spring-boot.repackage.skip>true</spring-boot.repackage.skip>
    </properties>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <scope>runtime</scope>
    </dependency>
<!--    <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <scope>runtime</scope>
    </dependency>-->
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
    </dependency>
   <!-- <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jdbc</artifactId>
    </dependency>-->
</dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
  <!--                  <execution>
                        <goals>
                            <goal>
                                repackage
                            </goal>
                        </goals>
                        <configuration>
                            <skip>
                                true
                            </skip>
                        </configuration>
                    </execution>-->
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

宠物诊所网站

<?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>org.example</groupId>
    <artifactId>pet-clinic-web</artifactId>
    <version>0.0.5</version>
    <parent>
        <artifactId>sfg-pet-clinic</artifactId>
        <groupId>gure.springframework</groupId>
        <version>0.0.5</version>
    </parent>
<dependencies>
    <dependency>
        <artifactId>pet-clinic-data</artifactId>
        <groupId>gure.springframework</groupId>
        <version>0.0.5</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>
</project>

我的项目结构

在此处输入图片说明

您尝试发布的项目必须具有 SNAPSHOT 版本。 它应该是这样的:

<version>X.X.X-SNAPSHOT</version>

不确定这是否会有所帮助,因为我没有看到整个错误,但我希望它可以 1/摆脱

<properties>
    <java.version>1.8</java.version>
</properties>

and add this to the root
       

   <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
                <goals>install</goals>
            </configuration>
        </plugin>
 <scm>
    <developerConnection>scm:git:${git_url}</developerConnection>
  <tag>HEAD</tag>
</scm>

2/ do a mvn clean 
3/ do mvn release:prepare
4/ do mvn release: perform

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM