maven-mojo

Java Maven Mojo : Complex Map Attribute

♀尐吖头ヾ 提交于 2019-12-24 16:44:08
问题 The example of map attribute for a mojo mentioned in maven.apache.org is quite simple as it defines a Map with a String as a key and as a value as specified below : /** * My Map. */ @Parameter private Map myMap; and it's assigned configuration would look like this : <myMap> <key1>value1</key1> <key2>value2</key2> </myMap> What I am trying to achieve is a more advanced map which takes a String as a key and my own defined class Person as value: /** * My Advanced Map. */ @Parameter private Map

Maven plugin development - how to ensure building for Maven 3.0.x instead of 3.1.x?

强颜欢笑 提交于 2019-12-10 12:54:18
问题 I'm trying to develop a custom Maven plugin. I'm currently running into this problem when I execute my unit tests: java.lang.NoClassDefFoundError: org.eclipse.aether.RepositorySystemSession Stack trace is below: initializationError(com.mycompany.MyPluginTest) Time elapsed: 0 sec (TestSuite.java:132) at org.junit.internal.runners.JUnit38ClassRunner.(JUnit38ClassRunner.java:72) at org.junit.internal.builders.JUnit3Builder.runnerForClass(JUnit3Builder.java:11) at org.junit.runners.model