dev@glassfish.java.net

Re: nucleus.zip inclorrect dependency

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Thu, 04 Sep 2008 10:24:10 -0700

Jerome Dochez wrote:
> Hi Vivek
>
> Your fix is incorrect unfortunately.
I dont think so. See below...
> base documentation and felix are indeed a distribution fragment, so I
> am not sure what the problem is with your environment.
Yes they are distribution fragments but of type 'zip'.

Maven treats distribution-fragment differently (by default) when trying
to resolve the dependency. For example, it looks for
felix.distribution-fragment and the fact is that the repository has
felix.zip posted.

See
http://download.java.net/maven/glassfish/org/glassfish/osgi-platforms/felix/10.0-SNAPSHOT/.

So either you release felix and basedocs as .distribution-fragment or
have nucleus.zip pom file explicitly say the type of felix and basedocs
is 'zip'.

> Can you share the original trace of the problem you had.
>
I have a pom file that has dependency on nucleus.zip:

    <dependency>
      <groupId>org.glassfish.distributions</groupId>
      <artifactId>nucleus</artifactId>
      <version>10.0-SNAPSHOT</version>
      <type>zip</type>
    </dependency>

maven reports:

Missing:
----------
1) 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-api:jar:10.0-SNAPSHOT
      2) org.glassfish.distributions:nucleus:zip:10.0-SNAPSHOT
      3)
org.glassfish.osgi-platforms:felix:distribution-fragment:10.0-SNAPSHOT

2) 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-api:jar:10.0-SNAPSHOT
      2) org.glassfish.distributions:nucleus:zip:10.0-SNAPSHOT
      3) org.glassfish.docs:basedocs:distribution-fragment:0.2-SNAPSHOT

----------
2 required artifacts are missing.

-vivek.
> thanks, jerome
>
> Vivek Pandey wrote:
>> nucleus.zip target has incorrect dependency. So if my pom.xml
>> dependency on nucleus.zip then nucleus.zip tries to resolve basedocs
>> and felix depdency as distribution-fragmet, which are never posted
>> nor they are needed.
>>
>> This patch fixes it, whoever looks at it please review and fix this
>> issue:
>>
>>
>> -vivek.
>>
>> Index: pom.xml
>> ===================================================================
>> --- pom.xml (revision 22322)
>> +++ pom.xml (working copy)
>> @@ -76,7 +76,7 @@
>> <groupId>org.glassfish.osgi-platforms</groupId>
>> <artifactId>felix</artifactId>
>> <version>${glassfish.version}</version>
>> - <type>distribution-fragment</type>
>> + <type>zip</type>
>> </dependency>
>> <dependency>
>> <groupId>org.glassfish.core</groupId>
>> @@ -125,7 +125,7 @@
>> <groupId>org.glassfish.docs</groupId>
>> <artifactId>basedocs</artifactId>
>> <version>0.2-SNAPSHOT</version>
>> - <type>distribution-fragment</type>
>> + <type>zip</type>
>> </dependency>
>> <dependency>
>> <groupId>org.glassfish.deployment</groupId>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>