You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jörg Schaible <Jo...@Elsag-Solutions.com> on 2006/09/08 08:50:22 UTC

RE: [m2] How to get source JARs when sharing eclipse config -- best practices?

"Amshoff Christoph, Köln" wrote on Thursday, September 07, 2006 6:30 PM:

> Hi,
> 
> we are using the eclipse plugin to create the Eclipse
> configuration, and
> specify the -DdownloadSources=true switch to download the
> source JARs and
> include them into the .classpath file. This is pretty cool, but....
> 
> As usual, the .project and .classpath files are checked into
> CVS to share
> them with the team. Now what about the source JARs, how do
> the rest of the
> team get them from our internal maven-repo into their private one? The
> classes JARs are downloaded when calling mvn compile, for
> example, as they
> are defined in the POM's dependency section. But the source
> JARs aren't (and
> shouldn't), so how to download them? Does everybody have to call mvn
> eclipse:eclipse -DdownloadSources=true for that? Is there a
> better / simpler
> way?
> 
> Any suggestions are welcome...

- Don't check in the Eclipse files, anyone can generate them on the fly
- Use a global master POM, where you have configured the Eclipse plugin to download the source:

		<pluginManagement>
			<plugins>
				<!-- Make sources available and support WTP -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-eclipse-plugin</artifactId>
					<configuration>
						<downloadSources>true</downloadSources>
						<wtpVersion>1.0</wtpVersion>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org