• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

automation project creation

 
Anuj Troy
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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34669
367
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic