• 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: 34641
363
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