dev@glassfish.java.net

Re: why can't I build GF trunk?

From: Jane Young <jane.young_at_oracle.com>
Date: Mon, 09 May 2011 10:13:33 -0700

This is a bug in maven-antrun-extended-plugin.

There are some new external "tests" and "provided" scope dependencies
added to GF workspace because of the latest Grizzly integration. Maven
should not be be downloading these dependencies while building GF.
However, maven-antrun-extended-plugin is trying to create a full
dependency graph from the top level pom. The output I'm seeing is that
it's trying to download stax-ri-1.0.pom and jboss-servlet-api_3.0 which
are not available on maven.glassfish.org. maven.glassfish.org gets
blacklisted so Maven is trying to download management-api:3.0.0-b012
from the central. As a result, build fails since it couldn't find the
artifact.

The workaround is to add the mirror element in .m2/settings.xml:
<mirrors>
<mirror>
<id>glassfish-nexus</id>
<url>http://maven.glassfish.org/content/groups/glassfish</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>

I will work with Snjezana on fixing this issue.

Jane


On 5/9/11 8:49 AM, Bobby Bissett wrote:
> Off OWAN, no /m2/settings.xml, using Maven 2.2.1, with rev 46738 I get
> this:
>
>
> create.package:
> Overriding previous definition of reference to all-modules
> Downloading:
> http://repo1.maven.org/maven2/org/glassfish/external/management-api/3.0.0-b012/management-api-3.0.0-b012.jar
> [INFO] Unable to find resource
> 'org.glassfish.external:management-api:jar:3.0.0-b012' in repository
> central (http://repo1.maven.org/maven2)
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] An Ant BuildException has occured: The following error occurred
> while executing this line:
> /Users/bobby/work/ws/v3/packager/glassfish-grizzly/build.xml:65: The
> following error occurred while executing this line:
> /Users/bobby/work/ws/v3/packager/common-targets.xml:99: Failed to
> resolve artifact.
> Trail=[org.glassfish.packager:glassfish-grizzly:3.2-SNAPSHOT--(compile)-->org.glassfish.grizzly:grizzly-framework:2.1,
> org.glassfish.grizzly:grizzly-framework:2.1--(compile)-->org.glassfish.gmbal:gmbal-api-only:3.0.0-b023,
> org.glassfish.gmbal:gmbal-api-only:3.0.0-b023--(compile)-->org.glassfish.external:management-api:3.0.0-b012]
>
>
> Unable to download the artifact from any repository
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 8 minutes 23 seconds
> [INFO] Finished at: Mon May 09 10:12:41 EDT 2011
> [INFO] Final Memory: 206M/397M
> [INFO]
> ------------------------------------------------------------------------
>
>
> I get the same thing on OWAN with the same proxy I always use in
> settings.xml, and I've also tried removing org/glassfish from my local
> repo.
>
>