This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes creating subfolders in eclipse using ANT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "creating subfolders in eclipse using ANT" Watch "creating subfolders in eclipse using ANT" New topic
Author

creating subfolders in eclipse using ANT

Eshwin Sukhdeve
Ranch Hand

Joined: Mar 15, 2012
Posts: 80
Hi,
here is my build.xml file.in this file I am getting the project form VSS.so I am getting the complete sturcture of my project
in my local system succesfully.and using ANT only i am creating some folders(classes,jar,src).this is fine
after that when I take this build.xml file in eclipse using new->project->get existing build.xml..then i get
my complete project folder in eclipse.but the problem is as soon as i get in eclipse .inside the classes folder
it is again creating the project folders.which i dont want.it is happning when I am taking from eclipse.
(the folders which is creating inside the classes these are those files only which i am getting from vss)

here is my build.xml file

<?xml version="1.0" encoding="UTF-8"?>
<project name="sonnetframwwork2"
xmlns:vss="antlibrg.apache.ant.vss" basedir="." >
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
<!--ANT 1.7 is required
-->
<property environment="env."/>
<property name="env.CLASSPATH" value=""/>
<property name="build_dir" location="src/classes/testscripts"/>
<property name="testdata" location="src/testdata"/>
<property name="main-class" location="src/testscripts/TestExecute"/>

<target name="prepare">
<vssget localPath="Project13\src"
recursive="true"
vsspath="$/FunctionalAuto/ExcelBased"
login="eshwin.s,Eshu@123"
serverPath="\\blrbg1fsr001\\Testing Practice\\Testingpractice_vss"
ssdir="C:\\Program Files\\Microsoft Visual Studio\\VSS\\win32"
writable="false"/>
</target>

<path id="project.classpath">
<pathelement location="Project13/src/classes"/>
<fileset dir="Project13/src/references">
<include name="*.jar"/>
<include name="*.class"/>
</fileset>
</path>

<target name="create">
<mkdir dir="Project13\src"/>
<mkdir dir="Project13\src\classes"/>
<mkdir dir="Project13\src\jar"/>
</target>
<target name="compile">
<javac destdir="Project13\src\classes" debug="true" srcdir="Project13\src">
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="mainjar">
<jar destfile="Project13\src\jar\mainProject.jar"
basedir="Project13\src\testscripts">
<manifest>
<attribute name="Main-Class" value="testscripts.TestExecute"/>
</manifest>
</jar>
</target>
<target name="jar" depends="compile">
<jar destfile="Project13\src\jar\SahiProject.jar"
basedir="classes">
</jar>
</target>

<target name="run">
<java classname="testscripts.TestExecute"/>
<classpath refid="project.classpath">
</classpath>
</target>
</project>

 
Consider Paul's rocket mass heater.
 
subject: creating subfolders in eclipse using ANT
 
Similar Threads
ANT classpath
Problem in creating a automatic build using java , batch(.bat) file .
import the java project using ANT in eclipse
Defining Ant build.xml java properties files for a run targer
Ant error: Make sure you have it in you classpath