• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven Compilation Issue

 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is your JAVA_HOME set to and what is set in your PATH?
 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Turn on the debug information:

 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI jai ,

here is the log

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic