wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Difference between fileset and pathelement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Difference between fileset and pathelement" Watch "Difference between fileset and pathelement" New topic
Author

Difference between fileset and pathelement

Kanapathipillai Senthuran
Greenhorn

Joined: Dec 20, 2012
Posts: 1

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.



Thanks & Regards,
K.Senthuran
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between fileset and pathelement
 
Similar Threads
Problem including external jar to build.xml file Ant
ANT and JUnit fork problem
Automated Regression Testing suite
/build.xml:372: java.net.UnknownHostException: root +ant
JAX-WS create server and client jar in one build pass (ant)