You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Musachy Barroso <mu...@gmail.com> on 2008/05/07 21:59:42 UTC

'SNAPSHOT' in the package version

I am using maven-bundle-plugin to generate bundle manifests. When one
of the dependencies is an snapshot, the generated import-package is
like:

Import-Package: org.apache.struts2.dispatcher; version="2.1.3.SNAPSHOT"

And it fails to resolve the package at runtime. I tried exporting the
package with versions "2.1.3.SNAPSHOT" and "2.1", but none of them
seem to work. Any tips on how to get this going?

musachy

-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: 'SNAPSHOT' in the package version

Posted by Musachy Barroso <mu...@gmail.com>.
Using "provided" scope on _both_ dependencies B->A, C->B does remove
"SNAPSHOT" from Import-Package.

musachy

On Thu, May 8, 2008 at 9:20 AM, Musachy Barroso <mu...@gmail.com> wrote:
> Using the "provided" scope trick didn't work. Not sure if it is
> because is not a direct dependency. I have 2 jars and a bundle:
>
> jar A:
> version: 2.1.3-SNAPSHOT
>
> jar B:
> version 1.0-SNAPSHOT
> Depends on jar A
>
> bundle C:
> Depends on B
> Generated Import-Package from jar A includes "SNAPSHOT" in the version
>
> I added a dependency from C to A with a "provided" scope just to test
> the trick, but "SNAPSHOT" is still there.
>
> regards
> musachy
>
>
> On Wed, May 7, 2008 at 8:35 PM, Stuart McCulloch
> <st...@jayway.net> wrote:
>> 2008/5/8 Musachy Barroso <mu...@gmail.com>:
>>
>>> Reading BND docs, it seems like "SNAPSHOT" shouldn't be in the import at
>>> all:
>>>
>>> "If no version or version range is specified on the import
>>> instruction, the exported version will then be used though the micro
>>> part and the qualifier are dropped. That is, when the exporter is
>>> 1.2.3.build123, then the import version will be 1.2.3."
>>>
>>
>> could you provide a simple testcase (inc. pom.xml) and attach it to a JIRA
>> issue?
>>
>>   https://issues.apache.org/jira/browse/FELIX/component/12311143
>>
>> you might also want to read the following issue about scopes and the
>> bundleplugin:
>>
>>   https://issues.apache.org/jira/browse/FELIX-548
>>
>> a lot of projects will set bundle dependencies to <scope>provided</scope>
>> which
>> means imports are by default unversioned, and you can version them as
>> required.
>>
>> musachy
>>>
>>> On Wed, May 7, 2008 at 3:59 PM, Musachy Barroso <mu...@gmail.com> wrote:
>>> > I am using maven-bundle-plugin to generate bundle manifests. When one
>>> >  of the dependencies is an snapshot, the generated import-package is
>>> >  like:
>>> >
>>> >  Import-Package: org.apache.struts2.dispatcher; version="2.1.3.SNAPSHOT"
>>> >
>>> >  And it fails to resolve the package at runtime. I tried exporting the
>>> >  package with versions "2.1.3.SNAPSHOT" and "2.1", but none of them
>>> >  seem to work. Any tips on how to get this going?
>>> >
>>> >  musachy
>>> >
>>> >  --
>>> >  "Hey you! Would you help me to carry the stone?" Pink Floyd
>>> >
>>>
>>>
>>>
>>> --
>>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>
>>
>> --
>> Cheers, Stuart
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: 'SNAPSHOT' in the package version

Posted by Musachy Barroso <mu...@gmail.com>.
Using the "provided" scope trick didn't work. Not sure if it is
because is not a direct dependency. I have 2 jars and a bundle:

jar A:
version: 2.1.3-SNAPSHOT

jar B:
version 1.0-SNAPSHOT
Depends on jar A

bundle C:
Depends on B
Generated Import-Package from jar A includes "SNAPSHOT" in the version

I added a dependency from C to A with a "provided" scope just to test
the trick, but "SNAPSHOT" is still there.

regards
musachy


On Wed, May 7, 2008 at 8:35 PM, Stuart McCulloch
<st...@jayway.net> wrote:
> 2008/5/8 Musachy Barroso <mu...@gmail.com>:
>
>> Reading BND docs, it seems like "SNAPSHOT" shouldn't be in the import at
>> all:
>>
>> "If no version or version range is specified on the import
>> instruction, the exported version will then be used though the micro
>> part and the qualifier are dropped. That is, when the exporter is
>> 1.2.3.build123, then the import version will be 1.2.3."
>>
>
> could you provide a simple testcase (inc. pom.xml) and attach it to a JIRA
> issue?
>
>   https://issues.apache.org/jira/browse/FELIX/component/12311143
>
> you might also want to read the following issue about scopes and the
> bundleplugin:
>
>   https://issues.apache.org/jira/browse/FELIX-548
>
> a lot of projects will set bundle dependencies to <scope>provided</scope>
> which
> means imports are by default unversioned, and you can version them as
> required.
>
> musachy
>>
>> On Wed, May 7, 2008 at 3:59 PM, Musachy Barroso <mu...@gmail.com> wrote:
>> > I am using maven-bundle-plugin to generate bundle manifests. When one
>> >  of the dependencies is an snapshot, the generated import-package is
>> >  like:
>> >
>> >  Import-Package: org.apache.struts2.dispatcher; version="2.1.3.SNAPSHOT"
>> >
>> >  And it fails to resolve the package at runtime. I tried exporting the
>> >  package with versions "2.1.3.SNAPSHOT" and "2.1", but none of them
>> >  seem to work. Any tips on how to get this going?
>> >
>> >  musachy
>> >
>> >  --
>> >  "Hey you! Would you help me to carry the stone?" Pink Floyd
>> >
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
> --
> Cheers, Stuart
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: 'SNAPSHOT' in the package version

Posted by Stuart McCulloch <st...@jayway.net>.
2008/5/8 Musachy Barroso <mu...@gmail.com>:

> Reading BND docs, it seems like "SNAPSHOT" shouldn't be in the import at
> all:
>
> "If no version or version range is specified on the import
> instruction, the exported version will then be used though the micro
> part and the qualifier are dropped. That is, when the exporter is
> 1.2.3.build123, then the import version will be 1.2.3."
>

could you provide a simple testcase (inc. pom.xml) and attach it to a JIRA
issue?

   https://issues.apache.org/jira/browse/FELIX/component/12311143

you might also want to read the following issue about scopes and the
bundleplugin:

   https://issues.apache.org/jira/browse/FELIX-548

a lot of projects will set bundle dependencies to <scope>provided</scope>
which
means imports are by default unversioned, and you can version them as
required.

musachy
>
> On Wed, May 7, 2008 at 3:59 PM, Musachy Barroso <mu...@gmail.com> wrote:
> > I am using maven-bundle-plugin to generate bundle manifests. When one
> >  of the dependencies is an snapshot, the generated import-package is
> >  like:
> >
> >  Import-Package: org.apache.struts2.dispatcher; version="2.1.3.SNAPSHOT"
> >
> >  And it fails to resolve the package at runtime. I tried exporting the
> >  package with versions "2.1.3.SNAPSHOT" and "2.1", but none of them
> >  seem to work. Any tips on how to get this going?
> >
> >  musachy
> >
> >  --
> >  "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart

Re: 'SNAPSHOT' in the package version

Posted by Musachy Barroso <mu...@gmail.com>.
Reading BND docs, it seems like "SNAPSHOT" shouldn't be in the import at all:

"If no version or version range is specified on the import
instruction, the exported version will then be used though the micro
part and the qualifier are dropped. That is, when the exporter is
1.2.3.build123, then the import version will be 1.2.3."

musachy

On Wed, May 7, 2008 at 3:59 PM, Musachy Barroso <mu...@gmail.com> wrote:
> I am using maven-bundle-plugin to generate bundle manifests. When one
>  of the dependencies is an snapshot, the generated import-package is
>  like:
>
>  Import-Package: org.apache.struts2.dispatcher; version="2.1.3.SNAPSHOT"
>
>  And it fails to resolve the package at runtime. I tried exporting the
>  package with versions "2.1.3.SNAPSHOT" and "2.1", but none of them
>  seem to work. Any tips on how to get this going?
>
>  musachy
>
>  --
>  "Hey you! Would you help me to carry the stone?" Pink Floyd
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org