Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

filterina a file using in jar -> metainf task

Dimitris Mouchritsas

2010-02-02

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi all,
is it possible to use a filter in the metainf task of jar task?
Currently my build file is like this:
  <target name="domain-dist" description="Build the distribution jar"
        depends="domain-test">
     <jar destfile="${dist.prepare.dir}/${domain.artifact.name}"
        basedir="${classes.dir}">
        <patternset refid="domain.classes.pattern" />
        <metainf dir="${etc.dir}/domain/META-INF" />
      </jar>
  </target>

In etc/domain/META-INF I have the persistence.xml file for my entity
beans and I would like to be able to pass the datasource name through a
filter (or a property?)
e.g. original file:
<jta-data-source>java:jdbc/@ds.name@(protected)>
desired file:
<jta-data-source>java:jdbc/projectDS</jta-data-source>

Is this possible or I have to use <copy> task?

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.