Hi Chris

Had my first go at the lists, but hasn't been very lucky there :(

I first tried this:
<ant antfile="build/ant-build.xml" dir="${basedir}" inheritRefs="true">
        <target name="generate-sources"/>
</ant>

It didn't work, so now I'm directly embedding my ant script inside the 
pom.xml. Which is:
                                                        <tasks >
 
                                                                <scriptdef 
name="lc" language="javascript">
                                                                        
<attribute name="property"/>
                                                                        
<attribute name="value"/>
        .setNewProperty(attributes.get("property"),
        .get("value").toLowerCase());
                                                                </scriptdef>
                                                                <basename 
property="gw.name" file="${basedir}"/>
                                                                <lc 
property="gw.name.lc" value="${gw.name}"/>
                                                                
<echo>gw.name=${gw.name}</echo>
                                                                
<echo>gw.name.lc=${gw.name.lc}</echo>
                                                                
<echo>filtering...</echo>
                                                                <fileset 
dir="${basedir}"/>
                                                                <filterset>
                                                                        <filter 
token="CLIENT_NAME" value="${gw.name}"/>
                                                                        <filter 
token="client_name" value="${gw.name.lc}"/>
                                                                        <filter 
token="basedir" value="${basedir}"/>
                                                                        <filter 
token="env" value="${env}"/>
                                                                </filterset>
                                                                <mapper 
type="regexp" from="(.*)_GW(.*)\.(.*)" to="\1${gw.name}_GW\2.\3"/>
                                                                
<echo>filetering complete.</echo>
                                                        </tasks>



The ant script is tested and works well standalone. 

Much appreciate your help.

Hassan












Chris Berry <[EMAIL PROTECTED]>
10/01/2006 15:37
Please respond to "Maven Users List"

 
        To:     Maven Users List <users@maven.apache.org>
        cc: 
        Subject:        Re: Maven 2 and Ant classpath issue


Hassan,
Please search the list archives -- this has been covered many times
recently.
If that doesn't answer your question, then please post the POM snippet 
that
shows the ant call. (You may have forgotten inheritRefs="true")
Cheers,
-- Chris

On 1/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
> Hi
>
> I'm using Maven 2.0.1 and trying to use a non-standard Ant task
> (scriptdef), in my pom.xml. It's giving me
> this error:
> Embedded error: Could not create task or type of type: scriptdef.
>
> Looks like the Maven classpath is not being used by Ant...
>
> Just to confirm, I have the required dependency jar in my pom.xml:
>                 <dependency>
>                         <groupId>bsf</groupId>
>                         <artifactId>bsf</artifactId>
>                         <version>2.3.0</version>
>                 </dependency>
>
>
>
> Your help is highly highly appreciated.
> Thanks
> Haz
>


Reply via email to