This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between fileset and pathelement

 
Kanapathipillai Senthuran
Greenhorn
Posts: 1
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody please explain the difference between pathelement and fileset in ant script?

I saw some ant script examples where they use both pathelement and fileset to include the jars and class files in class path.


<path id="classpath">
<fileset dir="${lib}">
<include name="*.jar" />
</fileset>

<pathelement path="${tomcat.lib}/servlet-api.jar" />
<pathelement path="${build}" />
</path>

Note: All the class files are located in build folder.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A fileset lets you search/accumulate things into one reference. A path element is one "thing." That think may be one file or a whole path. But it doesn't do wildcards like fileset does.

This is explained fairly well in path like structures.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic