You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Greg Amerson <gr...@liferay.com> on 2013/09/24 17:16:40 UTC

IvyDE ivy-settings.xml and element

Hello IvyDE developers,

I've got a Eclipse java project where I have a ivy.xml and ivy-settings.xml
added and I'm configuring a Ivy container that I'm pointing to the
ivy-settings.xml file.  The problem is that inside the ivy-settings.xml
there is an element like this:

    <signers>
        <pgp keyId="${pgp.keyname}" name="${pgp.generator}"
password="${pgp.passphrase}" />
    </signers>

When the IvyDE plugin loads the embedded Ivy runtime from the OSGi bundle
and have it parse the ivy-settings.xml file it will throw NoClassDefFound
when it hits the <pgp> element.  See attached log file for error.

I've debugged this and its because ivy-settings.xml parser is trying to
create an instance of this class:
org.apache.ivy.plugins.signer.bouncycastle.OpenPGPSignatureGenerator

This class requires several classes in the org.bouncycastle.* package,
however, the OSGi classloader from Eclipse that is creating the new
instance of OpenPGPSignatureGenerator can't find the needed classes from
org.bouncycastle on the bundle classpath.

After trying several alternatives, it seems that the only way to get this
to work is to modify the org.apache.ivy_xxx.jar OSGi bundle itself and add
the necessary "Import-Package: org.bouncycastle.*" packages and also make
them available to Eclipse OSGi runtime.

Any thoughts?

-- 
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

Re: IvyDE ivy-settings.xml and element

Posted by Greg Amerson <gr...@liferay.com>.
Thanks Nicolas for looking into it.  In order for you to test this you will
have to make sure that the bcpgp and bcprov jars are available to
Eclipse(IvyDE) as OSGi bundles.  Since I was unable to find these jars
anywhere in existing p2 repository I did this by simply downloading them
from a maven repo and then importing them into my Eclipse dev environment
as 'binary' plugins.


On Fri, Sep 27, 2013 at 4:57 PM, Nicolas Lalevée <nicolas.lalevee@hibnet.org
> wrote:

>
> Le 27 sept. 2013 à 05:20, Greg Amerson <gr...@liferay.com> a
> écrit :
>
> > Thanks Stephen for responding.  I've opened a ticket about that on IvyDE
> > side: https://issues.apache.org/jira/browse/IVYDE-347
> >
> > However, part of the fix needs to go to Ivy jar itself, maybe I need to
> > open a new ticket on just Ivy project.  Here is my suggested change:
> >
> > https://github.com/gamerson/ivy/compare/apache:trunk...IVYDE-347
> >
> > In my Eclipse environment, if I patch the Ivy osgi jar with these 3
> > optional dependencies and also install 2 other OSGi bundles, namely bcpgp
> > and bcprov, then these imports will be resolved in the Ivy jar and it can
> > load/parse ivy-setttings.xml files that contain <pgp> element.
> >
> > Should I enter another ticket for just Ivy project?
>
> Yes it is more an Ivy issue than an IvyDE. I have moved the issue. I'll
> just need to quickly look into the code just to confirm that you are right
> (and I bet you are) and I'll fix it very soon.
>
> Nicolas
>
> >
> >
> > On Fri, Sep 27, 2013 at 10:14 AM, Stephen Haberman <
> > stephen.haberman@gmail.com> wrote:
> >
> >>
> >>> Any thoughts?
> >>
> >> I'm not an Eclipse/OSGi expert, but since no one else has replied, I
> >> think that makes sense to me.
> >>
> >> - Stephen
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: dev-help@ant.apache.org
> >>
> >>
> >
> >
> > --
> > Greg Amerson
> > Liferay Developer Tools
> > Liferay, Inc. www.liferay.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

Re: IvyDE ivy-settings.xml and element

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 27 sept. 2013 à 05:20, Greg Amerson <gr...@liferay.com> a écrit :

> Thanks Stephen for responding.  I've opened a ticket about that on IvyDE
> side: https://issues.apache.org/jira/browse/IVYDE-347
> 
> However, part of the fix needs to go to Ivy jar itself, maybe I need to
> open a new ticket on just Ivy project.  Here is my suggested change:
> 
> https://github.com/gamerson/ivy/compare/apache:trunk...IVYDE-347
> 
> In my Eclipse environment, if I patch the Ivy osgi jar with these 3
> optional dependencies and also install 2 other OSGi bundles, namely bcpgp
> and bcprov, then these imports will be resolved in the Ivy jar and it can
> load/parse ivy-setttings.xml files that contain <pgp> element.
> 
> Should I enter another ticket for just Ivy project?

Yes it is more an Ivy issue than an IvyDE. I have moved the issue. I'll just need to quickly look into the code just to confirm that you are right (and I bet you are) and I'll fix it very soon.

Nicolas

> 
> 
> On Fri, Sep 27, 2013 at 10:14 AM, Stephen Haberman <
> stephen.haberman@gmail.com> wrote:
> 
>> 
>>> Any thoughts?
>> 
>> I'm not an Eclipse/OSGi expert, but since no one else has replied, I
>> think that makes sense to me.
>> 
>> - Stephen
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>> For additional commands, e-mail: dev-help@ant.apache.org
>> 
>> 
> 
> 
> -- 
> Greg Amerson
> Liferay Developer Tools
> Liferay, Inc. www.liferay.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: IvyDE ivy-settings.xml and element

Posted by Greg Amerson <gr...@liferay.com>.
Thanks Stephen for responding.  I've opened a ticket about that on IvyDE
side: https://issues.apache.org/jira/browse/IVYDE-347

However, part of the fix needs to go to Ivy jar itself, maybe I need to
open a new ticket on just Ivy project.  Here is my suggested change:

https://github.com/gamerson/ivy/compare/apache:trunk...IVYDE-347

In my Eclipse environment, if I patch the Ivy osgi jar with these 3
optional dependencies and also install 2 other OSGi bundles, namely bcpgp
and bcprov, then these imports will be resolved in the Ivy jar and it can
load/parse ivy-setttings.xml files that contain <pgp> element.

Should I enter another ticket for just Ivy project?


On Fri, Sep 27, 2013 at 10:14 AM, Stephen Haberman <
stephen.haberman@gmail.com> wrote:

>
> > Any thoughts?
>
> I'm not an Eclipse/OSGi expert, but since no one else has replied, I
> think that makes sense to me.
>
> - Stephen
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

Re: IvyDE ivy-settings.xml and element

Posted by Stephen Haberman <st...@gmail.com>.
> Any thoughts?

I'm not an Eclipse/OSGi expert, but since no one else has replied, I
think that makes sense to me.

- Stephen



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org