<profiles>java
<!-- 使用One-Jar可運行包的profile -->maven
<profile>ui
<id>package-bin</id>spa
<activation>ci
<property>it
<name>package.bin</name>io
<value>true</value>file
</property>plugin
</activation>co
<build>
<plugins>
<plugin>
<groupId>com.jolira</groupId>
<artifactId>onejar-maven-plugin</artifactId>
<version>1.4.4</version>
<configuration>
<mainClass>cn.com.MyMain</mainClass>
<attachToBuild>true</attachToBuild>
</configuration>
<executions>
<execution>
<goals>
<goal>one-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
java -jar xxxxxx.one-jar.jar