• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About ".classpath" file in the project

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Eclipse 3.0. I create a new java project. I find the Eclipse give me .classpath file. If I want to build Ant build file, how can I set property name to include that ".classpath" into my Ant file classpath?

I like Eclipse more and more.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at http://www.eclipse-plugins.info/eclipse/plugin_details.jsp?id=700
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say that the other way around is the correct one ;-) (I mean creating the .classpath out of the ant build). Why this? Ant is more spread and it is not recommended to require all the developers to use Eclipse.

just my 2c
./pope
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34654
365
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ali,
But many companies have a standard IDE. If you are using a standard IDE, it is easier to maintain the code in the IDE and just let ant do builds/integration checks.
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
Ali,
But many companies have a standard IDE. If you are using a standard IDE, it is easier to maintain the code in the IDE and just let ant do builds/integration checks.


Yep I know that. But still, Ant is a standard (and it has more chances to remain)!. An IDE adoption may change sooner or later.

./pope
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Edward Chen:
I am using Eclipse 3.0. I create a new java project. I find the Eclipse give me .classpath file. If I want to build Ant build file, how can I set property name to include that ".classpath" into my Ant file classpath?

I like Eclipse more and more.


.classpath file of eclipse project is has format data like XML file, So, i think, you can not refer to this file from ant.(build.xml).

But you can config data in build.xml to refer to all librarys in .classpath file like this ::


< !-- Set Classpath of Libraries -->

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

[ September 28, 2004: Message edited by: somkiat puisungnoen ]
[ September 28, 2004: Message edited by: somkiat puisungnoen ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ali Pope:
Yep I know that. But still, Ant is a standard (and it has more chances to remain)!. An IDE adoption may change sooner or later.


True, on the other hand the .classpath file is very simple XML and wouldn't be too hard to edit manually - not harder than any other format, I'd think.
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ilja Preuss:


True, on the other hand the .classpath file is very simple XML and wouldn't be too hard to edit manually - not harder than any other format, I'd think.


It is also easy to have it generated from the Ant (2 xmls and 1 xslt). The only problem would be that there is no standard way to create Ant build files and so a generic solution cannot be offered.

./pope
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ali Pope:
It is also easy to have it generated from the Ant (2 xmls and 1 xslt).


True, but when you do it the other way around, you also have a nice tool to maitain the file - eclipse itself...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic