[ 
https://issues.apache.org/jira/browse/IVY-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15741224#comment-15741224
 ] 

Reşat SABIQ commented on IVY-1553:
----------------------------------

There is another work-around to this issue, & updated the issue title to 
reflect this. In short, as of now, PGP signing during publication throws CNFE 
in normal workflow. Workarounds are:
1. Place bouncy castle dependency in an ant-wide lib folder, like .ant/lib.
2. Retrieve dependencies, & then fork a new java process with classpath 
explicitly configured to contain bouncy castle modules running an "internal"ish 
ant task in the new process.

P.S. The workarounds are enough to get the job done, but have drawbacks like:
1.1.1: requiring extra steps before building
OR
1.1.2: automatically putting the jars there, and asking the build to be re-run.
1.1.2.1: extra time & code required to automatically place the modules, and ask 
the build to be re-run.
1.2: potentially contaminating or corrupting ant-wide lib folder(s).
2.1: extra steps are required to pass on environment variables to make sure the 
forked process has everything needed to work right.
2.2: the internal task could still be accidentally used instead of the wrapping 
task, causing confusion.
2.3: extra time & code required to write the wrapping task forking a new 
process.

> PGP signing during publication shouldn't require bouncy castle dependencies 
> to be in .ant/lib or forking another java process with classpath explicitly 
> configured to contain bouncy castle modules
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-1553
>                 URL: https://issues.apache.org/jira/browse/IVY-1553
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.4.0
>            Reporter: Reşat SABIQ
>              Labels: pgp
>
> With
>               <signers>
>                       <pgp name="default-sig" keyId="${pgp.key}" 
> password="${pgp.password}"/> 
>               </signers>
> in ivysettings.xml,
> ivy kept throwing CNFE until i put these dependencies in .ant/lib:
>               <dependency org="org.bouncycastle" name="bcpg-jdk15on" 
> rev="1.49" conf="default"/>
>               <dependency org="org.bouncycastle" name="bcprov-jdk15on" 
> rev="1.49" conf="default"/>
> I ended up putting the following comment in ivy.xml:
>               <!-- First 2 currently must be in .ant/lib (pgp signer didn't 
> work via dependency or ivycache manipulation, etc). -->
> P.S. I believe this issue is ongoing since 2012/13.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to