Solved

Ant: extract from CVS and compile java code

Posted on 2009-07-14
5
369 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 500 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Delete Android all or certain applications data programmatically 9 111
jsp login check 12 53
Eclipse for Java EE development 2 43
jmeter usage 4 36
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.

749 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