• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

automation project creation

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 41184
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 25780
184
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic