Wayne
" You could either include the full plugin config in the plugin or just a property value, whatever makes the most sense."

Did you mean...

You could either include the full plugin config in the *profile* or just a property value, whatever makes the most sense.

Okay. So, there are profiles. I'll use that.

I'm curious though, is there no way to create custom goals? I'm wondering how someone would use the antrun task more than once in their build. Let's say I had a foo tool and a bar tool, neither of which had a Maven plugin, but both of which had ant tasks. What if I wanted to create two goals.

bar:run

foo:run

But those goals really where calling antrun:run , which would have to be used twice in the pom, once to define bar:run and once to define foo:run . Analogous, I suppose, to creating ant tasks in build.xml .

Is there no way to create new goals short of creating a new plugin? Are profiles supposed to be the means to define new tasks?

Alan

On Apr 6, 2008, at 11:55 PM, Wayne Fay wrote:
The best way to handle this is with multiple profiles. Then you activate one with -Pprofilename eg -Pdbupdate. You could either include the full plugin config in the plugin or just a property value, whatever makes the most sense.

Wayne

On 4/4/08, Alan Gutierrez <[EMAIL PROTECTED]> wrote:
I have the maven plugin working with the following code.

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>hibernate3-maven-plugin</artifactId>
    <version>2.0-alpha-2</version>
    <dependencies>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.3</version>
        </dependency>
    </dependencies>
    <configuration>
        <executions>
            <execution>
                <phase>process-resources</phase>
                <goals>
                    <goal>hbm2ddl</goal>
                </goals>
            </execution>
        </executions>
        <componentProperties>
            <export>false</export>
            <!--
                <update>true</update>
            -->
            <ejb3>true</ejb3>
            <jdk5>true</jdk5>
            <format>true</format>
            <outputfilename>schema.sql</outputfilename>
        </componentProperties>
    </configuration>
</plugin>

The executions section I've just added, but I'm not sure how to get
to where I want to go.

What I want is the ability to run this plugin with the update
feature on, so that I can update the databases easily, when I'm in
development mode.

What XML do I add to create a new separate goal? I supposed I could
toggle update using a commandline parameter, but I'm wondering, what
are the ways to create a different configuration for a plugin? For
the antrun plugin to be useful, it seems like you should be able to
specify many different task configurations.


--
Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504 717 1428
Think New Orleans | http://thinknola.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to