?
Solved

Ant: extract from CVS and compile java code

Posted on 2009-07-14
5
Medium Priority
?
373 Views
Last Modified: 2013-11-25
I have  a folder called "custom" in CVS which has the following hierarchy

custom -> src
custom -> jsp
custom-> xsl
custom -> classes
....

Can someone please let me know how I can use ant script to extract the "custom" folder from CVS. After that using ant I need to build the java files inside "custom--> src" and put the compiled classes inside "custom -> classes".

thank you
0
Comment
Question by:ank9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 24856715
0
 
LVL 20

Expert Comment

by:a_b
ID: 24856780
You cannot 'extarct' it from CVS, you need to check out the directory and then write an ant file to run there.
Here is are some sample ant commandds to get you started, you will have to tune them as you progress to your needs -

<target name="compile">
      <javac srcdir="src direcory" destdir="destination direcotyr  includes="files to include"
         excludes="files to exclude">        
         <compilerarg value="args" />          
        <classpath refid="classpath" />            
     </javac>      
  </target>

<target name="create.jar" description="Test.jar">
            <jar destfile="Test.jar">
                  <zipfileset dir="..Specify" includes="Specify package names to be included here" />
            </jar>
</target>
0
 
LVL 6

Expert Comment

by:jwenting
ID: 24857522
You can actually have an ANT target extract things from version control.
See the specified sample file above, which contains just such a target.
0
 

Author Comment

by:ank9
ID: 24857999
Thanks for replying.

I am using the following target

 <target name="moveJarToAppServer" >
   <move todir="{$appserver.webappname}/WEB-INF/lib"  verbose="true" >
    <fileset dir="${install.jar}">
        <include name="**/*" />
    </fileset>
   </move>
 </target>

This does not do anything. Is there a way to find out if all the paths etc are correct? May be by putting some print statements. Something similar to System.out.print() in Java.

Please let me know how this can be done.

Thank you



0
 
LVL 92

Expert Comment

by:objects
ID: 24858032
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month11 days, 1 hour left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question