Can someone give me an example of using the antrun plugin to call
native2ascii directly?  I searched the archive, found a thread, but its not
working.  antrun claims it can't find native2ascii as a task and I DID
include the ant-nodeps, 1.6.5 in my dependency tree (as provided).

-aps

On 6/25/07, Alexander Sack <[EMAIL PROTECTED]> wrote:

Uggh, on a side note the plugin is breaking because of the profile used to
add tools.jar.  The FAQ for adding tools.jar is a very bad idea:

http://maven.apache.org/general.html#tools-jar-dependency

This assumes a JDK by Sun which may not be the case on many platforms.  It
would be better to really look for tools.jar off of JAVA_HOME (at least
don't key off of java.vendor string).

-aps

On 6/25/07, Alexander Sack <[EMAIL PROTECTED]> wrote:
>
> I'm confused Niraj.  I understand that is the normal way I would do it
> in Java, how would I do that within my Maven pom file?
>
> -aps
>
> On 6/25/07, Alok, Niraj <[EMAIL PROTECTED]> wrote:
> >
> > You could use Thread.currentThread().getContextLoader()
> > and then iterate through the urls list which are locations of jar
> > files.
> >
> >
> > -----Original Message-----
> > From: Alexander Sack [mailto: [EMAIL PROTECTED]
> > Sent: Tuesday, June 26, 2007 1:37 AM
> > To: Maven Users List
> > Subject: native2ascii classpath woes
> >
> > I'm using the native2ascii codehaus plugin and on windows it works
> > fine,
> > but
> > on my Unix box it fails with:
> >
> > --- Nested Exception ---
> > java.lang.ClassNotFoundException: sun.tools.native2ascii.Main
> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> >         at java.security.AccessController.doPrivileged (Native Method)
> >         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> >
> > Now tools.jar is in my JAVA_HOME/lib directory and as such I would
> > think
> > be
> > in the system class path, yet its not finding it?  I did a little
> > searching
> > and I know someone recently had issues specifically on Mac because its
> > JDK
> > doesn't have a tools.jar (its in their classes.jar).  Okay, but that's
> > not
> > the case here.
> >
> > It seems the native2ascii plugin just forwards the task to the built
> > in
> > ANT
> > optional task which itself calls native2ascii (that's what I would
> > guess
> > from looking at the exception trace).
> >
> > How can I debug the runtime classpath of a Maven2 build cycle?
> >
> > -aps
> >
> > --
> > "What lies behind us and what lies in front of us is of little concern
> > to
> > what lies within us." -Ralph Waldo Emerson
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> "What lies behind us and what lies in front of us is of little concern
> to what lies within us." -Ralph Waldo Emerson
>



--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson




--
"What lies behind us and what lies in front of us is of little concern to
what lies within us." -Ralph Waldo Emerson

Reply via email to