- 打包spring boot
myeclipse 插件打包
org.apache.maven.plugins:maven-jar-plugin:2.4:jar org.springframework.boot:spring-boot-maven-plugin:1.5.4.RELEASE:repackage
需要配置pom.xml 指定spring-boot-maven-plugin插件版本
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.8.RELEASE</version>
<configuration>
<fork>true</fork>
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
<mainClass>com.acrabsoft.web.StartApp</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
mvn clean package spring-boot:repackage
- 安装本地jar
mvn install:install-file -Dfile=F:\ApkUtil.jar -DgroupId=com.acrabsoft -DartifactId=acrabsoft-apkutil -Dversion=1.0 -Dpackaging=jar
- maven 发布本地jar 到 nexus 服务器
mvn deploy:deploy-file -DgroupId=com.acrabsoft -DartifactId=acrabsoft-apkutil -Dversion=1.0 -Dpackaging=jar -Dfile=F:\ApkUtil.jar -Durl=http://192.168.1.4:8081/repository/maven-central/ -DrepositoryId=maven-central
- maven myeciplse使用自己配置的maven环境
run build时需要配置myeciplse installer jres变量
-Dmaven.multiModuleProjectDirectory=$MAVEN_HOME
-Dmaven.multiModuleProjectDirectory=$M2_HOME