Indeed, Dave is right.
I use the ant plugin only to perform tasks maven could'nt fulfill.
Main works is done by maven but some things I couldn't find ways to perform
with maven.
In my project I have integrated the izpack plugin with ant.
I don't want to execute this task in every build.
The next would be a deploy to the SAP Web Application Server for which I found
only a way with ant.
So this tasks should be executed for different builds and I don't want to
execute this both togetheter in one build.
Profiles would be an option but it's not a really smart way... (because I have
some profiles yet - i dont want to confuse my users to much)
The best way in my opinion would by (like Dave posted) "mvn install
-DantTarget=targetToCall" or something similar.
So it would be self explanatory and good to remind.
----
On 9/11/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > > > > I would just move those targets out to a build.xml file so you
> > > > > can call them directly with Ant. Then set Maven up so it calls
> > > > > the targets in the build.xml file rather than embedding the Ant stuff
> > > > > in your pom.
----
I use already this way like this:
<configuration>
<tasks>
<ant antfile = "${basedir}/src/main/scripts/build.xml">
<target name = "copy_resources"/>
<target name = "community_build"/>
<target name = "custom_build"/>
<target name = "inhouse_build"/>
</ant>
</tasks>
</configuration>
Here i define different targets in the buildscript but I'm not able to call a
specific one so if i run the ant-plugin i have to perform all targets which i
declared.
Martin (OP)
>
> Until the OP responds, we'll never know the answer. We're
> both making assumptions here.
>
> Wayne
>
> On 9/11/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote:
> > Because ant can inherit the classpaths/dependencies. Presumably he
> > *is* utilizing the lifecycle, and attaching this ant config
> to one of
> > the phases, but has a need to call specific ant tasks only
> sometimes.
> > Was there something I missed that made you think he was
> calling maven
> > only to call ant, and that he had no interest in utlizing the
> > lifecycle? I assumed this was a somewhat special case and that it
> > wasn't just using Maven to wrap an ant build process - that
> I agree would be silly.
> >
> >
> > On 9/11/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > >
> > > That just sounds more complicated than it needs to be.
> Calling Maven
> > > just so it will call Ant for me is too indirect when I
> can just call
> > > Ant directly, right? What's the advantage when it works fine with
> > > "ant <target>" and I have no interest in utilizing the Maven
> > > lifecycle for this particular Ant target/call?
> > >
> > > Wayne
> > >
> > > On 9/11/07, Dave Feltenberger <[EMAIL PROTECTED]> wrote:
> > > > Can't you just pass in a -D argument and execute the argument
> > > > that's
> > > passed
> > > > in?
> > > >
> > > > e.g.
> > > > mvn install -DantTarget=targetToCall
> > > >
> > > > then in the antrun execution:
> > > > <ant
> > > > antfile="src/main/ant-builds/buildJnlps.xml"
> > > > target="${antTarget}" />
> > > >
> > > >
> > > > On 9/11/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > I would just move those targets out to a build.xml
> file so you
> > > > > can call them directly with Ant. Then set Maven up so
> it calls
> > > > > the targets in the build.xml file rather than
> embedding the Ant stuff in your pom.
> > > > >
> > > > > Wayne
> > > > >
> > > > > On 9/11/07, Ritz, Martin <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > I have already two profiles...
> > > > > > I dont want to blow up my pom too much!
> > > > > > Is there no other easier way to call specific targets?
> > > > > >
> > > > > > Martin
> > > > > >
> > > > > >
> > > > > > > Profiles will solve your problem.
> > > > > > >
> > > > > > > Wayne
> > > > > > >
> > > > > > > On 9/11/07, Ritz, Martin <[EMAIL PROTECTED]> wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I have some ant targets integrated in my pom.xml.
> > > > > > > > I declared an ant build script which is therefor called
> > > > > > > > from
> > > maven.
> > > > > > > > Now I dont want to perform every ant target on
> every build.
> > > > > > > > Is there a way to call only specific
> ant-targets from the
> > > > > > > command line (maybe by calling the target or the id)?
> > > > > > > >
> > > > > > > > ---
> > > > > > > > kind regards
> > > > > > > > Martin Ritz
> > > > > > > >
> > > > > > > > > BTC AG - Unit Software Engineering
> > > > > > > > mailto:[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]
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> 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]