You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sven Preßler <sv...@gmail.com> on 2009/10/15 12:52:40 UTC
Antrun and profiles
Hi,
I've got 2 antrun tasks: The first one should delete some files, the second
copies some files.
The copy-task is in a profile, since I don't need it every time.
However, if I need it, the configuration of the ant-tasks get merged.
Apart from the problem that the tasks get merged in the wrong order (copy
before delete, but delete is defined before copy in the pom), I want the
tasks to be executed in different phases -> so when the configuration gets
merged, both tasks get to be executed in either phase.
Is there a solution for maven 2.0.9? I remember reading some jira-Entry that
there was a problem with such kind of things, but don't remember exactly.
And does the problem still exist in newer versions of maven?
thanks,
Sven
Re: Antrun and profiles
Posted by Sven Preßler <sv...@gmail.com>.
I just found http://jira.codehaus.org/browse/MNG-1847 and
http://jira.codehaus.org/browse/MNG-1701
This doesn't solve my problem, but answers my question, I think.
--Sven
2009/10/15 Sven Preßler <sv...@gmail.com>
> Hi,
>
> I've got 2 antrun tasks: The first one should delete some files, the second
> copies some files.
> The copy-task is in a profile, since I don't need it every time.
> However, if I need it, the configuration of the ant-tasks get merged.
> Apart from the problem that the tasks get merged in the wrong order (copy
> before delete, but delete is defined before copy in the pom), I want the
> tasks to be executed in different phases -> so when the configuration gets
> merged, both tasks get to be executed in either phase.
> Is there a solution for maven 2.0.9? I remember reading some jira-Entry
> that there was a problem with such kind of things, but don't remember
> exactly.
> And does the problem still exist in newer versions of maven?
>
> thanks,
> Sven
>
Re: Antrun and profiles
Posted by Sven Preßler <sv...@gmail.com>.
2009/10/15 Jörg Schaible <jo...@gmx.de>
>
> and you can define the phase for an execution. Typically a delete task can
> be run in the "clean" phase while copy is often something
> for "generate-resources".
>
>
yes, I did that already as I saw that the above solution worked perfectly,
but thanks anyway :)
--Sven
Re: Antrun and profiles
Posted by Jörg Schaible <jo...@gmx.de>.
Sven Preßler wrote at Donnerstag, 15. Oktober 2009 13:10:
> That helped, thanks!
and you can define the phase for an execution. Typically a delete task can
be run in the "clean" phase while copy is often something
for "generate-resources".
- Jörg
>
> --Sven
>
>
> 2009/10/15 Stephen Connolly <st...@gmail.com>
>
>> put the configuration into the execution
>>
>> e.g.
>>
>> <plugin>
>> <executions>
>> <execution>
>> <configuration>
>> ..
>> <configuration>
>> <execution>
>> <executions>
>> </plugin>
>>
>> and not outside
>>
>> <plugin>
>> <executions>
>> <execution>
>> ..
>> <execution>
>> <executions>
>> <configuration>
>> ..
>> <configuration>
>> </plugin>
>>
>>
>> 2009/10/15 Sven Preßler <sv...@gmail.com>
>>
>> > Hi,
>> >
>> > I've got 2 antrun tasks: The first one should delete some files, the
>> second
>> > copies some files.
>> > The copy-task is in a profile, since I don't need it every time.
>> > However, if I need it, the configuration of the ant-tasks get merged.
>> > Apart from the problem that the tasks get merged in the wrong order
>> > (copy before delete, but delete is defined before copy in the pom), I
>> > want the tasks to be executed in different phases -> so when the
>> > configuration
>> gets
>> > merged, both tasks get to be executed in either phase.
>> > Is there a solution for maven 2.0.9? I remember reading some jira-Entry
>> > that
>> > there was a problem with such kind of things, but don't remember
>> > exactly. And does the problem still exist in newer versions of maven?
>> >
>> > thanks,
>> > Sven
>> >
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Antrun and profiles
Posted by Sven Preßler <sv...@gmail.com>.
That helped, thanks!
--Sven
2009/10/15 Stephen Connolly <st...@gmail.com>
> put the configuration into the execution
>
> e.g.
>
> <plugin>
> <executions>
> <execution>
> <configuration>
> ..
> <configuration>
> <execution>
> <executions>
> </plugin>
>
> and not outside
>
> <plugin>
> <executions>
> <execution>
> ..
> <execution>
> <executions>
> <configuration>
> ..
> <configuration>
> </plugin>
>
>
> 2009/10/15 Sven Preßler <sv...@gmail.com>
>
> > Hi,
> >
> > I've got 2 antrun tasks: The first one should delete some files, the
> second
> > copies some files.
> > The copy-task is in a profile, since I don't need it every time.
> > However, if I need it, the configuration of the ant-tasks get merged.
> > Apart from the problem that the tasks get merged in the wrong order (copy
> > before delete, but delete is defined before copy in the pom), I want the
> > tasks to be executed in different phases -> so when the configuration
> gets
> > merged, both tasks get to be executed in either phase.
> > Is there a solution for maven 2.0.9? I remember reading some jira-Entry
> > that
> > there was a problem with such kind of things, but don't remember exactly.
> > And does the problem still exist in newer versions of maven?
> >
> > thanks,
> > Sven
> >
>
Re: Antrun and profiles
Posted by Stephen Connolly <st...@gmail.com>.
put the configuration into the execution
e.g.
<plugin>
<executions>
<execution>
<configuration>
..
<configuration>
<execution>
<executions>
</plugin>
and not outside
<plugin>
<executions>
<execution>
..
<execution>
<executions>
<configuration>
..
<configuration>
</plugin>
2009/10/15 Sven Preßler <sv...@gmail.com>
> Hi,
>
> I've got 2 antrun tasks: The first one should delete some files, the second
> copies some files.
> The copy-task is in a profile, since I don't need it every time.
> However, if I need it, the configuration of the ant-tasks get merged.
> Apart from the problem that the tasks get merged in the wrong order (copy
> before delete, but delete is defined before copy in the pom), I want the
> tasks to be executed in different phases -> so when the configuration gets
> merged, both tasks get to be executed in either phase.
> Is there a solution for maven 2.0.9? I remember reading some jira-Entry
> that
> there was a problem with such kind of things, but don't remember exactly.
> And does the problem still exist in newer versions of maven?
>
> thanks,
> Sven
>