[ 
https://jira.codehaus.org/browse/MPLUGIN-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Herve Boutemy updated MPLUGIN-267:
----------------------------------

    Description: 
actual example says:
{code:xml}  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>{code}

this skipErrorNoDescriptorsFound configuration is not really good, since it 
does never check if mojo descriptors can be found.

A recent idea permits to avoid this: simply changing the phase of the actual 
goal, instead of configuring a second run:
{code:xml}  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.3</version>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <phase>process-classes</phase>
          </execution>{code}

the key change is the default-descriptor execution id instead of 
mojo-descriptor.

Notice: it works with Maven 3 but not with Maven 2...

  was:
actual example says:
{code:xml}  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>{code}

this skipErrorNoDescriptorsFound configuration is not really good, since it 
does never check if mojo descriptors can be found.

A recent idea permits to avoid this: simply changing the phase of the actual 
goal, instead of configuring a second run:
{code:xml}  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.3</version>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <phase>process-classes</phase>
          </execution>{code}

the default-descriptor execution id instead of mojo-descriptor is the key 
change...


> document how to change desriptor phase instead of running it twice with 
> skipErrorNoDescriptorsFound
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MPLUGIN-267
>                 URL: https://jira.codehaus.org/browse/MPLUGIN-267
>             Project: Maven Plugin Tools
>          Issue Type: Improvement
>          Components: Plugin Plugin
>    Affects Versions: 3.3
>            Reporter: Herve Boutemy
>
> actual example says:
> {code:xml}  <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-plugin-plugin</artifactId>
>         <version>3.3</version>
>         <configuration>
>           <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
>           <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
>         </configuration>
>         <executions>
>           <execution>
>             <id>mojo-descriptor</id>
>             <goals>
>               <goal>descriptor</goal>
>             </goals>
>           </execution>{code}
> this skipErrorNoDescriptorsFound configuration is not really good, since it 
> does never check if mojo descriptors can be found.
> A recent idea permits to avoid this: simply changing the phase of the actual 
> goal, instead of configuring a second run:
> {code:xml}  <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-plugin-plugin</artifactId>
>         <version>3.3</version>
>         <executions>
>           <execution>
>             <id>default-descriptor</id>
>             <phase>process-classes</phase>
>           </execution>{code}
> the key change is the default-descriptor execution id instead of 
> mojo-descriptor.
> Notice: it works with Maven 3 but not with Maven 2...



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to