I finally found the source of the problem.
I extracted the classpath from the maven-compiler-plugin by writing the
output (-X Otion) to a log-file and generated argument files for calling
javac from the commandline:

javac @options.txt @classes.txt


And the times are equal to maven:

Very slow with JDK 1.6 and fast compilation time with JDK 1.5.


The compile of Java 1.6 seems to have a problem when passing a very long
classpath or too many source-files (all with a full path).


What is the maven-compiler-plugin doing? Just calling javac on the
commandline?
Ant seems to be able to handle this better.....








j_ri wrote:
> 
> 
> I did some mor tests.
> 
> First of all I tried with deactivated antivirus software. As expected this
> didn't solve the problem....
> 
> What I wrote last time. That Maven builds a different classpath for JDK
> 1.5 and 1.6 is only true for Maven 2.07. Maven 2.1.0 built the same
> classpath with both versions of the JDK.
> 
> 
> Today I tried something different.  
> 
> I set JAVA_HOME to JDK 1.6, but configured the maven-compiler-plugin to
> use the javac.exe of JDK 1.5:
> 
> <plugin>
>                                       
> <groupId>org.apache.maven.plugins</groupId>
>                                       
> <artifactId>maven-compiler-plugin</artifactId>
>                                       <version>2.0.2</version>
>                                       <configuration>                         
>                 
>                                               
> <executable>C:\Programme\java\jdk1.5.0_11\bin\javac.exe</executable>
>                                               <fork>true</fork>
>                                               <verbose>true</verbose>
>                                               <source>1.5</source>
>                                               <target>1.5</target>
>                                               <encoding>utf-8</encoding>
>                                       </configuration>
>                               </plugin>
> 
> 
> 
> The result was:  the codes was compiled fast!
> 
> For me it seems that there is a problem if Maven passes a very long
> classpath to the java-compiler of JDK 1.6.
> 
> When I did my test with ant I just included a fileset with *.jar and not
> every single item of the classpath with full path.
> 
> Does somebody have experience with quite big sourcetrees with a lot of
> dependencies in the classpath??
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Slow-maven-compile-after-upgrading-JDK-from-1.5-to-1.6-tp23501164p23560941.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to