Dear
 yes, You should use maven-ant-run plugin to run it.
<build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <outputDirectory>target</outputDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <configuration>
              <tasks>
                <exec dir="${basedir}/tasks/" executable="
${basedir}/tasks/mdtest.bat" >
                <env key="ra" value="h"></env>
              </exec>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>

  </build>






thanks.
Tel: (020)36315358-328 Fax: (020)36315170


                                                                                
                                                       
                      Wim Deblauwe                                              
                                                       
                      <[EMAIL PROTECTED]        To:       Maven Users List 
<users@maven.apache.org>                                     
                      il.com>                  cc:                              
                                                       
                                               Subject:  Re: [m2] building 
non-jar projects                                            
                      16/11/2005 17:51                                          
                                                       
                      Please respond to                                         
                                                       
                      "Maven Users                                              
                                                       
                      List"                                                     
                                                       
                                                                                
                                                       
                                                                                
                                                       




And is ant the best approach to start a (windows) bat file? In my maven 1
build I have in my maven.xml a custom goal with this:

<exec dir="${basedir}/../ide"
executable="${basedir}/../../../build/build-msm/build/buildmergemodule.bat"
failonerror="true">
<arg line="${msmmodule.project.filename} ${msmmodule.project.productconf}
${
msmmodule.project.release}"/>
</exec>

Should I use ant to do the exec or is there a better way? I remember there
was a discussion on the mailinglist about something like this if I recall
correctly, but I can't remember what the conclusion was.

regards,

Wim


2005/11/16, Brett Porter <[EMAIL PROTECTED]>:
>
> The ability to write pure ant script plugins is not yet released (it
> will require features in the 2.0.1 release).
>
> You can however use the Ant Java API.
>
> - Brett
>
> On 11/16/05, Wim Deblauwe <[EMAIL PROTECTED]> wrote:
> > ok, I got my alternate lifecycle working and my plugin get's called for
> > projects that define theirselves as 'msm'. However, just printing a log
> > string, as it does currently, will not help very much :)
> > How do I run an ant script from within my Mojo? Can I somehow
extend/use
> the
> > antrun plugin?
> >
> > regards,
> >
> > Wim
> >
> > 2005/11/11, Brett Porter <[EMAIL PROTECTED]>:
> > >
> > > The plugin will always be activated, but that's not an issue - it
will
> > > only do something if the packaging is set, or there is an executions
> > > element given. So this is the correct approach.
> > >
> > > There is not much details I can provide on components.xml other than
> > > the examples given. It is actually a very simple format.
> > >
> > > On 11/11/05, David Jackman <[EMAIL PROTECTED]> wrote:
> > > > Would it be possible to set up a parent pom to contain all of the
> plugin
> > > > information necessary so a subproject would only have to specify
> > > > <packaging>msm</packaging> (or whatever other type it creates) and
> > > > everything would work? Would that go in a pluginManagement section
> or
> > > > the plugins section? If the plugins section (which I would think
> would
> > > > be the case), how do you specify it such that the plugin won't get
> > > > activated unless the packaging is the right type?
> > > >
> > > > ..David..
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Brett Porter [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, November 10, 2005 12:46 AM
> > > > To: Maven Users List
> > > > Subject: Re: [m2] building non-jar projects
> > > >
> > > > The required parts of the documentation are:
> > > > - creating a lifecycle mapping for that packaging in
components.xmlof
> > > > your plugin
> > > > - specifying your plugin with <extensions>true</extensions>
> > > >
> > > > On 11/10/05, Wim Deblauwe <[EMAIL PROTECTED]> wrote:
> > > > > Hi,
> > > > >
> > > > > ok, I found much info here:
> > > > > http://maven.apache.org/maven2/lifecycle.html
> > > > >
> > > > > but what I still miss, is how I define that when I run mvn
> install, it
> > > >
> > > > > should "see" that it is not a jar module, but for instance a msm
> > > > > (InstallShield Merge Module). I know in the pom I should specify:
> > > > >
> > > > > <packaging>msm</packaging>
> > > > >
> > > > > But how would I tell Maven to use my plugin for such modules. If
> you
> > > > > could add that information to the above documentation page, I
> would be
> > > > very happy.
> > > > >
> > > > > regards,
> > > > >
> > > > > Wim
> > > > >
> > > > > 2005/11/10, Brett Porter <[EMAIL PROTECTED]>:
> > > > > >
> > > > > > You would write a plugin that provides an alternative packaging
> > > > > > (this allows you to redefine all of the phases). See the guide
> to
> > > > > > the build lifecycle for details.
> > > > > >
> > > > > > Note that there is collaborative work under way to better
> support
> > > > > > native compilation from Maven - see the recent threads on this
> list.
> > > > > >
> > > > > > - Brett
> > > > > >
> > > > > > On 11/10/05, Wim Deblauwe <[EMAIL PROTECTED]> wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > we are currently using Maven 1 to build c(++) projects and
> > > > > > > InstallShield projects. I have written custom goals in my
> > > > > > > maven.xml to accomplish
> > > > > > this.
> > > > > > > Nobody would ever call jar:deploy on such a project but the
> custom
> > > > > > defined
> > > > > > > goals.
> > > > > > >
> > > > > > > How would I do this in Maven 2. I want to avoid that the java
> > > > > > > compiler
> > > > > > runs
> > > > > > > and the jarring happens, but something of my own (a little
> piece
> > > > > > > of ant) runs. For instance, a bit of ant that calls the c
> compiler
> > > >
> > > > > > > or
> > > > > > InstallShield
> > > > > > > compiler and then a bit of ant that zips the result and puts
> it on
> > > >
> > > > > > > the
> > > > > > local
> > > > > > > or remote repository.
> > > > > > >
> > > > > > > How would I do this?
> > > > > > >
> > > > > > > regards,
> > > > > > >
> > > > > > > Wim
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> --------------------------------------------------------------------
> > > > > > - 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]
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > 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]
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


Hactl..........Moving forward with you.

Best Air Cargo Terminal - Asia 2005
Air Cargo Terminal of the Year 2002, 2003 & 2004

Web: http://www.hactl.com

DISCLAIMER :-
The information contained in this message, including any attachment, is
confidential and may also be privileged. The information is intended only
for the person or entity to which it is addressed. Any review,
re-transmission, copying, storage, distribution or other use or disclosure
of this information by persons or entities other than the intended
recipient is prohibited. If you are not the intended recipient, please
contact the sender immediately by return email and delete this message from
your system. Thank you.




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

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

Reply via email to