maven部署命令

参考文档:http://blog.csdn.net/woshixuye/article/details/8133050

http://www.blogjava.net/itvincent/archive/2011/07/13/354243.html

 

maven部署源代码的插件配置(在pom.xml文件中)

<build>
<plugins>
<!-- Source attach plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<!-- 在compile阶段中执行 -->
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

 

maven部署源代码和javadoc文件(在pom.xml文件中)

<build>
<plugins>
<!-- Source attach plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<!-- 在compile阶段中执行 -->
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>package</phase>
<!-- 在compile阶段中执行 -->
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

posted @ 2014-10-23 15:47  唾手可得的树  阅读(459)  评论(0编辑  收藏  举报