This isn't actually possible with the plugin, unless perhaps you do this: - put everything in a top level configuration of the plugin - pass in a variable from the command line, eg -Dtarget=foo antrun:run - execute the appropriate target in the script based on the variable
Ideally, you would write a plugin for these goals (Ant support for plugins will be available soon, currently you must write them in java or beanshell). - Brett On 11/25/05, Pete <[EMAIL PROTECTED]> wrote: > I'm sure this is a very basic question about using antRun plugin, all > works fine if I > bind the plugin to a phase e.g. > > <phase>generate-sources</phase> > > but how can I define the plugin to be executed on demand like a > Utility goal to update the Database. > > I have tried removing the phase and then command :- > > mvn antrun:run > > but I get > task-segment: [antrun:run] > ---------------------------------------- > [antrun:run] > Executing tasks > Executed tasks > ---------------------------------------- > > I want a antRun plugin that will be executed during 'integration' > phase, but also defined a second time such that it can be invoked on > its own at will - via a new goal > > > <build> > <plugins> > <plugin> > <artifactId>maven-antrun-plugin</artifactId> > <executions> > <execution> > <id>update-db</id> > > <phase>generate-sources</phase> > <configuration> > <tasks> > <ant > antfile="build.xml" dir="ant" target="update-oracle-db" > inheritRefs="true"/> > </tasks> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > </build> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
