I am trying to create a war file whose WEBINF folder must not have any
*.properties file except for one defined by property ${config.properties}. I
searched the forum and someone had asked a similar question and the answer
was to user selectors. I tried such but with no luck. Any ideas?
<war destfile="${build.dist}/${build.war.name}"
webxml="${build.webapps.app}/WEB-INF/web.xml"
update="false"
duplicate="fail">
<fileset dir="${build.webapps.app}">
<include name="**/index.html"/>
<include name="**/status.jsp"/>
<exclude name="**/vssver2.scc"/>
</fileset>
<webinf dir="${build.webapps.app}/WEB-INF">
<exclude name="**/web.xml" />
<!-- Exclude all properties files. The following does not
work as it fails with
Class org.apache.tools.ant.types.PatternSet$NameEntry
doesn't support the nested "not" element. -->
<exclude name="*.properties">
<not>
<filename
name="${build.webapps.app}/WEB-INF/${config.properties}" />
</not>
</exclude>
<!-- Exclude all bsc.application-base.xml files -->
<exclude name="*.application-base.xml" />
<exclude name="**/vssver2.scc"/>
<include name="**" />
</webinf>
<lib dir="${build.lib}">
<!-- Exclude the Oracle JDBC Driver library -->
<exclude name="${ojdbc14.jar}" />
<!-- Exclude the Tomcat 6.0 Servlet API library -->
<exclude name="${servlet-api.jar}" />
<exclude name="**/vssver2.scc"/>
</lib>
--
View this message in context:
http://www.nabble.com/How-to-include-a-file-excluded-by-an-%22exclude%22-tp23969212p23969212.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]