| Author |
Maven Compilation Issue
|
Ganesh Gowtham
Ranch Hand
Joined: Mar 30, 2005
Posts: 223
|
|
Hi Folks ,
JAVA_HOME ,M2_HOME and maven is also set in PATH .
d:\SVN-Projects\gt>mvn -version
Maven version: 2.0.10
Java version: 1.6.0_13
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
below is the stack trace .... could you please suggest
downloading of new pom and jars are ok.
compliation is the issue though i added maven-complier-plugin source ,target 1.5 still i am getiing the below problem
,
javac is accesable from command prompt ,still maven gives me some issue while compiling .
please help me .
|
Thanks, Ganesh Gowtham
http://ganesh.gowtham.googlepages.com
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
|
What is your JAVA_HOME set to and what is set in your PATH?
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
Ganesh Gowtham
Ranch Hand
Joined: Mar 30, 2005
Posts: 223
|
|
HI Martijn
Thanks for reply
JAVA_HOME = c:\jdk6
PATH=c:\jdk6\bin
infact the whole javac works good in command prompt .
Please suggest .
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
|
Hmm, it should be working fine in that case (the mvn -version showing the JDK version indicates that). Perhaps you can try setting the JAVA_HOME explicitly in the bat file that runs Maven (mvn.bat).
|
 |
Ganesh Gowtham
Ranch Hand
Joined: Mar 30, 2005
Posts: 223
|
|
Hi,
infact i am using the windows vista which i forget to mentioned .
i saw in maven site that window vista users need to use CYGWIN to run maven , i am installing that , i need to see whether it will resolve my issue .
maven is downloading all pm's and jars too ...
|
 |
Ganesh Gowtham
Ranch Hand
Joined: Mar 30, 2005
Posts: 223
|
|
infact i tried using cygwin no use it displays the same no cuh compiler 'javac'
so i created issue in JIRA
http://jira.codehaus.org/browse/MNG-4111
Hi Folks any clue why am i getting this ?.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14460
|
|
Here's my plugin definition for compiling Java 1.5 compatible.:
I'm suspicious that you're getting a "no such compiler" message, since normally, I'd expect a ClassNotFoundException. Possible problems might include:
1. Failure to have the JAVA_HOME directory pointing to the base directory of the JDK (NOT a JRE!)
2. Failure to have your path set up to include %JAVA_HOME%/bin (although your command-line success makes this unlikely).
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Ganesh Gowtham
Ranch Hand
Joined: Mar 30, 2005
Posts: 223
|
|
Tom ,
Thanks for your reply i was using that still i am getting no such compiler 'javac' , i am using windows vista business .
infact i am using the compiler plugin with
Do you think that is there any possibility it may give this .
Thanks for your help.
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8142
|
|
Turn on the debug information:
|
[My Blog] [JavaRanch Journal]
|
 |
Ganesh Gowtham
Ranch Hand
Joined: Mar 30, 2005
Posts: 223
|
|
HI jai ,
here is the log
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8142
|
|
Ganesh,
In those logs, i don't see any reference to the JAVA_HOME property. I guess its not set correctly. How and where did you set it? You can even try adding the following to your "configuration" section of the compiler plugin in pom.xml:
If this doesn't work, then i guess its the JAVA_HOME property issue. So you can next try hardcoding the path :
|
 |
Ganesh Gowtham
Ranch Hand
Joined: Mar 30, 2005
Posts: 223
|
|
HI jaikiran ,
thanks for reply ..
after the changing pom.xml to have executable tag also i am getiing the same issue .
infact as i said earlier thread , i can able to compile and execute the java programs from command line .
mvn -version shows correct maven and java version as per JAVA_HOME .
i used cygwin also no use it also displays the same error .
so breaking my head like anything
|
 |
Ganesh Gowtham
Ranch Hand
Joined: Mar 30, 2005
Posts: 223
|
|
Hi All,
Thanks a lot for your suggestions.
i raised JIRA issue @ http://jira.codehaus.org/browse/MCOMPILER-95
issue is fixed now ,
The javac wrapper should be provided by the plugin dependency org.codehaus.plexus:plexus-compiler-javac:jar:1.5.3:runtime. Please check that the copy of this file (and its POM) in your local repository ~/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/... is intact and matches the the files out on central.
i copied the jar from central repo and overrriden my local repo jar , after that every thing starts working fine .
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8142
|
|
Ganesh Gowtham wrote:
The javac wrapper should be provided by the plugin dependency org.codehaus.plexus:plexus-compiler-javac:jar:1.5.3:runtime.
Yep, that's how it's supposed to be. Each type of compiler (like javac, eclipse) is provided by the plexus-compiler-xxx plugins. When i checked your logs, i did see that it was using plexus-compiler-javac and did not see anything wrong there:
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus-compilers:pom:1.5.3 for project: null:plexus-compiler-javac:jar:1.5.3 from the repository.
Ganesh Gowtham wrote:
Please check that the copy of this file (and its POM) in your local repository ~/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/... is intact and matches the the files out on central.
i copied the jar from central repo and overrriden my local repo jar , after that every thing starts working fine
That is the job of Maven build process and not yours, unless you had did some changes to the plugin or to your repository - resulting in a corrupt plugin jar.
P.S: On a unrelated note, its not right to create bug reports (and mark them blockers) before discussing the issue in their user mailing list or the dev mailing list
|
 |
 |
|
|
subject: Maven Compilation Issue
|
|
|