Interesting. I have one project of type ejb where imposing filters the
way I described does affect the standard compiles, but another of type
jar where the filters are ignored as you suggested. A moot point given
on the change you are explaining, but interesting anyway.

Back to what your saying, having includes, testIncludes, excludes and
testExcludes is more difficult. Instead of adding parameters to the
AbstractCompilerMojo each subclass must be changed, as does the
signature of computerStaleSources. No big deal effort-wise, but I'll
have to update the patch to the ticket and it prompts a question:

Will (is?) M2 forever restricted to a compile/testCompile, or will other
compile types be supported as well, and would filter support require
more include/exclude sets? I ask because of the potential explosion of
tags such as unitTestIncludes, systemTestIncludes, etc...

Kris

On Wed, 2005-07-27 at 09:37 +1000, Brett Porter wrote:
> Correct, goals outside of executions are deprecated. The syntax you have
> at the end is correct, but only when you are binding your own goals to
> the lifecycle. These will not affect the standard compile/testCompile goals.
> 
> You need to put the configuration in the plugin element. I suggest using
> <includes/> and <testIncludes/> then the respective excludes instead.
> 
> BTW, id is something unique so that if you need to add goals/config to
> it in a subproject or profile, you can select it
> 
> - Brett
> 
> Kris Bravo wrote:
> 
> >As a follow up to this, these configuration filters are not recognized
> >even if I add an <id> to each of the <execution> elements.
> >
> >If however, I add the configurations in <goals> outside of the
> ><executions>, they seem to be picked up; however, I get this warning as
> >well:
> >[WARNING] DEPRECATED: goal definitions for plugin
> >'org.apache.maven.plugins:maven-compiler-plugin' must be in an
> >executions element
> >
> >Kris
> >
> >On Tue, 2005-07-26 at 14:12 -0500, Kris Bravo wrote:
> >  
> >
> >>I'm working on a patch to expose the inclusion and exclusion support of
> >>the plexus compiler in the compiler plugin.
> >>
> >>http://jira.codehaus.org/browse/MNG-643
> >>
> >>I'm confused about how to define the two configurations for two
> >>different goals in the plugin description.
> >>
> >>          <executions>
> >>            <pluginExecution>
> >>              <id/>
> >>              <phase/>
> >>              <goals/>
> >>here           <inherited/>
> >>--->           <configuration/>
> >>            </pluginExecution>
> >>or        </executions>
> >>          <goals>
> >>            <goal>
> >>here?          <id/>
> >>--->           <configuration/>
> >>            </goal>
> >>          </goals>
> >>
> >>Here's where I've left off:
> >>
> >>      <plugin>
> >>        <groupId>org.apache.maven.plugins</groupId>
> >>        <artifactId>maven-compiler-plugin</artifactId>
> >>        <version>2.0-alpha-4-SNAPSHOT</version>
> >>        <executions>
> >>           <execution>
> >>              <goals>
> >>                 <goal>compile</goal>
> >>              </goals>
> >>              <configuration>
> >>                  <includes>
> >>                    <include>**/*Bean.java</include>
> >>                  </includes>
> >>                  <excludes>
> >>                    <exclude>**/*Test.java</exclude>
> >>                  </excludes>
> >>              </configuration>
> >>           </execution>
> >>           <execution>
> >>              <goals>
> >>                 <goal>testCompile</goal>
> >>              </goals>
> >>              <configuration>
> >>                  <includes>
> >>                    <include>**/*Test.java</include>
> >>                  </includes>
> >>              </configuration>
> >>           </execution>
> >>        </executions>
> >>      </plugin>
> >>
> >>If I have two <execution>'s it complains about not having the id's set.
> >>Since there isn't a description for the purpose of the id's, what are
> >>their purpose? Are arbitrary strings sufficient?
> >>
> >>Kris



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

Reply via email to