I tried to build the project but got compilation failures [INFO] Compilation failure /tmp/opennms-maven-plugins/features-maven- plugin/src/main/java/org/opennms/maven/plugins/karaf/FeatureBuilder.java: [79,9] error: no suitable method found for addBundle(String,int,<null>,<null>)
Regards, Hervé Le lundi 4 juin 2012 10:29:05 Benjamin Reed a écrit : > I'm trying to write a maven plugin. I've added > maven-plugin-testing-harness to my project as a test dependency, and > created a very simple test that right now just tries to load a pom > whose only content is a <plugin> section to load the plugin. > > If I have it load like this: > > <plugin> <groupId>org.opennms.maven.plugins</groupId> > > <artifactId>features-maven-plugin</artifactId> > > <version>1.0-SNAPSHOT</version> </plugin> > > ...it bombs with this exception: > > org.apache.maven.plugin.testing.ConfigurationException: Cannot find a > configuration element for a plugin with an artifactId of > features-maven-plugin. > at > org.apache.maven.plugin.testing.AbstractMojoTestCase.extractPluginConfigurat > ion(AbstractMojoTestCase.java:466) > > I thought the "configuration" section of a plugin was supposed to be > optional. However, if I add "<configuration></configuration>" after > the <version> tag above, it gives me a new error: > > org.codehaus.plexus.component.repository.exception.ComponentLookupException: > java.util.NoSuchElementException > role: org.apache.maven.plugin.Mojo > roleHint: > org.opennms.maven.plugins:features-maven-plugin:1.0-SNAPSHOT:generate-featur > es-xml at > org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.jav > a:257) > > > ...am I doing something wrong? Seems like the test framework is > breaking on the simplest things, I'm not sure how to start out if I > can't even unit test this. > > > Code is here: > https://github.com/RangerRick/opennms-maven-plugins/blob/features-maven-plug > in/features-maven-plugin > > Test is at: > https://github.com/RangerRick/opennms-maven-plugins/blob/features-maven-plug > in/features-maven-plugin/src/test/java/org/opennms/maven/plugins/karaf/Gener > ateFeaturesXmlMojoTest.java --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
