dev@glassfish.java.net

Re: Build Errors

From: Byron Nevins <byron.nevins_at_sun.com>
Date: Tue, 23 Sep 2008 16:24:57 -0700

In case people are interested in the solution to this obscure build
problem, Harsha figured it out (see below).

Harsha: *THANKS!!!!!*

---------------------------------------------------------------------------------------

Hi Byron,

I was able to understand whats happening in your module.

It needs to declare glassfish-parent as it's parent pom rather than
org.glassfish pom /2 as parent.
The main reason for seeing 1)
*org.glassfish.docs:basedocs:distribution-fragment:0.2-SNAPSHOT is that,

*maven did not understand the package type distribution-fragment which
is our own creation. It comes from v3/build/maven-glassfish-extension
So, your module needs to tell in pom.xml somewhere to use the extension
"maven-glassfish-extension" to understand the packaging type
distribution-fragment. This is already taken care in the v3/parent
pom. If we can make glassfish-parent (v3/pom.xml) as your module's
parent, then it works fine.
Else, we need to add the extension and it's configuration in your top
level pom.xml

I was able to build embedded/packager after changing the parent in
v3/embedded/pom.xml

Please let me know if you still see the problem.

thanks,
Harsha

Byron Nevins wrote:

> Any ideas about these strange "fragment" requirements?
>
> I assumed the problem is that these "fragments" are not getting
> published to a public maven repo, so I ran mvn install locally on one
> of them (osgi -- felix) to force the mysterious "fragments" into my
> local repo.
>
> This had no effect of any kind on the 4 missing artifacts error.
>
> ==============================================================
>
>
> 1) *org.glassfish.docs:basedocs:distribution-fragment:0.2-SNAPSHOT*
>
> Try downloading the file manually from the project website.
>
> Then, install it using the command:
> mvn install:install-file -DgroupId=org.glassfish.docs
> -DartifactId=basedocs \
> -Dversion=0.2-SNAPSHOT -Dpackaging=distribution-fragment
> -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file
> there: mvn deploy:deploy-file -DgroupId=org.glassfish.docs
> -DartifactId=basedocs \
> -Dversion=0.2-SNAPSHOT -Dpackaging=distribution-fragment
> -Dfile=/path/to/file \
> -Durl=[url] -DrepositoryId=[id]
>
> Path to dependency:
> 1)
> org.glassfish.embedded:glassfish-embedded-nucleus:jar:10.0-SNAPSHOT
> 2) org.glassfish.packager:glassfish-nucleus:zip:10.0-SNAPSHOT
> 3) org.glassfish.docs:basedocs:distribution-fragment:0.2-SNAPSHOT
>
> 2) *org.glassfish.api:schemas:distribution-fragment:9.0.1*
>
> Try downloading the file manually from the project website.
>
> Then, install it using the command:
> mvn install:install-file -DgroupId=org.glassfish.api
> -DartifactId=schemas \
> -Dversion=9.0.1 -Dpackaging=distribution-fragment
> -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file
> there: mvn deploy:deploy-file -DgroupId=org.glassfish.api
> -DartifactId=schemas \
> -Dversion=9.0.1 -Dpackaging=distribution-fragment
> -Dfile=/path/to/file \
> -Durl=[url] -DrepositoryId=[id]
>
> Path to dependency:
> 1)
> org.glassfish.embedded:glassfish-embedded-nucleus:jar:10.0-SNAPSHOT
> 2) org.glassfish.packager:glassfish-common:zip:10.0-SNAPSHOT
> 3) org.glassfish.api:schemas:distribution-fragment:9.0.1
>
> 3) *org.glassfish.api:dtds:distribution-fragment:9.0.1*
>
> Try downloading the file manually from the project website.
>
> Then, install it using the command:
> mvn install:install-file -DgroupId=org.glassfish.api
> -DartifactId=dtds \
> -Dversion=9.0.1 -Dpackaging=distribution-fragment
> -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file
> there: mvn deploy:deploy-file -DgroupId=org.glassfish.api
> -DartifactId=dtds \
> -Dversion=9.0.1 -Dpackaging=distribution-fragment
> -Dfile=/path/to/file \
> -Durl=[url] -DrepositoryId=[id]
>
> Path to dependency:
> 1)
> org.glassfish.embedded:glassfish-embedded-nucleus:jar:10.0-SNAPSHOT
> 2) org.glassfish.packager:glassfish-common:zip:10.0-SNAPSHOT
> 3) org.glassfish.api:dtds:distribution-fragment:9.0.1
>
> 4)
> *org.glassfish.osgi-platforms:felix:distribution-fragment:10.0-SNAPSHOT*
>
> Try downloading the file manually from the project website.
>
> Then, install it using the command:
> mvn install:install-file -DgroupId=org.glassfish.osgi-platforms
> -DartifactId=felix \
> -Dversion=10.0-SNAPSHOT -Dpackaging=distribution-fragment
> -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file
> there: mvn deploy:deploy-file
> -DgroupId=org.glassfish.osgi-platforms -DartifactId=felix \
> -Dversion=10.0-SNAPSHOT -Dpackaging=distribution-fragment
> -Dfile=/path/to/file \
> -Durl=[url] -DrepositoryId=[id]
>
> Path to dependency:
> 1)
> org.glassfish.embedded:glassfish-embedded-nucleus:jar:10.0-SNAPSHOT
> 2) org.glassfish.packager:glassfish-api:zip:10.0-SNAPSHOT
> 3) org.glassfish.packager:felix:zip:10.0-SNAPSHOT
> 4)
> org.glassfish.osgi-platforms:felix:distribution-fragment:10.0-SNAPSHOT
>
> ----------
> 4 required artifacts are missing.
>
> for artifact:
> org.glassfish.embedded:glassfish-embedded-nucleus:jar:10.0-SNAPSHOT
>
> from the specified remote repositories:
> central (http://repo1.maven.org/maven2),
> glassfish-repository (http://download.java.net/maven/glassfish)
>

-- 
Byron Nevins Work 408-276-4089, Home 650-359-1290, Cell 650-784-4123 - Sun Microsystems, Inc.