美文网首页
maven生成jar包

maven生成jar包

作者: sunpy | 来源:发表于2019-02-14 10:37 被阅读8次

    配置pom文件

    <build>
            <plugins>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>unpack</id>
                            <phase>package</phase>
                            <goals>
                                <goal>unpack</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>com.alibaba</groupId>
                                        <artifactId>dubbo</artifactId>
                                        <outputDirectory>${project.build.directory}/dubbo</outputDirectory>
                                        <includes>META-INF/assembly/**</includes>
                                    </artifactItem>
                                </artifactItems>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <configuration>
                        <descriptor>src/main/assembly/assembly.xml</descriptor>
                    </configuration>
                    <executions>
                        <execution>
                            <id>make-assembly</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    

    生成eclipse项目文件

    SET MAVEN_OPTS= -Xms512M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=128M -XX:ReservedCodeCacheSize=64M
    mvn eclipse:clean eclipse:eclipse -Dwtpversion=2.0
    

    发布项目到本地仓库

    SET MAVEN_OPTS= -Xms512M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=128M -XX:ReservedCodeCacheSize=64M
    mvn clean install -Dmaven.test.skip=true
    

    相关文章

      网友评论

          本文标题:maven生成jar包

          本文链接:https://www.haomeiwen.com/subject/hdbseqtx.html