求助 MAVEN BUILD SUCCESS 但是target 中没有jar 包

xia2017 发布于 2021/11/20 16:19
阅读 351
收藏 0

开源之夏第三届火热来袭,高校学生参与赢万元奖金!>>>

mvn install 结果如下:

[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< org.stiehl:EManPro >-------------------------
[INFO] Building EManPro 1.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.5.RELEASE:repackage (repackage) @ EManPro ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ EManPro ---
[INFO] Installing E:\EManPro\pom.xml to F:\java\maven\org\stiehl\EManPro\1.0-SNAPSHOT\EManPro-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.112 s
[INFO] Finished at: 2021-11-20T16:09:08+08:00
[INFO] ------------------------------------------------------------------------

mvn package 命令结果如下:

[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< org.stiehl:EManPro >-------------------------
[INFO] Building EManPro 1.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.5.RELEASE:repackage (repackage) @ EManPro ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.866 s
[INFO] Finished at: 2021-11-20T16:13:17+08:00
[INFO] ------------------------------------------------------------------------

pom build 配置

 <build>
        <defaultGoal>compile</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
        <!--这个元素描述了项目相关的所有资源路径列表,例如和项目相关的属性文件,这些资源被包含在最终的打包文件里。-->
        <resources>
            <resource>
                <!--   描述存放资源的目录,该路径相对POM路径-->
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <!--   描述存放资源的目录,该路径相对POM路径-->
            <!--   <resource>

                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
            </resource> -->
        </resources>
    </build>

现在有点头大,target下面没有jar文件,以前都是正常的,奇怪了,请各位大神帮忙看看啥情况谢谢!

加载中
0
ycwangrd
ycwangrd

看下项目配置,maven的packing是配置的pom吧

0
x
xia2017

确实这个之前加过模块后来移除了,自动变成pom了,  把pom改成jar OK,解决了!谢谢!

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部
返回顶部
顶部