Hi Michael,
On 2011-10-21, Michael B Allen wrote:
> I'm posting this to dev instead of users because my best guess is that
> this is a bug.
Probably not.
> Consider the following target which runs a Java program MakeFoo.class:
> <target name="foo">
> <java classname="MakeFoo">
> <classpath>
> <pathelement location="."/>
> </classpath>
> <arg line="-o foo -d 'maken some foo'"/>
> </java>
> </target>
> This generates the following exception:
> $ ant foo
> Buildfile: /some/path/to/build.xml
> foo:
> [java] java.lang.NoClassDefFoundError:
> com/sun/net/ssl/internal/ssl/Provider
> [java] at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
[...]
> [java] Java Result: -1
> Java and Ant versions are pretty much the latest:
> If I remove the pathelement directive, the build works.
If you don't specify the <classpath> explicitly your Java process runs
with the same CLASSPATH that is used by Ant internally - which includes
jsse.jar.
If you specify it, then you only get what you have asked for (unless you
fiddle with the build.sysclasspath property), or close to it. I think
it should work if you explicitly add
<pathelement path="${java.class.path}"/>
if you don't like hardcoding jsse.jar (which you could address relative
to ${java.home}).
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]