• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating jar for specific files

 
Eshwin Sukhdeve
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have one lib folder in this folder it contains java files are there.i need to create the jar file for this java classes.this folder
contains one java file.I dont want to make that class as a part of jar file.

<target name="mainjar" depends="compile">
<jar destfile="ProjectSonnetTest\src\mainProject.jar"
basedir="ProjectSonnetTest\src\src\lib" excludes="ProjectSonnetTest\src\lib\TestExecute.java">
</jar>
</target>
here I am dont want to make TestExecute.java as a part fo jar file.
I am using this code.but it is creating the jar file for all java classes which is inside the src folder.

Thanks
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using this instead:

excludes="**/*.java"

or even this:

excludes="**/TestExecute.java"


Also, never use back-slashes (\) in ant scripts - they are too often interpreted as as escape characters.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic