1. 程式人生 > >maven 打包jar && lib

maven 打包jar && lib

方法 mpi main exec depend efs tid version cut

1.打包成jar直接運行:

<build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
<target>1.7</target> </configuration> </plugin> <!-- 制定啟動的方法 --> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration
> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <
mainClass>com.github.wycm.hpp.proxy.Main</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> <!-- 跳過單元測試 --> <plugin> <groupId>org.apache.maven.plugin</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.1</version> <configuration> <skip>true</skip> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.5</version> <configuration> <skip>true</skip> </configuration> </plugin> </plugins> </build>

maven 打包jar && lib