You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by eyalg1972 <ey...@bmc.com> on 2009/03/23 13:12:24 UTC

Problem when compiling IDL based Java sources

Hi,

I have a Java project that it's sources needs first to have some IDL files
to be compiled to Java, and then to compile these files, before compilation
of the main sources.

First I used the maven-compiler-plugin for the main sources, and the
maven-antrun-plugin for the generation of the Jaav sources from IDL.

But I had a problem with - where to compile the new Java sources.

SO I added to the ant task also compilation of the new sources (If there is
a better way-I'll be happy to know).

Now I receive:

     [echo] JAVA_HOME= C:\p4client_td\atrium_disco\addm\tools\jdk\1.6.0_12
     
    [javac] Compiling 443 source files to
C:\p4client_td\atrium_disco\addm\discovery\td_76
t
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to
"C:\p4client_td\atrium_disco\addm\tools\jdk\1.6.0_12\jre"

I don't know from where it takes the JAVA_HOME definitions.

Any idea?

Thanks
Eyal
-- 
View this message in context: http://www.nabble.com/Problem-when-compiling-IDL-based-Java-sources-tp22658921p22658921.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem when compiling IDL based Java sources

Posted by Jörg Schaible <jo...@gmx.de>.
eyalg1972 wrote at Montag, 23. März 2009 13:12:

> 
> Hi,
> 
> I have a Java project that it's sources needs first to have some IDL files
> to be compiled to Java, and then to compile these files, before
> compilation of the main sources.
> 
> First I used the maven-compiler-plugin for the main sources, and the
> maven-antrun-plugin for the generation of the Jaav sources from IDL.
> 
> But I had a problem with - where to compile the new Java sources.
> 
> SO I added to the ant task also compilation of the new sources (If there
> is a better way-I'll be happy to know).

Generate the Java files in the generate-sources phase somewhere to
target/generated-sources/idl and add that directory with the help of the
buildhelper plugin to the source path (also in the generate-sources phase).

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org