-
1. Re: source in localRepository
pgier Oct 16, 2007 12:12 PM (in response to starksm64)The eclipse IDE plugin (http://m2eclipse.codehaus.org/) has an option to automatically download the sources for project dependencies.
Or if you want to do it from the command line, you can use the dependency pluginmvn dependency:sources
-
2. Re: source in localRepository
wolfc Oct 22, 2007 3:29 AM (in response to starksm64)Shouldn't maven do this by default when dependencies are resolved?
Now I end up with:-rw-r--r-- 1 carlo carlo 326543 Oct 12 19:06 jbossxb-2.0.0-SNAPSHOT-sources.jar -rw-r--r-- 1 carlo carlo 439274 Oct 22 09:21 jbossxb-2.0.0-SNAPSHOT.jar
Which are out of sync. -
3. Re: source in localRepository
pgier Oct 22, 2007 9:38 AM (in response to starksm64)The different timestamps are just when they were created locally, so I don't think they are out of sync as far as content. If you want to make the timestamps match, you could first do
mvn dependency:purge-local-repository
That should clear out your project dependencies from the local repo, and then you can download them again with the correct timestamps.
I'm not sure why maven doesn't download sources by default when they are available. Maybe because it would slow down the initial build a little bit if you just want to build and don't care about the sources. -
4. Re: source in localRepository
wolfc Oct 22, 2007 9:59 AM (in response to starksm64)I know they're out of sync, because a new snapshot was uploaded. :-)
The timestamps are just another indicator.
I vote for enabling download of source by default in parent pom. -
5. Re: source in localRepository
starksm64 Feb 28, 2008 2:42 PM (in response to starksm64)Can I enable this by default in my local settings.xml?
-
6. Re: source in localRepository
pgier Feb 28, 2008 4:07 PM (in response to starksm64)There isn't any way to do it from settings.xml. You can use
mvn dependency:sources
Other than that I think you would have to modify the pom to have it done automatically.