You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Smiley <ds...@mitre.org> on 2001/12/31 16:35:53 UTC

How to delete .# files with Ant

I tried searching the list for an answer beforehand but had difficulty
becuase I can't search for ".#".

I made patternset that should select all junk temp files in my project.
Here it is:

 <!-- specify junk -->
 <patternset id="junk" >

  <include name="temp/**"/>
  <!-- generated by Resin -->
  <include name="WEB-INF/work/**"/>
  <include name="WEB-INF/tmp/**"/>
  <!-- generated by CVS -->
  <include name="**/.#*"/>
  <!-- misc -->
  <include name="**/*.log"/>
  <include name="**/*.bak"/>
 </patternset>

Unfortunately, the <include name="**/.#*"/> does not work at all.  I have
all these .# files littered around that are named something like:
".#portlet.jsp.1.19"  for example.  I think CVS is generating them.  What is
wrong here?

Thanks.

~ Dave Smiley



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Creating a manifest from a build.xml file

Posted by Scott Ellsworth <sc...@alodar.com>.
Hi, all.

If the property "manifest.main-class" is set, I want my jar to have 
that class specified in the Main-Class section of its manifest. 
Otherwise, I want it to just have the usual default manifest built.

Currently, my jar is build via:
   <target name="dist-debug" depends="compile-debug" 
description="Build debug jar">
     <jar
       jarfile="${dist}/${baseJarName}-${DSTAMP}-debug.jar"
       basedir="${build-debug}"
     />
   </target>

I believe the following will work to create the manifest if I always 
know that the property manifest.main.class is set

   <property name="manifest.file" value="manifest.mf"/>
   <property name="manifest.main.class" value="org.foo.dosomething"/>

   <target name="dist-debug-manifest" depends="compile-debug" 
description="Build debug jar with manifest">
     <jar
       jarfile="${dist}/${baseJarName}-${DSTAMP}-debug.jar"
       basedir="${build-debug}">
       <manifest>
         <attribute name="Main-Class" value="${manifest.main-class}"/>
       </manifest>
     </jar>
   </target>

I am not sure how to have the <manifest> section only happen if there 
is actually a manifest.

Does anyone else create a manifest on the fly this way?

Scott
-- 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to delete .# files with Ant

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
set defaultexcludes="false"

Ant has a builtin list of exclusions that apply to all filesets unless
explicitly turned off, and the pattern you have trouble with is one of
these.

See http://jakarta.apache.org/ant/manual/dirtasks.html for more details.

    Erik


----- Original Message -----
From: "David Smiley" <ds...@mitre.org>
To: <an...@jakarta.apache.org>
Sent: Monday, December 31, 2001 10:35 AM
Subject: How to delete .# files with Ant


> I tried searching the list for an answer beforehand but had difficulty
> becuase I can't search for ".#".
>
> I made patternset that should select all junk temp files in my project.
> Here it is:
>
>  <!-- specify junk -->
>  <patternset id="junk" >
>
>   <include name="temp/**"/>
>   <!-- generated by Resin -->
>   <include name="WEB-INF/work/**"/>
>   <include name="WEB-INF/tmp/**"/>
>   <!-- generated by CVS -->
>   <include name="**/.#*"/>
>   <!-- misc -->
>   <include name="**/*.log"/>
>   <include name="**/*.bak"/>
>  </patternset>
>
> Unfortunately, the <include name="**/.#*"/> does not work at all.  I have
> all these .# files littered around that are named something like:
> ".#portlet.jsp.1.19"  for example.  I think CVS is generating them.  What
is
> wrong here?
>
> Thanks.
>
> ~ Dave Smiley
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>