On Sat, 2008-03-22 at 11:41 -0400, Farrukh Najmi wrote: > Dear colleagues, > > In my pom I have several executions of the xslt-maven-plugin. > None of these executions are bound to any phase: > > ... > <build> > <plugins> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>xslt-maven-plugin</artifactId> > <executions> > <execution> > <id>exec1</id> > <configuration> > <srcDir>...</srcDir> > <srcIncludes>...</srcIncludes> > <xslFile>...</xslFile> > </configuration> > </execution> > <execution> > <id>exec2</id> > <configuration> > <srcDir>...</srcDir> > <srcIncludes>...</srcIncludes> > <xslFile>...</xslFile> > </configuration> > </execution> > </executions> > </plugin> > </plugins> > </build> > > > I would like to be able to specify a specific execution when I invoke a > goal of the plugin but am not sure how to do that. > > Also, if I specify following goal: > > mvn xslt:transform > > then I get an error: > > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] One or more required plugin parameters are invalid/missing for > 'xslt:transform' > > [0] Inside the definition for plugin 'xslt-maven-plugin' specify the > following: > > <configuration> > ... > <xslFile>VALUE</xslFile> > </configuration>. > > But I *have* specified <xslFile> and other tags within each of the > <configuration> tags above. > > What am I doing wrong? TIA for your help.
(1) I believe that every plugin has an implicit execution, with id="default". Adding an <executions> section defines *additional* executions, but the default one still exists. So I think you need to add a <configuration> section for the default execution, as a child of the <plugin> tag, with the mandatory param specified. The settings for any named execution can be overridden in a child pom by specifying the same id used by an execution in a parent pom; AFAIK specifying and id of "default" will override the default execution. (2) I know of no way to run a specific named execution. It sounds a little odd; maybe you should rethink your requirements. Initially it sounds odd to have artifacts generated sometimes, and not generated at other times. However it is possible to define plugins in profiles, so that a definition only is effective when that particular profile is enabled. If you're really sure that what you are trying to do is a good idea, then you might be able to use profiles to achieve it. Alternatively, perhaps you should have multiple projects? A main one can create the "base" artifact, then different projects depend on the main one, and generate whatever things you are trying to get via enabling/disabling xslt executions. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
