How to get ALL sources for a JBoss AS 7 release, including external deps?
ringerc May 31, 2012 2:19 AMHi all
I'm debugging an ... interesting ... issue that's taking me deep into JBoss AS 7, mainly into the code for Mojarra, Weld, and Coyote. I'm increasingly finding that I want a way to fetch <i>all</i> the sources for everything in the JBoss AS 7.1.2.Final release, whether they're directly a part of the JBoss AS 7 project or not.
This must be a common need for people working on JBoss AS 7, but I've struggled to find out how to do it. Is it so obvious everyone just knows? Or do I just have to go delving through the SCMs for each of the used packages, checking out the appropriate tags and doing a local maven build to install the source archives? Many of the artifacts used in JBoss AS 7.1.2.Final don't seem to have their sources published in Central (grr!) or in JBoss's nexus, so asking Maven to fetch them with:
git clone git://github.com/jbossas/jboss-as.git cd jboss-as git checkout 7.1.2.Final mvn dependency:sources mvn dependency:resolve -Dclassifier=javadoc
doesn't seem to do much good; it downloads the pom files for most dependencies, but doesn't seem to find sources for much before failing with:
[ERROR] Failed to execute goal on project jboss-as-parent: Could not resolve dependencies for project org.jboss.as:jboss-as-parent:pom:7.1.2.Final: Failure to find org.jboss.as:jboss-as-build-config:jar:7.1.2.Final in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced -> [Help 1]
Update: Using --fail-never convinces the Maven reactor to keep trying to fetch dependencies after the failed module, and helps in that it gets me sources for those dependencies for which the artifact publisher bothered to upload sources. This doesn't help with the of modules for which sources are missing from Central and JBoss Public Nexus, but I suspect I'm going to be stuck with a manual SCM pull for those.
I'm a bit confused here. I'm used to working with Maven on simple projects and on reactor projects with a few modules, but nothing AS7's size and never with the apparently mandatory build wrapper shell script.
There must be a better way than a manual download and build of every dependency, surely?
(See also comment on https://community.jboss.org/wiki/HackingOnAS7#comment-9998 )