Hi everyone,

I have mojo - MyMojo that contains list of MyObjects object.

import java.util.List;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;

/**
 * 
 * @goal my-goal
 * @phase generate-resources
 * 
 */
public class MyMojo extends AbstractMojo {

        /**
         * @description message extractors definition.
         * @parameter
         */     
        private List<MyObject> myObjects;
        
        @Override
        public void execute() throws MojoExecutionException, 
MojoFailureException {
                // TODO Auto-generated method stub

        }
}

MyObject class looks following:

package org.xemantix.i18n;

import org.apache.maven.project.MavenProject;

public class MyObject {

        /**
     * @description object name
     * @parameter
     */
        private String name;
        
        /**
     * @description maven project
     * @parameter default-value="${project}"
     */
        private MavenProject mavenProject;
}

The problem is why mavenProject property doesn't evaluated? In case if I
would define this property directly in MyMojo it works.

Plugin configuration in pom.xml:

                                <configuration>
                                        <myObjects>
                                                <myObject>
                                                        <name>object one</name>
                                                </myObject>
                                                <myObject>
                                                        <name>object two</name>
                                                </myObject>
                                        </myObjects>
                                </configuration>

Thanks.
-- 
View this message in context: 
http://www.nabble.com/using-multivalued-properties-in-mojo-containing-complex-objects-tp22471380p22471380.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to