this is a known regression: http://jira.codehaus.org/browse/MNG-5476 [REGRESSION] @required parameter not being enforced for arrays
Regards, Hervé Le samedi 8 février 2014 13:16:26 vous avez écrit : > Hi, > > I have observed a strange thing (May be do i oversight something)... > > working on the exec-maven-plugin the revision 19370 of the trunk can be > build etc. with Maven 3.0.5 without any problem...but with Maven 2.2.1 > it can't (bamboo shows so). > > After diving into it i found out that in the Mojo definition i have one > parameter (ExecJava.java) define like the following: > > /** > * The class arguments. > * > * @since 1.0 > */ > @Parameter( required = true, property = "exec.arguments" ) > private String[] arguments; > > and my integration test src/it/mexec-29/pom.xml (others as well) does > currently NOT contain an argument parameter which is correct, cause i > made a mistake during the migration to Java 5 Plexus annotation....so > far so good... > > But know the question: Why can i successfully build and run integration > tests with Maven 3.0.5 but not with Maven 2.2.1? > > In Maven 3.0.5 a log snippet shows: > > [DEBUG] (f) mainClass = org.codehaus.mojo.exec.NoMain > [DEBUG] (f) pluginDependencies = ..... > [DEBUG] (f) remoteRepositories = [ id: it-repo > url: file:///Users/kama/.m2/repository > layout: default > snapshots: [enabled => true, update => daily] > releases: [enabled => true, update => daily] > ] > [DEBUG] (f) skip = false > [DEBUG] (f) stopUnresponsiveDaemonThreads = false > [DEBUG] (f) project = MavenProject: > org.cb.maven.plugins.exec:project1:0.1 @ > /Users/kama/ws-git/mojo/exec-maven-plugin/target/it/mexec-29/pom.xml > [DEBUG] -- end configuration -- > > > that it DOES NOT COMPLAIN about the missing parameter which is based on > the anntation where it's defined as required.... > > > In Maven 2.2.1 the log snippet shows exactly this behaviour: > > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] One or more required plugin parameters are invalid/missing for > 'exec:java' > > [0] Inside the definition for plugin 'exec-maven-plugin' specify the > following: > > <configuration> > ... > <arguments>VALUE</arguments> > </configuration> > > -OR- > > on the command line, specify: '-Dexec.arguments=VALUE' > > > So does someone have a tip what i'm doing wrong or what i oversight ? > > Thanks in advance. > > Kind regards > Karl Heinz Marbaise > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
