14 Replies Latest reply on Jul 29, 2008 3:39 PM by Brian Stansberry

    Sources are not picked up from snapshots

    Carlo de Wolf Master

      The sources from snapshot artifacts are not copied into thirdparty. What gives?

        • 1. Re: Sources are not picked up from snapshots
          Paul Gier Master

          You have to activate the download-sources profile. This can be done in the thirdparty directory

          mvn package -Pdownload-sources
          Or from the build directory
          ./build.sh -Dthirdparty.maven.opts="-Pdownload-sources"


          • 2. Re: Sources are not picked up from snapshots
            Carlo de Wolf Master

            Or

            mvn package -Ddownload.source

            So I keep confusing the options.

            • 3. Re: Sources are not picked up from snapshots
              Brian Stansberry Master

              This does not work for me; I don't end up with any source jars (snapshots or not snapshots).

              Can this please just be set up so we end up with all available source jars in thirdparty simply by running build/build.sh? With so much critical code now pulled out of the AS proper, trying to do AS development is a royal pain. Try to drill down in the code to figure out how something works and you immediately end up with a class without source. At least if the sources are in thirdparty I can add them as needed to the eclipse .classpath files.

              • 4. Re: Sources are not picked up from snapshots
                Scott Stark Master

                Its working for me. Do you have some output for the command your using?

                • 5. Re: Sources are not picked up from snapshots
                  Brian Stansberry Master

                  Here's my last attempt, after blowing away jboss-deployers in my local maven repo to see if that had any effect.

                  [bes@besdev thirdparty]$ mvn package -Pdownload.sources
                  [INFO] Scanning for projects...
                  WAGON_VERSION: 1.0-beta-2
                  [INFO] ------------------------------------------------------------------------
                  [INFO] Building JBoss Application Server Thirdparty Build
                  [INFO] task-segment: [package]
                  [INFO] ------------------------------------------------------------------------
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-vfs/2.0.0.Beta18/jboss-deployers-vfs-2.0.0.Beta18.pom
                  6K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers/2.0.0.Beta18/jboss-deployers-2.0.0.Beta18.pom
                  13K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.Beta18/jboss-deployers-vfs-spi-2.0.0.Beta18.pom
                  2K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-spi/2.0.0.Beta18/jboss-deployers-spi-2.0.0.Beta18.pom
                  915b downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.Beta18/jboss-deployers-structure-spi-2.0.0.Beta18.pom
                  5K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.Beta18/jboss-deployers-client-spi-2.0.0.Beta18.pom
                  1K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.Beta18/jboss-deployers-core-spi-2.0.0.Beta18.pom
                  1K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-core/2.0.0.Beta18/jboss-deployers-core-2.0.0.Beta18.pom
                  3K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-client/2.0.0.Beta18/jboss-deployers-client-2.0.0.Beta18.pom
                  3K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-impl/2.0.0.Beta18/jboss-deployers-impl-2.0.0.Beta18.pom
                  7K downloaded
                  Downloading: http://repository.jboss.com/maven2/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.pom
                  Downloading: http://snapshots.jboss.org/maven2/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.pom
                  Downloading: http://snapshots.jboss.org/maven2/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.pom
                  Downloading: http://repository.jboss.org/maven2/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.pom
                  Downloading: http://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.pom
                  Downloading: http://repository.jboss.com/maven2/com/sun/xml/bind/jaxb-xjc/2.1.6/jaxb-xjc-2.1.6.pom
                  Downloading: http://snapshots.jboss.org/maven2/com/sun/xml/bind/jaxb-xjc/2.1.6/jaxb-xjc-2.1.6.pom
                  Downloading: http://snapshots.jboss.org/maven2/com/sun/xml/bind/jaxb-xjc/2.1.6/jaxb-xjc-2.1.6.pom
                  Downloading: http://repository.jboss.org/maven2/com/sun/xml/bind/jaxb-xjc/2.1.6/jaxb-xjc-2.1.6.pom
                  Downloading: http://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-xjc/2.1.6/jaxb-xjc-2.1.6.pom
                  Downloading: http://repository.jboss.com/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.2/FastInfoset-1.2.2.pom
                  Downloading: http://snapshots.jboss.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.2/FastInfoset-1.2.2.pom
                  Downloading: http://snapshots.jboss.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.2/FastInfoset-1.2.2.pom
                  Downloading: http://repository.jboss.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.2/FastInfoset-1.2.2.pom
                  Downloading: http://repo1.maven.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.2/FastInfoset-1.2.2.pom
                  Downloading: http://repository.jboss.com/maven2/com/sun/xml/ws/jaxws-tools/2.1.3/jaxws-tools-2.1.3.pom
                  Downloading: http://snapshots.jboss.org/maven2/com/sun/xml/ws/jaxws-tools/2.1.3/jaxws-tools-2.1.3.pom
                  Downloading: http://snapshots.jboss.org/maven2/com/sun/xml/ws/jaxws-tools/2.1.3/jaxws-tools-2.1.3.pom
                  Downloading: http://repository.jboss.org/maven2/com/sun/xml/ws/jaxws-tools/2.1.3/jaxws-tools-2.1.3.pom
                  Downloading: http://repo1.maven.org/maven2/com/sun/xml/ws/jaxws-tools/2.1.3/jaxws-tools-2.1.3.pom
                  Downloading: http://repository.jboss.com/maven2/woodstox/wstx-lgpl/3.1.1/wstx-lgpl-3.1.1.pom
                  Downloading: http://snapshots.jboss.org/maven2/woodstox/wstx-lgpl/3.1.1/wstx-lgpl-3.1.1.pom
                  Downloading: http://snapshots.jboss.org/maven2/woodstox/wstx-lgpl/3.1.1/wstx-lgpl-3.1.1.pom
                  Downloading: http://repository.jboss.org/maven2/woodstox/wstx-lgpl/3.1.1/wstx-lgpl-3.1.1.pom
                  Downloading: http://repo1.maven.org/maven2/woodstox/wstx-lgpl/3.1.1/wstx-lgpl-3.1.1.pom
                  Downloading: http://repository.jboss.com/maven2/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.pom
                  Downloading: http://snapshots.jboss.org/maven2/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.pom
                  Downloading: http://snapshots.jboss.org/maven2/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.pom
                  Downloading: http://repository.jboss.org/maven2/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.pom
                  Downloading: http://repo1.maven.org/maven2/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.pom
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-vfs/2.0.0.Beta18/jboss-deployers-vfs-2.0.0.Beta18.jar
                  73K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.Beta18/jboss-deployers-vfs-spi-2.0.0.Beta18.jar
                  58K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-spi/2.0.0.Beta18/jboss-deployers-spi-2.0.0.Beta18.jar
                  26K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.Beta18/jboss-deployers-structure-spi-2.0.0.Beta18.jar
                  37K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.Beta18/jboss-deployers-client-spi-2.0.0.Beta18.jar
                  13K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.Beta18/jboss-deployers-core-spi-2.0.0.Beta18.jar
                  18K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-core/2.0.0.Beta18/jboss-deployers-core-2.0.0.Beta18.jar
                  13K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-client/2.0.0.Beta18/jboss-deployers-client-2.0.0.Beta18.jar
                  4K downloaded
                  Downloading: http://repository.jboss.com/maven2/org/jboss/deployers/jboss-deployers-impl/2.0.0.Beta18/jboss-deployers-impl-2.0.0.Beta18.jar
                  61K downloaded
                  [INFO] [enforcer:enforce {execution: enforce-versions}]
                  [WARNING] Attempting to build MavenProject instance for Artifact (org.jboss.maven.plugins:maven-buildmagic-thirdparty-plugin:2.1-20080714.141923-3) of type: maven-plugin; constructing POM artifact instead.
                  [INFO] [buildmagic-thirdparty:build-thirdparty {execution: build-thirdparty}]
                  [INFO] Copying dependencies to thirdparty directories...
                  [WARNING] Unable to extract resources artifact: jboss.jbossts:resources:jar:4.4.0.CR1:compile
                  [WARNING]
                  java.io.FileNotFoundException: /home/bes/dev/jboss/trunk1/thirdparty/jboss/jbossts/resources (Is a directory)
                   at java.io.FileOutputStream.open(Native Method)
                   at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
                   at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
                   at org.jboss.maven.plugins.thirdparty.util.JarUtil.extractJarFile(JarUtil.java:107)
                   at org.jboss.maven.plugins.thirdparty.BuildThirdpartyMojo.copyDependenciesAndGenrateCompInfo(BuildThirdpartyMojo.java:292)
                   at org.jboss.maven.plugins.thirdparty.BuildThirdpartyMojo.execute(BuildThirdpartyMojo.java:174)
                   at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
                   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
                   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
                   at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
                   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
                   at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
                   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
                  [INFO] Generating component info files...
                  [INFO] Creating libraries.ent...
                  [INFO] [buildmagic-thirdparty:build-thirdparty {execution: build-thirparty-testsuite}]
                  [INFO] Copying dependencies to thirdparty directories...
                  [INFO] Generating component info files...
                  [INFO] Creating testsuite-libraries.ent...
                  [INFO] [site:attach-descriptor]
                  [INFO] Preparing source:jar
                  [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
                  [INFO] [enforcer:enforce {execution: enforce-versions}]
                  [INFO] [source:jar {execution: attach-sources}]
                  [INFO] ------------------------------------------------------------------------
                  [INFO] BUILD SUCCESSFUL
                  [INFO] ------------------------------------------------------------------------
                  [INFO] Total time: 18 seconds
                  [INFO] Finished at: Tue Jul 29 10:51:54 CDT 2008
                  [INFO] Final Memory: 30M/220M
                  [INFO] ------------------------------------------------------------------------
                  


                  Using -Pdownload.source instead of download.sources doesn't doing anything either.

                  • 6. Re: Sources are not picked up from snapshots
                    Scott Stark Master

                    Its -Pdownload-sources not -Pdownload.source(s). I'm going to change the variable to download-sources as well because everyone keeps confusing what the correct profile/variable is.

                    • 7. Re: Sources are not picked up from snapshots
                      Scott Stark Master

                      I changed the variable so either -Pdownload-sources or -Ddownload-sources now works the same way:

                      [529][valkyrie: thirdparty]$ ls jboss/jboss-cl/lib/
                      jboss-classloader.jar jboss-classloading.jar
                      jboss-classloading-vfs.jar
                      [530][valkyrie: thirdparty]$ mvn -Ddownload-sources package
                      ...
                      [531][valkyrie: thirdparty]$ ls jboss/jboss-cl/lib/
                      jboss-classloader-sources.jar jboss-classloading-vfs-sources.jar
                      jboss-classloader.jar jboss-classloading-vfs.jar
                      jboss-classloading-sources.jar jboss-classloading.jar
                      [532][valkyrie: thirdparty]$ !rm
                      rm -rf jboss/jboss-cl/lib/jboss-classload*-sources.jar
                      [533][valkyrie: thirdparty]$ mvn -Pdownload-sources package
                      ...
                      [534][valkyrie: thirdparty]$ ls jboss/jboss-cl/lib/
                      jboss-classloader-sources.jar jboss-classloading-vfs-sources.jar
                      jboss-classloader.jar jboss-classloading-vfs.jar
                      jboss-classloading-sources.jar jboss-classloading.jar
                      



                      • 8. Re: Sources are not picked up from snapshots
                        Brian Stansberry Master

                        Ah, it's '-' not '.'

                        I bought some reading glasses last weekend; seems I need to start using them.

                        Thanks. :-)


                        But... I still say downloading sources should be the default behavior., and we should be adding source="/thirdparty/..." attributes in .classpath files as we go. If poking around in the AS source code had been anywhere near as hard in 2003 as it is now, I never would have started as a community member.

                        • 9. Re: Sources are not picked up from snapshots
                          Scott Stark Master

                          I don't disagree. It looks like the profile would then have to be no-download-sources to and a change of the copySourceJars property to true by default.

                          • 10. Re: Sources are not picked up from snapshots
                            Kamil Demecki Novice

                             

                            "bstansberry@jboss.com" wrote:

                            But... I still say downloading sources should be the default behavior., and we should be adding source="/thirdparty/..." attributes in .classpath files as we go. If poking around in the AS source code had been anywhere near as hard in 2003 as it is now, I never would have started as a community member.


                            • 11. Re: Sources are not picked up from snapshots
                              Kamil Demecki Novice

                               

                              "bstansberry@jboss.com" wrote:

                              But... I still say downloading sources should be the default behavior., and we should be adding source="/thirdparty/..." attributes in .classpath files as we go. If poking around in the AS source code had been anywhere near as hard in 2003 as it is now, I never would have started as a community member.


                              • 12. Re: Sources are not picked up from snapshots
                                Kamil Demecki Novice

                                Sorry, my answer were cut by forum parser. It is without quote:

                                I think the same. Earlier I have worked on simple project with 20 maven 1.x modules. Editing with eclipse was horrible. maven 1.x even doesn't resolve dependent projects and only leave dependencies to maven repository No I'm working on big project with 150 maven 2 modules ! Fortunately maven 2 eclipse plugin better resolve project despondencies but sucks with classpath ordering and editing 150 .classpath is unacceptable without some templating system (not necessary maven ;)).

                                I know that 150 modules cause system much more modular ;) and it is need in some cases but it cant block developing and reffactoring. Correct configured IDE is essential and need well-thought-out build system. Without this, modularizies is over marketed IMHO and very slows developing. My brother works on 3 modules project in Netbeans, not maven, Yes, one centrized IDE but deploying cycle occupy only 5 seconds with all sources available ! Short deploing cycle is critical to developing IMHO.

                                I'm sometimes frustrated with modularization without proper configruation.

                                • 13. Re: Sources are not picked up from snapshots
                                  Scott Stark Master

                                  I changed copySourceJars=true by default so sources are now downloaded by default. To build without source just pass in -DcopySourceJars=false. No new profile is needed.

                                  • 14. Re: Sources are not picked up from snapshots
                                    Brian Stansberry Master

                                    Great. :) I'd opened a JIRA https://jira.jboss.org/jira/browse/JBAS-5813 and have now closed it.

                                    As I use stuff I'll add source attributes to the .classpath files.