我想在Install,deploy的时候,打包源码
于是,加入了如下配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
然后,执行mvn clean install
发现本地仓库并没有源码
把上面的<phase>install</phase> 改成 <phase>compile</phase>倒是可以。但是,package的时候,也打了源码包了。很不爽
请问,如何解决这个问题
------解决思路----------------------
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
然后,mvn install 就可以生成源代码,package不会生成源代码