You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Skopp <sk...@riege.com> on 2005/06/29 15:21:17 UTC

Re: Using Eclipse Compiler in Maven

Hi all,

this works fine with Eclipse 3.0

Any idea for Eclipse 3.1? "jdtCompilerAdapter.jar" does not exists in 
eclipse plugin dir.
It's contained in "org.eclipse.jdt.core_3.1.0.jar" but is it the right 
way to simply extract it from the jar?

$ jar tf org.eclipse.jdt.core_3.1.0.jar | grep CompilerAdapter
jdtCompilerAdapter.jar

Thanks for clarification,
Martin

Tran, Khiet schrieb:
> Sorry, I've added these lines to maven/bin/forehead.conf too:
>     ${maven.home}/lib/jdtcore.jar
>     ${maven.home}/lib/jdtCompilerAdapter.jar
> 
> -----Original Message-----
> From: Tran, Khiet [mailto:khiet.tran@melochemonnex.com] 
> Sent: Wednesday, May 11, 2005 10:11 AM
> To: 'Maven Users List'
> Subject: RE: Using Eclipse Compiler in Maven
> 
> 
> Hi Jörn,
> I am compiling with Eclipse and here's how I do it:
> I've added these jars into maven installation
> maven\lib\jdtCompilerAdapter.jar maven\lib\jdtcore.jar and specify this
> property 
> build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
> somewhere into maven properties tree.
> Hope this helps,
> Khiet.
> -----Original Message-----
> From: "Gebhardt, Jörn" [mailto:J.Gebhardt@verband.creditreform.de] 
> Sent: Wednesday, May 11, 2005 8:29 AM
> To: Maven Users List
> Subject: AW: Using Eclipse Compiler in Maven
> 
> 
> Hi Maurice,
> 
> I don't get the hot replacement working and I still believe that it is a
> problem with the different compilers...
> 
> So does anybody know how to run Maven with the Eclipse Java compiler, i.e.
> where do I configure the classpath of Maven/Java Plugin/Jelly-Ant so that
> the Ant java task finds the org.eclipse.jdt.core.JDTCompilerAdapter?
> 
> Thanks in advance,
> Jörn
> 
> -----Ursprüngliche Nachricht-----
> Von: Maurice Nicholson [mailto:maurice.nicholson@opodo.com] 
> Gesendet: Mittwoch, 11. Mai 2005 12:25
> An: 'Maven Users List'
> Betreff: RE: Using Eclipse Compiler in Maven
> 
> Hi Joern,
> 
> Actually we build and deploy our EJBs with plain old JAR files, not EARs.
> 
> But perhaps the fact you do not get a warning initially means it is
> reloading the class correctly into the app server!?
> 
> I don't use Eclipse (anymore), but I would expect that as soon as the class
> is compiled, it is reloaded into existing debugged VMs. I think the delay
> between the change and warning is something to do with the JUnit test. 
> 
> I was actually looking for the Eclipse "option(s)" to enable hot-replace a
> few days ago and just couldn't find any. I can only assume if you use 1.4 it
> is enabled. Although I do remember getting a dialogue when I switched from
> 1.3 to 1.4 in Eclipse to the effect that "changed classes can now be
> reloaded, is this ok?". And the fact you get this "Schema change..." error
> definitely indicates it is trying, at least.
> 
> Try a test without running JUnit on a method you can easily debug; debug it
> first, make a change, compile, hot-deploy and re-execute the code to check
> whether the hot deploy is working with your app server.
> 
> Cheers,
> Maurice
> 
> -----Original Message-----
> From: "Gebhardt, Jörn" [mailto:J.Gebhardt@verband.creditreform.de]
> Sent: 11 May 2005 10:54
> To: Maven Users List
> Subject: AW: Using Eclipse Compiler in Maven
> 
> 
> Hi Maurice,
> 
> Unfortunately it doesn't work... I'm just changing an existing method
> implementation and when I rerun a JUnit test I get the "Hot code replace
> failed - Scheme change not implemented" exception. And I also assured that
> Eclpise's compiler compliance level is set to version 1.4 (I'm using JDK
> 1.4.2_08 for Eclipse and Maven and JBoss). Unfortunately, Eclipse doesn't
> tell me, which class couldn't be hot deployed? Because at the moment I saved
> the modified file, no hot deployment exception is shown (however the
> execution of the JUnit test shows, that the modified class was not
> deployed), it appears only when rerunning the JUnit test...
> 
> I also tried to deploy just the EJB jar outside the EAR, however I still get
> the old exception.
> 
> Did you ever build an EAR with Maven, deployed it from Eclipse (using
> JBossIDE) and modified any source file in Eclipse and the hot deployment did
> work? Did you have to configure anything special (e.g. which source belongs
> to which jar/ear file)?
> 
> Best regards,
> Joern
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Maurice Nicholson [mailto:maurice.nicholson@opodo.com] 
> Gesendet: Mittwoch, 11. Mai 2005 11:26
> An: 'Maven Users List'
> Betreff: RE: Using Eclipse Compiler in Maven
> 
> Hi,
> 
> you don't need to use the Eclipse compiler; hot deploy should work fine
> using Eclipse while debugging and javac to build the deployment JARs.
> 
> But... AFAIK the only thing that can be hot-replaced is a change to an
> existing method implementation. If you add/rename methods, change method
> signatures, add new classes, instance variables, imports, etc, that is a
> "Schema change" which is "not implemented".
> 
> Cheers,
> Maurice
> 
> 
> -----Original Message-----
> From: "Gebhardt, Jörn" [mailto:J.Gebhardt@verband.creditreform.de]
> Sent: 11 May 2005 10:16
> To: users@maven.apache.org
> Subject: Using Eclipse Compiler in Maven
> 
> 
> Hi,
> 
> I've set up a Maven build to create an EJB jar and an EAR application which
> I deploy to JBoss.
> 
> I'm using Eclipse 3.0 in order to develop my code and I really love the hot
> code deployment feature. However, because I built my EAR file with Maven
> (i.e. the standard jdk compiler) and Eclipse uses it's own compiler, the hot
> deployment doesn't work (I'm getting a "Hot code replace failed - Scheme
> change not implemented" exception).
> 
> 
> On http://eclipsewiki.editme.com/ANTFaq I found an explanation how to
> configure Ant in order to use the Eclipse compiler by setting the property
> "-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter".
> 
> However, Maven doesn't find the Eclipse compiler and I get an "<ant:javac>
> Compiler Adapter 'org.eclipse.jdt.core.JDTCompilerAdapter' can't be found."
> exception.
> 
> Where do I have to place the jdtCompilerAdapter.jar and jdtcore.jar files so
> that Maven/Ant/Ant-Jelly-Plugin or whatever finds the
> org.eclipse.jdt.core.JDTCompilerAdapter class?
> 
> I already tried to add them to the Maven/lib directory, however it had no
> effect. Or is there any other way to tell Maven how to use the Eclipse
> compiler?
> 
> Thanks in advance,
> 
> Joern
> 
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The service is powered
> by MessageLabs. For more information on a proactive anti-virus service
> working around the clock, around the globe, visit: http://www.star.net.uk
> ________________________________________________________________________
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The service is powered
> by MessageLabs. For more information on a proactive anti-virus service
> working around the clock, around the globe, visit: http://www.star.net.uk
> ________________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The service is powered
> by MessageLabs. For more information on a proactive anti-virus service
> working around the clock, around the globe, visit: http://www.star.net.uk
> ________________________________________________________________________
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The service is powered
> by MessageLabs. For more information on a proactive anti-virus service
> working around the clock, around the globe, visit: http://www.star.net.uk
> ________________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

-- 
Martin Skopp
Riege Software International GmbH
Support: mailto:maint@riege.com, Information: http://www.riege.com

This email is intended to be viewed with a nonproportional font.


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