问题
In my parent pom I got this configuration to deploy sources jars:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
But the tycho build modules ignore that, so their sources aren't installed/deployed in the maven repository. Which means I can't include them in an assembly (especially if the assembly module is located in another git repository).
Is it possible to configure one of the tycho plugins to build and deploy sources jars?
回答1:
Use this:
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
See https://github.com/jsievers/tycho-demo/blob/master/tychodemo.parent/pom.xml
来源:https://stackoverflow.com/questions/5702701/tycho-how-do-i-deploy-sources-jars-of-packaging-eclipse-plugin