Hello,
currently I am writing a M2 plugin with an own packaging, that uses also a
configuration with a list of an own type. I've created the appropriate modello
file:
<?xml version="1.0"?>
<model>
<id>qmboptions</id>
<name>QMBOptions</name>
<description><![CDATA[Model for QMB Options.]]></description>
<defaults>
<default>
<key>package</key>
<value>com.elsagsolutions.buildsystem.maven2.plugin.qmb.options</value>
</default>
</defaults>
<classes>
<class>
<name>ApplicationMapping</name>
<description>An artifact to application mapping.</description>
<version>1.0.0</version>
<fields>
<field>
<name>artifactId</name>
<description>Id of the artifact in this application.</description>
<version>1.0.0</version>
<type>String</type>
<identifier>true</identifier>
</field>
<field>
<name>shortCut</name>
<description>Shortcut of the application.</description>
<version>1.0.0</version>
<type>char</type>
<identifier>true</identifier>
<optional>true</optional>
</field>
</fields>
</class>
</classes>
</model>
and in the test (using the maven-plugin-testing-harness) the configuration is
provided automatically to the Mojo (that contains this declaration):
/**
* The mapping of artifactIds to QMB applications.
*
* @required
* @readonly
*/
private ApplicationMapping[] applicationMappings;
Unfortunately it does not work in real life. If I use the plugin to package my
qmb type, I can package and install artifacts of my type, but the configuration
with these "ApplicationMappings" is not provided, the field is null. The plugin
is configured as follows in the POM:
<build>
<plugins>
<plugin>
<groupId>com.elsagsolutions.buildsystem.maven2.plugin</groupId>
<artifactId>elsag-qmb-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<applicationMappings>
<applicationMapping>
<artifactId>server-ear</artifactId>
</applicationMapping>
</applicationMappings>
</configuration>
</plugin>
</plugins>
</build>
What am I missing?
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]