ciems 打包源码 包涵java文件的 jar包

一 打   .java  不包含依赖的jar包

1. ciems 的pom   

<plugins>  下添加 (不是 </pluginManagement>  里面)
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <version>3.0.1</version>
    <executions>
        <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
                <goal>jar-no-fork</goal>
            </goals>
        </execution>
    </executions>
</plugin>

2.修改报错Error

<version>1.0.0-Alpha</version>    改为   <version>${revision}</version>

 

3. 修改 <id>nexus</id>

<repository>
             <id>nexus</id>    ---------》》  <id>nexus-releases</id>
             <name>Nexus Snapshot Repository</name>
             <url>http://192.168.2.211:10890/nexus/content/repositories/releases/</url>
</repository>

4.Maven --ciems--Plugins--clean--clean:clean

5.Maven --ciems--Plugins--source--source:jar

二 打   .java   jar包,另外包好依赖dependency 的文件

1.maven  顶部  profiles   打钩 dev,(记得打完包去掉)

2.pom


            <!-- 打包源码插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <attach>true</attach>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- 打包依赖插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

3.注释掉伺服仓库地址

<!--        <repository>-->

4.Lifecycle --clean

5.Lifecycle--install

6.Plugis--dependency--denpendency:copy-dependencies

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值