[ http://jira.codehaus.org/browse/MCOMPILER-22?page=comments#action_84702 ] 
            
Chris Byrd commented on MCOMPILER-22:
-------------------------------------

Thanks for the link, but I am still having issues.  I will describe my steps 
below, and the issues that arose in each respective step.

1) I downloaded the jar file sent by Brahim Bakayoko.  I then replaced the jar 
file in my local repository for the plexus-compiler-javac artifact.
--  Issue: Just as Allan Shoup described, the fix provided by Brahim fails if 
there is a space in your path.  This did not occur before the change.

2) Allan provided a patch to the maven-compiler-plugin, to fix the failure when 
you have a space in the path.  I went to 
https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-compiler-plugin and 
checked out the most recent source code.  
-- Issue: I tried to clean compile the code, and I received an error.  The code 
depends on the maven-plugins parent pom, version 8-SNAPSHOT.  I looked for it 
in the central repository and http://snapshots.repository.codehaus.org/, but 
didn't find it.  I finally found a link to plugin snapshots at 
http://cvs.apache.org/maven-snapshot-repository.

3) I added the http://cvs.apache.org/maven-snapshot-repository repository to 
the recently checked out maven-compiler-plugin code and tried the clean compile 
again.
-- Issue: Aparently there are the 2-SNAPSHOT and 4-SNAPSHOT versions of the 
code in this repository, but not the 8-SNAPSHOT.  Once again, I don't have the 
necessary dependencies to do the build.

4) I edited the pom.xml of the recently checked out maven-compiler-plugin 
source code, and changed the parent dependency from 8-SNAPSHOT to 4-SNAPSHOT.
-- Issue: This did resolve the dependency and download the 4-SNAPSHOT artifact, 
so the build could continue.  However, when I issued a mvn test command, the 
unit tests failed.

5) In the spirit of just trying things, I decided to skip the tests and just 
apply the patch and install.  I applied Allan Shoup provided successfully.  I 
then skipped the unit tests and installed the maven-compiler-plugin as the 
2.1-SNAPSHOT it has listed in the code.
-- Issue: This might be where I am going wrong here.  Should I not check out 
the code from the trunk here?  I guess I should check out the tagged 2.0.2 
version instead.

6) The patch went in successfully.  I installed the maven-compiler-plugin, 
edited my original project pom to use the new maven-compiler plugin 
2.1-SNAPSHOT and tried a clean compile.
-- Issue: I got a new error message, but things were still the same, I couldn't 
complete the build when forking to a new JDK.

[INFO] [compiler:compile]
[INFO] Os is :windows xp
[INFO] Total # of java files for compilation are 25
[INFO] Compiling 1 source file to D:\Documents and Settings\xfxc104\My Documents
\Dev\workspace\pw-qis\pw-qis-core\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

Failure executing javac,  but could not parse the error:
javac: invalid argument: D:\Documents and Settings\xfxc104\My Documents\Dev\work
space\pw-qis\pw-qis-core\classes
Usage: javac <options> <source files>

Summary: 
============
Can anyone give me some hints as to where to go from here.  I'm looking at the 
attachments above, and I only used 2 of the 8 up there.  I don't know if I am 
supposed to use all of them, only some of them, and in what order am I supposed 
to use them.  I'm sure all of this seems quite mundane to those of you who 
perform these activities every day, but I assure you the process is far from 
clear for me.  Any help you can provide is greatly appreciated.

> Compilation fails: "The command line is too long."
> --------------------------------------------------
>
>                 Key: MCOMPILER-22
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-22
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>            Reporter: Matthew Beermann
>            Priority: Critical
>             Fix For: 2.0.2
>
>         Attachments: maven-compiler-plugin-space-fix.patch, 
> maven-compiler-plugin.patch, MCOMPILER-22.patch, 
> MNG-MCCOMPILER-22-maven-compiler-plugin.patch, 
> MNG-MCCOMPILER-22-plexus-compilers-noformatting.patch, 
> MNG-MCCOMPILER-22-plexus-compilers.patch, plexus-compiler-javac-1.5.2.jar, 
> plexus-compiler-javac.patch
>
>
> For one of my project, compilation fails with the message "The command line 
> is too long". As far as I can tell, it's listing each and every source file, 
> one at a time, in the -sourcepath attribute. (?!?) Here's the log:
> [DEBUG] Source roots:
> [DEBUG]  C:\continuum-1.0.2\apps\continuum\working-directory\26\src
> [DEBUG] Command line options:
> [DEBUG] -d 
> C:\continuum-1.0.2\apps\continuum\working-directory\26\target\classes 
> -classpath <DEPENDENCIES SNIPPED HERE> -sourcepath <ENORMOUSLY LONG LIST OF 
> SOURCE FILES HERE> -g -nowarn -target 1.4 -source 1.4
> Compiling 167 source files to 
> C:\continuum-1.0.2\apps\continuum\working-directory\26\target\classes
> [INFO] 
> ----------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] Compilation failure
> Failure executing javac,  but could not parse the error:
> The command line is too long.
> [INFO] 
> ----------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.BuildFailureException: Compilation failure
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:551)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation 
> failure
>       at 
> org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:429)
>       at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:110)
>       at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:432)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:530)
>       ... 16 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to