• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

automation project creation  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hii

i want to use ant to create a project in eclipse or netwever!! does anyone know how to do that?

thanks
anuj
 
author & internet detective
Posts: 39285
727
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anuj,
I don't know about NetWeaver, so I'll speak to Eclipse.

Basically, you have two choices:
1) Write a build file to create an Eclipse project - a directory containing a .project file with certain contents, a .classpath file with certain contents (if it is a Java project), and a source code directory (if it is a Java project)
2) Use the Ant tasks that come with Eclipse to create a new project.

If you want to import the project into a workspace, you need to use another Eclipse Ant task to do so.

What are you trying to accomplish? This might be overkill for your needs.
 
Bartender
Posts: 20765
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Eclipse, if you have a project directory containing an existing Ant project, just use the IDE to create a new java project, but instead of letting the IDE create a project directory, indicate that the project's directory is the ant project directory.

Or copy the ant project directory into your Eclipse workspace directory (CVS checkout is fine, too). Then create a new Eclipse project with exactly the same name - including upper/lower case - as the ant project directory.

When Eclipse builds a project based on existing source, it will search for source directories, etc. and set them up in the project automatically. My version of Eclipse also has a "Create from Ant" option, but I'm not sure if that's part of the basic Eclipse 3.2 release or not - I've got a few plugins.

So the answer is: You don't really need Ant to create an Eclipse project, but if you have an Ant-based project, Eclipse will happily import it for you, and then you can build using Eclipse and/or Ant as it suits you.

---

Now Maven is a different story. If you drop into an Maven project directory and execute the "eclipse:eclipse" goal, Maven will build the Eclipse .project and .classpath files based on the POM. Or, if you're an IntelliJ fan , use the "idea:idea" goal.
 
That new kid is a freak. Show him this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!