You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Toni Menzel <to...@gmx.de> on 2007/05/02 11:56:39 UTC

felix.main: pom uses empty (bnd-)substitution: exception

hi,

building the current Main component breaks with this exception:
java.lang.IllegalArgumentException: key can't be empty
        at java.lang.System.checkKey(System.java:742)
        at java.lang.System.getProperty(System.java:625)
        at aQute.lib.osgi.Macro.replace(Macro.java:84)
        at aQute.lib.osgi.Macro.process(Macro.java:38)
        at aQute.lib.osgi.Macro.process(Macro.java:25)
        at aQute.lib.osgi.Builder.copy(Builder.java:313)
        at aQute.lib.osgi.Builder.copy(Builder.java:308)
        at aQute.lib.osgi.Builder.doIncludeResources(Builder.java:233)
        at aQute.lib.osgi.Builder.build(Builder.java:31)
..
It turns out the its because of this line in the pom.xml:
<Include-Resource>{src/main/resources/}</Include-Resource>

The "http://cwiki.apache.org/FELIX/bundle-plugin-for-maven-bnd.html" 
documentation says:
[..] If a resource clause is specified inside of "{ ... }" brackets, 
then variable substitution will be performed on the resource, where 
variables in the resources are denoted with "${ ... }" syntax. [..]

Seems like it could be handled more graceful my bnd (just ommit 
substitution if there is nothing to substitute).
On the other hand the brackets {} should be ommitted anyway. At least 
this works.

btw: is there a public svn repository for bnd to look at previous 
versions? (because the pom from felix hasn't changed in the past but bnd 
did) <-- probably a question for Peter..

regards,
Toni

-- 
Toni Menzel
http://www.tonit.com
mailto:tonimenzel@gmx.de


Re: felix.main: pom uses empty (bnd-)substitution: exception

Posted by Stuart McCulloch <st...@jayway.net>.
Hi Toni,

FELIX-218 just added support for mapping directives prefixed with '_',
which is XML friendly, to the '-' prefix expected by bnd. The change to
the resource bracket processing was a separate bnd update, which got
pulled in when we updated to the latest level.

On 02/05/07, Toni Menzel <to...@gmx.de> wrote:
> i just found that the "problem" was introduced with FELIX-218
> (BundlePlugin).
> Before, this directive seemed not to be recognized at all. (was hard
> coded written to Analyzer without brackets)
>
>
> Toni Menzel schrieb:
> > hi,
> >
> > building the current Main component breaks with this exception:
> > java.lang.IllegalArgumentException: key can't be empty
> >        at java.lang.System.checkKey(System.java:742)
> >        at java.lang.System.getProperty(System.java:625)
> >        at aQute.lib.osgi.Macro.replace(Macro.java:84)
> >        at aQute.lib.osgi.Macro.process(Macro.java:38)
> >        at aQute.lib.osgi.Macro.process(Macro.java:25)
> >        at aQute.lib.osgi.Builder.copy(Builder.java:313)
> >        at aQute.lib.osgi.Builder.copy(Builder.java:308)
> >        at aQute.lib.osgi.Builder.doIncludeResources(Builder.java:233)
> >        at aQute.lib.osgi.Builder.build(Builder.java:31)
> > ..
> > It turns out the its because of this line in the pom.xml:
> > <Include-Resource>{src/main/resources/}</Include-Resource>
> >
> > The "http://cwiki.apache.org/FELIX/bundle-plugin-for-maven-bnd.html"
> > documentation says:
> > [..] If a resource clause is specified inside of "{ ... }" brackets,
> > then variable substitution will be performed on the resource, where
> > variables in the resources are denoted with "${ ... }" syntax. [..]
> >
> > Seems like it could be handled more graceful my bnd (just ommit
> > substitution if there is nothing to substitute).
> > On the other hand the brackets {} should be ommitted anyway. At least
> > this works.
> >
> > btw: is there a public svn repository for bnd to look at previous
> > versions? (because the pom from felix hasn't changed in the past but
> > bnd did) <-- probably a question for Peter..
> >
> > regards,
> > Toni
> >
>
>
> --
> Toni Menzel
> http://www.tonit.com
> mailto:tonimenzel@gmx.de
>
>


-- 
Cheers, Stuart

Re: felix.main: pom uses empty (bnd-)substitution: exception

Posted by Toni Menzel <to...@gmx.de>.
i just found that the "problem" was introduced with FELIX-218 
(BundlePlugin).
Before, this directive seemed not to be recognized at all. (was hard 
coded written to Analyzer without brackets)


Toni Menzel schrieb:
> hi,
>
> building the current Main component breaks with this exception:
> java.lang.IllegalArgumentException: key can't be empty
>        at java.lang.System.checkKey(System.java:742)
>        at java.lang.System.getProperty(System.java:625)
>        at aQute.lib.osgi.Macro.replace(Macro.java:84)
>        at aQute.lib.osgi.Macro.process(Macro.java:38)
>        at aQute.lib.osgi.Macro.process(Macro.java:25)
>        at aQute.lib.osgi.Builder.copy(Builder.java:313)
>        at aQute.lib.osgi.Builder.copy(Builder.java:308)
>        at aQute.lib.osgi.Builder.doIncludeResources(Builder.java:233)
>        at aQute.lib.osgi.Builder.build(Builder.java:31)
> ..
> It turns out the its because of this line in the pom.xml:
> <Include-Resource>{src/main/resources/}</Include-Resource>
>
> The "http://cwiki.apache.org/FELIX/bundle-plugin-for-maven-bnd.html" 
> documentation says:
> [..] If a resource clause is specified inside of "{ ... }" brackets, 
> then variable substitution will be performed on the resource, where 
> variables in the resources are denoted with "${ ... }" syntax. [..]
>
> Seems like it could be handled more graceful my bnd (just ommit 
> substitution if there is nothing to substitute).
> On the other hand the brackets {} should be ommitted anyway. At least 
> this works.
>
> btw: is there a public svn repository for bnd to look at previous 
> versions? (because the pom from felix hasn't changed in the past but 
> bnd did) <-- probably a question for Peter..
>
> regards,
> Toni
>


-- 
Toni Menzel
http://www.tonit.com
mailto:tonimenzel@gmx.de


Re: felix.main: pom uses empty (bnd-)substitution: exception

Posted by Peter Kriens <Pe...@aQute.biz>.
Bnds source code is always included in the jar. Most old versions can
be found on http://www.aqute.biz/repo/biz/aQute/bnd

I'll check for empty macros ... Notice that it is not me exploding but
the System properties. :-) However, I'll make sure it does not happen.

Kind regards,

     Kind regards,

          Peter Kriens


TM> hi,

TM> building the current Main component breaks with this exception:
TM> java.lang.IllegalArgumentException: key can't be empty
TM>         at java.lang.System.checkKey(System.java:742)
TM>         at java.lang.System.getProperty(System.java:625)
TM>         at aQute.lib.osgi.Macro.replace(Macro.java:84)
TM>         at aQute.lib.osgi.Macro.process(Macro.java:38)
TM>         at aQute.lib.osgi.Macro.process(Macro.java:25)
TM>         at aQute.lib.osgi.Builder.copy(Builder.java:313)
TM>         at aQute.lib.osgi.Builder.copy(Builder.java:308)
TM>         at aQute.lib.osgi.Builder.doIncludeResources(Builder.java:233)
TM>         at aQute.lib.osgi.Builder.build(Builder.java:31)
TM> ..
TM> It turns out the its because of this line in the pom.xml:
TM> <Include-Resource>{src/main/resources/}</Include-Resource>

TM> The "http://cwiki.apache.org/FELIX/bundle-plugin-for-maven-bnd.html" 
TM> documentation says:
TM> [..] If a resource clause is specified inside of "{ ... }" brackets, 
TM> then variable substitution will be performed on the resource, where 
TM> variables in the resources are denoted with "${ ... }" syntax. [..]

TM> Seems like it could be handled more graceful my bnd (just ommit 
TM> substitution if there is nothing to substitute).
TM> On the other hand the brackets {} should be ommitted anyway. At least 
TM> this works.

TM> btw: is there a public svn repository for bnd to look at previous 
TM> versions? (because the pom from felix hasn't changed in the past but bnd
TM> did) <-- probably a question for Peter..

TM> regards,
TM> Toni



-- 
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599


Re: Re[2]: felix.main: pom uses empty (bnd-)substitution: exception

Posted by Carlos Sanchez <ca...@apache.org>.
I copied 0.0.133 to the central repo, next time just ping me or better
open a jira in http://jira.codehaus.org/browse/MAVENUPLOAD to sync
aqute repo, as it has to be done by hand

Peter, please use this complete license section in the pom for the
future releases
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>


On 5/2/07, Peter Kriens <Pe...@aqute.biz> wrote:
> I have submitted a new version: 0.0.133
>
> Kind regards,
>
>      Peter Kriens
>
>
> RSH> Toni Menzel wrote:
> >> btw: is there a public svn repository for bnd to look at previous
> >> versions? (because the pom from felix hasn't changed in the past but
> >> bnd did) <-- probably a question for Peter..
>
> RSH> Actually, I was going to ask about this topic too...
>
> RSH> We used to get BND directly from Peter's Maven repo for BND, but that
> RSH> was changed a little while back when the pom's were re-organized to
> RSH> minimize repos to speed up the build process.
>
> RSH> I found this out because when I went to update maven-bundle-plugin's
> RSH> dependency to BND 0.0.131 (we are currently at 0.0.116), maven could not
> RSH> find the latest BND version even though Peter deployed it to his maven repo.
>
> RSH> So, I assume that someone put a copy of BND 0.0.116 in a different repo
> RSH> from which we are retrieving, but now we need to update that version.
> RSH> Who out there can put the latest version of BND into one of the repos we
> RSH> are accessing so I can update the dependency?
>
> RSH> Seems like we will need to update again after Peter investigates this
> RSH> current issue, but still lets move to the current version now if we can...
>
> ->> richard
>
> --
> Peter Kriens                              Tel +33467542167
> 9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
> 34160 Beaulieu, France                    ICQ 255570717
> Skype pkriens                             Fax +1 8153772599
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

Re[2]: felix.main: pom uses empty (bnd-)substitution: exception

Posted by Peter Kriens <Pe...@aQute.biz>.
I have submitted a new version: 0.0.133

Kind regards,

     Peter Kriens


RSH> Toni Menzel wrote:
>> btw: is there a public svn repository for bnd to look at previous 
>> versions? (because the pom from felix hasn't changed in the past but 
>> bnd did) <-- probably a question for Peter..

RSH> Actually, I was going to ask about this topic too...

RSH> We used to get BND directly from Peter's Maven repo for BND, but that 
RSH> was changed a little while back when the pom's were re-organized to 
RSH> minimize repos to speed up the build process.

RSH> I found this out because when I went to update maven-bundle-plugin's 
RSH> dependency to BND 0.0.131 (we are currently at 0.0.116), maven could not
RSH> find the latest BND version even though Peter deployed it to his maven repo.

RSH> So, I assume that someone put a copy of BND 0.0.116 in a different repo
RSH> from which we are retrieving, but now we need to update that version. 
RSH> Who out there can put the latest version of BND into one of the repos we
RSH> are accessing so I can update the dependency?

RSH> Seems like we will need to update again after Peter investigates this 
RSH> current issue, but still lets move to the current version now if we can...

->> richard

-- 
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599


Re: felix.main: pom uses empty (bnd-)substitution: exception

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Toni Menzel wrote:
> btw: is there a public svn repository for bnd to look at previous 
> versions? (because the pom from felix hasn't changed in the past but 
> bnd did) <-- probably a question for Peter..

Actually, I was going to ask about this topic too...

We used to get BND directly from Peter's Maven repo for BND, but that 
was changed a little while back when the pom's were re-organized to 
minimize repos to speed up the build process.

I found this out because when I went to update maven-bundle-plugin's 
dependency to BND 0.0.131 (we are currently at 0.0.116), maven could not 
find the latest BND version even though Peter deployed it to his maven repo.

So, I assume that someone put a copy of BND 0.0.116 in a different repo 
from which we are retrieving, but now we need to update that version. 
Who out there can put the latest version of BND into one of the repos we 
are accessing so I can update the dependency?

Seems like we will need to update again after Peter investigates this 
current issue, but still lets move to the current version now if we can...

-> richard