You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mick Knutson <mi...@gmail.com> on 2007/10/05 19:17:16 UTC

{m2] Help getting with ant plugin

I am trying to add a <filter> to my ant task:

                                <tasks>
                                    <ant
antfile="${projectRoot}/tools/build-tools/src/main/resources/bpel/common-
build.xml"
                                         inheritRefs="true">
                                        <property name="env.BPEL_HOME"
value="${bpel.home}"/>
                                        <property name="rev" value="${
project.version}"/>
                                        <property name="projectRoot"
value="${projectRoot}"/>
                                        <filter
filtersfile="${project.root}/src/main/filters/filter.properties"
/>
                                        <target name="compile"/>
                                    </ant>
                                </tasks>

But I keep getting this error:

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: The <ant> type doesn't support the nested "filter" element.
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant
tasks

-- 

Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/djmick_dot_com
http://www.myspace.com/sexybeotches
http://www.thumpradio.com
---

Re: {m2] Help getting with ant plugin

Posted by Mick Knutson <mi...@gmail.com>.
Thanks.

On 10/5/07, Dennis Lundberg <de...@apache.org> wrote:
>
> The filter ant task [1] is a task on its own. So it should be on the
> same level as your ant task.
>
> <filter filtersfile="${project.root}/src/main/filters/filter.properties"/>
> <ant
> antfile="${projectRoot}/tools/build-tools/src/main/resources/bpel/common-
> build.xml"
> inheritRefs="true">
>    <property name="env.BPEL_HOME" value="${bpel.home}"/>
>    <property name="rev" value="${project.version}"/>
>    <property name="projectRoot" value="${projectRoot}"/>
> </ant>
>
> Then you need to add filtering="true" to the tasks in your ant file that
> needs filtering.
>
> [1] http://ant.apache.org/manual/CoreTasks/filter.html
>
> Mick Knutson wrote:
> > So, if I have a build.xml that:
> >
> > <project name="bpel.deploy" default="deploy" basedir=".">
> >     <filter filtersfile="${project.root
> }/src/main/filters/filter.properties"
> > />
> >     <import file="${project.root
> > }/tools/build-tools/src/main/resources/bpel/common-build.xml"/>
> > .....
> >
> >
> >
> > How do I accomplish this in my maven antrun section? I need to define an
> > external filter to my common-build.xml
> >
> >
> >
> >
> > On 10/5/07, Tim Kettler <ti...@udo.edu> wrote:
> >> Hi,
> >>
> >> looking at the tasks documentation [1], it seems that the task just
> >> doen't support the nested <filter/> element.
> >>
> >> -Tim
> >>
> >> [1] http://ant.apache.org/manual/CoreTasks/ant.html
> >>
> >> Mick Knutson schrieb:
> >>> I am trying to add a <filter> to my ant task:
> >>>
> >>>                                 <tasks>
> >>>                                     <ant
> >>>
> >>
> antfile="${projectRoot}/tools/build-tools/src/main/resources/bpel/common-
> >>> build.xml"
> >>>                                          inheritRefs="true">
> >>>                                         <property name="env.BPEL_HOME"
> >>> value="${bpel.home}"/>
> >>>                                         <property name="rev" value="${
> >>> project.version}"/>
> >>>                                         <property name="projectRoot"
> >>> value="${projectRoot}"/>
> >>>                                         <filter
> >>> filtersfile="${project.root}/src/main/filters/filter.properties"
> >>> />
> >>>                                         <target name="compile"/>
> >>>                                     </ant>
> >>>                                 </tasks>
> >>>
> >>> But I keep getting this error:
> >>>
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [ERROR] BUILD ERROR
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [INFO] Error executing ant tasks
> >>>
> >>> Embedded error: The <ant> type doesn't support the nested "filter"
> >> element.
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [DEBUG] Trace
> >>> org.apache.maven.lifecycle.LifecycleExecutionException: Error
> executing
> >> ant
> >>> tasks
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
>
>
> --
> Dennis Lundberg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 

Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/djmick_dot_com
http://www.myspace.com/sexybeotches
http://www.thumpradio.com
---

Re: {m2] Help getting with ant plugin

Posted by Dennis Lundberg <de...@apache.org>.
The filter ant task [1] is a task on its own. So it should be on the 
same level as your ant task.

<filter filtersfile="${project.root}/src/main/filters/filter.properties"/>
<ant 
antfile="${projectRoot}/tools/build-tools/src/main/resources/bpel/common-build.xml" 
inheritRefs="true">
   <property name="env.BPEL_HOME" value="${bpel.home}"/>
   <property name="rev" value="${project.version}"/>
   <property name="projectRoot" value="${projectRoot}"/>
</ant>

Then you need to add filtering="true" to the tasks in your ant file that 
needs filtering.

[1] http://ant.apache.org/manual/CoreTasks/filter.html

Mick Knutson wrote:
> So, if I have a build.xml that:
> 
> <project name="bpel.deploy" default="deploy" basedir=".">
>     <filter filtersfile="${project.root}/src/main/filters/filter.properties"
> />
>     <import file="${project.root
> }/tools/build-tools/src/main/resources/bpel/common-build.xml"/>
> .....
> 
> 
> 
> How do I accomplish this in my maven antrun section? I need to define an
> external filter to my common-build.xml
> 
> 
> 
> 
> On 10/5/07, Tim Kettler <ti...@udo.edu> wrote:
>> Hi,
>>
>> looking at the tasks documentation [1], it seems that the task just
>> doen't support the nested <filter/> element.
>>
>> -Tim
>>
>> [1] http://ant.apache.org/manual/CoreTasks/ant.html
>>
>> Mick Knutson schrieb:
>>> I am trying to add a <filter> to my ant task:
>>>
>>>                                 <tasks>
>>>                                     <ant
>>>
>> antfile="${projectRoot}/tools/build-tools/src/main/resources/bpel/common-
>>> build.xml"
>>>                                          inheritRefs="true">
>>>                                         <property name="env.BPEL_HOME"
>>> value="${bpel.home}"/>
>>>                                         <property name="rev" value="${
>>> project.version}"/>
>>>                                         <property name="projectRoot"
>>> value="${projectRoot}"/>
>>>                                         <filter
>>> filtersfile="${project.root}/src/main/filters/filter.properties"
>>> />
>>>                                         <target name="compile"/>
>>>                                     </ant>
>>>                                 </tasks>
>>>
>>> But I keep getting this error:
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Error executing ant tasks
>>>
>>> Embedded error: The <ant> type doesn't support the nested "filter"
>> element.
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [DEBUG] Trace
>>> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing
>> ant
>>> tasks
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: {m2] Help getting with ant plugin

Posted by Mick Knutson <mi...@gmail.com>.
So, if I have a build.xml that:

<project name="bpel.deploy" default="deploy" basedir=".">
    <filter filtersfile="${project.root}/src/main/filters/filter.properties"
/>
    <import file="${project.root
}/tools/build-tools/src/main/resources/bpel/common-build.xml"/>
.....



How do I accomplish this in my maven antrun section? I need to define an
external filter to my common-build.xml




On 10/5/07, Tim Kettler <ti...@udo.edu> wrote:
>
> Hi,
>
> looking at the tasks documentation [1], it seems that the task just
> doen't support the nested <filter/> element.
>
> -Tim
>
> [1] http://ant.apache.org/manual/CoreTasks/ant.html
>
> Mick Knutson schrieb:
> > I am trying to add a <filter> to my ant task:
> >
> >                                 <tasks>
> >                                     <ant
> >
> antfile="${projectRoot}/tools/build-tools/src/main/resources/bpel/common-
> > build.xml"
> >                                          inheritRefs="true">
> >                                         <property name="env.BPEL_HOME"
> > value="${bpel.home}"/>
> >                                         <property name="rev" value="${
> > project.version}"/>
> >                                         <property name="projectRoot"
> > value="${projectRoot}"/>
> >                                         <filter
> > filtersfile="${project.root}/src/main/filters/filter.properties"
> > />
> >                                         <target name="compile"/>
> >                                     </ant>
> >                                 </tasks>
> >
> > But I keep getting this error:
> >
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Error executing ant tasks
> >
> > Embedded error: The <ant> type doesn't support the nested "filter"
> element.
> > [INFO]
> > ------------------------------------------------------------------------
> > [DEBUG] Trace
> > org.apache.maven.lifecycle.LifecycleExecutionException: Error executing
> ant
> > tasks
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 

Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/djmick_dot_com
http://www.myspace.com/sexybeotches
http://www.thumpradio.com
---

Re: {m2] Help getting with ant plugin

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

looking at the tasks documentation [1], it seems that the task just 
doen't support the nested <filter/> element.

-Tim

[1] http://ant.apache.org/manual/CoreTasks/ant.html

Mick Knutson schrieb:
> I am trying to add a <filter> to my ant task:
> 
>                                 <tasks>
>                                     <ant
> antfile="${projectRoot}/tools/build-tools/src/main/resources/bpel/common-
> build.xml"
>                                          inheritRefs="true">
>                                         <property name="env.BPEL_HOME"
> value="${bpel.home}"/>
>                                         <property name="rev" value="${
> project.version}"/>
>                                         <property name="projectRoot"
> value="${projectRoot}"/>
>                                         <filter
> filtersfile="${project.root}/src/main/filters/filter.properties"
> />
>                                         <target name="compile"/>
>                                     </ant>
>                                 </tasks>
> 
> But I keep getting this error:
> 
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
> 
> Embedded error: The <ant> type doesn't support the nested "filter" element.
> [INFO]
> ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant
> tasks
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org