Maven Sources

We are starting to have more and more of our own reusable components. With this proliferation of Intelliware-created JARs, features like source attachments are becoming more important. I originally had a bit of trouble getting sources to show up for snapshot versions in addition to releases. Having the following in your pom.xml seems to do the trick.

<build>
	<extensions>
		...
	</extensions>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-source-plugin</artifactId>
			<executions>
				<execution>
					<id>attach-sources</id>
					<goals>
						<goal>jar</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
	...
</build>

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply