Profile compiler plugin configuration not inherited
---------------------------------------------------

                 Key: MNG-2485
                 URL: http://jira.codehaus.org/browse/MNG-2485
             Project: Maven 2
          Issue Type: Bug
          Components: Inheritence and Interpolation
    Affects Versions: 2.0.4
         Environment: Windows XP, 2K
            Reporter: Olivier Pichon


Compiler plugin configuration in parent pom profile is ignored by child pom.

Parent pom includes a profile which sets the compiler plugin's source and 
target settings to 1.5:
<project>
  ...
  <profiles>
    <profile>
      <id>test</id>
      <activation>
        <property>
          <name>test</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <target>1.5</target>
              <source>1.5</source>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>

When running the test-compile phase on a child pom, the profile is ignored. 
Maven complains about annotations not being allowed with -source=1.3.
This occurs when the profile is activated eitherwith the -Ptest or with the 
-Dtest=true CLI parameters.

The above configuration works perfectly well when the <profiles> element is 
copied/pasted to the child pom.

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