gnodet commented on code in PR #862:
URL: https://github.com/apache/maven/pull/862#discussion_r1008919280
##########
maven-plugin-api/pom.xml:
##########
@@ -112,6 +117,53 @@ under the License.
</params>
</configuration>
</execution>
+ <execution>
+ <id>velocity-plugin</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>velocity</goal>
+ </goals>
+ <configuration>
+ <version>1.1.0</version>
+ <models>
+ <model>src/main/mdo/plugin.mdo</model>
+ </models>
+ <templates>
+ <template>src/main/mdo/model.vm</template>
+ <template>src/main/mdo/reader.vm</template>
+ </templates>
+ <params>
+
<param>packageModelV3=org.apache.maven.plugin.descriptor</param>
+
<param>packageModelV4=org.apache.maven.plugin.descriptor</param>
+
<param>packageToolV4=org.apache.maven.plugin.descriptor.io.xpp3</param>
+ </params>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>remove-superfluous-generated-classes</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ <configuration>
+ <excludeDefaultDirectories>true</excludeDefaultDirectories>
+ <filesets>
+ <fileset>
+
<directory>target/generated-sources/modello/org/apache/maven/plugin/descriptor</directory>
+ <!-- remove those classes which need to ba maintained
manually -->
+ <includes>
+ <include>MojoDescriptor.java</include>
+ <include>PluginDescriptor.java</include>
Review Comment:
A better idea imho would be to tweak the `src/mdo/model.vm` to add a list of
classes to not generate instead of generating them and removing them. A
variable similar to `packageModelV4` should work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]