Unable to set the compilerId
----------------------------

         Key: MNG-1391
         URL: http://jira.codehaus.org/browse/MNG-1391
     Project: Maven 2
        Type: Bug
  Components: maven-compiler-plugin  
    Versions: 2.0    
 Environment: Maven version: 2.0
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode)
Linux notebook 2.6.12-suspend2-r6 #3 Tue Nov 1 09:16:10 CET 2005 i686 Mobile 
Intel(R) Pentium(R) 4     CPU 3.06GHz GenuineIntel GNU/Linux
 Reporter: Lars Trieloff


according to the maven-compiler-plugin documentation I can set the
compiler to be used by adding the compilerId element to my pom.xml.

However my small example POM which includes following build
configuration is unable to work with maven.

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <compilerId>eclipse</compilerId>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.plexus</groupId>
              <artifactId>plexus-compiler-eclipse</artifactId>
              <version>1.5.1</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

I tell the compiler-plugin to use the eclipse compiler and add it as
dependency to the compiler-plugin. But when I run maven, it fails with:
"No such compiler 'eclipse'.". The debug output is:

[EMAIL PROTECTED] ~/Projects/Studies/IFIR $ mvn compile -U -e -X
+ Error stacktraces are turned on.
[DEBUG] Building Maven user-level plugin registry from: 
'/home/lars/.m2/plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 
'/usr/share/maven2/conf/plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] 
----------------------------------------------------------------------------
[INFO] Building Goshaky Feed Filter
[INFO]    task-segment: [compile]
[INFO] 
----------------------------------------------------------------------------
[INFO] artifact org.apache.maven.plugins:maven-resources-plugin: checking for 
updates from central
[DEBUG] maven-resources-plugin: resolved to version 2.1 from repository central
[DEBUG] Retrieving parent-POM from the repository for project: 
null:maven-resources-plugin:maven-plugin:2.1
[INFO] artifact org.apache.maven.plugins:maven-compiler-plugin: checking for 
updates from central
[DEBUG] maven-compiler-plugin: resolved to version 2.0 from repository central
[DEBUG] Retrieving parent-POM from the repository for project: 
null:maven-compiler-plugin:maven-plugin:2.0
[DEBUG] org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.1 
(selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: 
org.apache.maven:maven-model:jar:2.0
[DEBUG]   org.apache.maven:maven-model:jar:2.0 (selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: 
null:maven-project:jar:2.0
[DEBUG]   org.apache.maven:maven-project:jar:2.0 (selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 
(selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG]       classworlds:classworlds:jar:1.1-alpha-2 (selected for runtime)
[DEBUG]       junit:junit:jar:3.8.1 (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: 
org.apache.maven:maven-artifact:jar:2.0
[DEBUG]     org.apache.maven:maven-artifact:jar:2.0 (selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG]     org.apache.maven:maven-model:jar:2.0 (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: 
org.apache.maven:maven-artifact-manager:jar:2.0
[DEBUG]     org.apache.maven:maven-artifact-manager:jar:2.0 (selected for 
runtime)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 
(selected for runtime)
[DEBUG]       org.apache.maven:maven-artifact:jar:2.0 (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: 
org.apache.maven:maven-repository-metadata:jar:2.0
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:2.0 (selected for 
runtime)
[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for 
runtime)
[DEBUG]       org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5 
(selected for runtime)
[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for 
runtime)
[DEBUG] Retrieving parent-POM from the repository for project: 
null:maven-profile:jar:2.0
[DEBUG]     org.apache.maven:maven-profile:jar:2.0 (selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 
(selected for runtime)
[DEBUG]       org.apache.maven:maven-model:jar:2.0 (selected for runtime)
[DEBUG]   commons-io:commons-io:jar:1.0 (selected for runtime)
[DEBUG]     junit:junit:jar:3.8.1 (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: 
org.apache.maven:maven-plugin-api:jar:2.0
[DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0 (selected for runtime)
[DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-resources-plugin:2.1:resources' -->
[DEBUG]   (f) filters = []
[DEBUG]   (f) outputDirectory = /home/lars/Projects/Studies/IFIR/target/classes
[DEBUG]   (f) project = [EMAIL PROTECTED]
[DEBUG]   (f) resources = [EMAIL PROTECTED]
[DEBUG] -- end configuration --
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[DEBUG] com.goshaky.feedfilter:feedfilter:jar:1.0-SNAPSHOT (selected for null)
[DEBUG]   junit:junit:jar:3.8.1 (selected for test)
[DEBUG] org.apache.maven.plugins:maven-compiler-plugin:maven-plugin:2.0 
(selected for runtime)
[DEBUG]   org.codehaus.plexus:plexus-compiler-api:jar:1.5.1 (selected for 
runtime)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG]     classworlds:classworlds:jar:1.1-alpha-2 (selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 
(selected for runtime)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG]       classworlds:classworlds:jar:1.1-alpha-2 (selected for runtime)
[DEBUG]       junit:junit:jar:3.8.1 (selected for runtime)
[DEBUG]   org.codehaus.plexus:plexus-compiler-manager:jar:1.5.1 (selected for 
runtime)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 
(selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-compiler-api:jar:1.5.1 (selected for 
runtime)
[DEBUG]     classworlds:classworlds:jar:1.1-alpha-2 (selected for runtime)
[DEBUG]   org.codehaus.plexus:plexus-compiler-javac:jar:1.5.1 (selected for 
runtime)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-compiler-api:jar:1.5.1 (selected for 
runtime)
[DEBUG]     org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 
(selected for runtime)
[DEBUG]     classworlds:classworlds:jar:1.1-alpha-2 (selected for runtime)
[DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0 (selected for runtime)
[DEBUG]   org.apache.maven:maven-artifact:jar:2.0 (selected for runtime)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for runtime)
[DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-compiler-plugin:2.0:compile' -->
[DEBUG]   (f) basedir = /home/lars/Projects/Studies/IFIR
[DEBUG]   (f) buildDirectory = /home/lars/Projects/Studies/IFIR/target
[DEBUG]   (f) classpathElements = 
[/home/lars/Projects/Studies/IFIR/target/classes]
[DEBUG]   (f) compileSourceRoots = 
[/home/lars/Projects/Studies/IFIR/src/main/java]
[DEBUG]   (f) compilerId = eclipse
[DEBUG]   (f) debug = true
[DEBUG]   (f) fork = false
[DEBUG]   (f) optimize = false
[DEBUG]   (f) outputDirectory = /home/lars/Projects/Studies/IFIR/target/classes
[DEBUG]   (f) outputFileName = feedfilter-1.0-SNAPSHOT
[DEBUG]   (f) projectArtifact = 
com.goshaky.feedfilter:feedfilter:jar:1.0-SNAPSHOT
[DEBUG]   (f) staleMillis = 0
[DEBUG]   (f) verbose = false
[DEBUG] -- end configuration --
[INFO] [compiler:compile]
[DEBUG] Using compiler 'eclipse'.
[INFO] 
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
----------------------------------------------------------------------------
[INFO] No such compiler 'eclipse'.
[INFO] 
----------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: No such compiler 
'eclipse'.
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:544)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
        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.MojoExecutionException: No such compiler 
'eclipse'.
        at 
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:230)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:110)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
        ... 16 more
[INFO] 
----------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Wed Nov 02 00:46:22 CET 2005
[INFO] Final Memory: 2M/5M
[INFO] 
----------------------------------------------------------------------------




Maven even does not attempt to load or download plexus-compiler-eclipse
from the central repository.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to