hello!python!

maven工程编译成jar包

在pom文件的project节点下增加build节点,mvn package即可

 <build>
        <plugins>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <!-- 此处指定main方法入口的class -->
                            <mainClass>com.fdfs.TestFastDfs</mainClass>
                        </manifest>
                    </archive>
                    </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>assembly</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

 

posted @ 2017-10-01 10:36  你坚持了吗  阅读(751)  评论(0编辑  收藏  举报
hello!python!