aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes automation project creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "automation project creation" Watch "automation project creation" New topic
Author

automation project creation

Anuj Troy
Ranch Hand

Joined: Apr 07, 2005
Posts: 30
hii

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

thanks
anuj


SCJP 1.4, SCWCD 1.4
your eyes cannot see what your mind does not know
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30957
    
158

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.


[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
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: automation project creation