On 03.04.2011 09:18, Stephen Connolly wrote:
when you add the plugins defining the lifecycle you need to add
the<extension>true</extension> to the plugin. and you have to add the plugin
for a custom lifecycle
Hi Stephen,
thank you for helping out.
In the pom.xml of integration tests, I have:
<build>
<plugins>
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<extensions>true</extensions>
<dependencies>
<!-- ... -->
</build>
So the <extensions>true</extensions> is already in.
I'm not so sure what you mean by "you have to add the plugin for a
custom lifecycle". In my components.xml, there is a custom lifecycle
_mapping_:
<component-set>
<components>
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>drools-knowledge-module</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<phases>
<!--<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>-->
<compile>de.lightful.maven.plugins:maven-drools-plugin:compile</compile>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
</configuration>
</component>
</components>
<component>
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
<role-hint>drools-knowledge-module</role-hint>
<implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
<configuration>
<type>drools-knowledge-module</type>
<extension>dkm</extension>
<packaging>schlumpf</packaging>
<language>drools</language>
<includesDependencies>false</includesDependencies>
<addedToClasspath>false</addedToClasspath>
</configuration>
</component>
</component-set>
I also have a lifecycles.xml with a custom lifecycle, but as I don't
trigger that lifecycle anywhere (yet), it should not (?) pose any
problems. The CompileMojo has only two AnnoMojo annotations:
@MojoGoal(CompileMojo.GOAL)
@MojoRequiresDependencyResolution("runtime")
public class CompileMojo extends AbstractMojo {
public static final String GOAL = "compile";
// ...
Interestingly, if I change all occurrences of "drools-knowledge-module"
in the components.xml into "dkm" and use <packaging>dkm</packaging> in
my poms, the plugin works okay. Do I have to use the string specified as
<role-hint> when I specify my packaging type in the POM?
What am I missing?
Best regards
Ansgar