Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

About ".classpath" file in the project

 
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.
 
author
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
 
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
 
author & internet detective
Posts: 40200
816
Eclipse IDE VI Editor Java
  • 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
 
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
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
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...
 
To avoid criticism do nothing, say nothing, be nothing. -Elbert Hubbard. Please critique this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic