Statistics
| Revision:

svn-gvsig-desktop / tags / v2_0_0_Build_2011 / build / ant-tasks / eclipse-tasks.xml @ 40002

History | View | Annotate | Download (2.36 KB)

1
<project name="gvSIG-eclipse-tasks" default="eclipse.all" 
2
        xmlns:artifact="antlib:org.apache.maven.artifact.ant">
3

    
4
        <dirname property="gvSIG-eclipse-tasks.basedir" 
5
                         file="${ant.file.gvSIG-eclipse-tasks}" />
6
        <import file="${gvSIG-eclipse-tasks.basedir}/ant-tasks-config.xml" />
7

    
8
        <description>
9
                Ant tasks and macros to interact with eclipse
10
        </description>
11
        
12
        <target name="eclipse.all" depends="eclipse.eclipse,eclipse.classpath"/>
13

    
14
        <target name="eclipse.eclipse">
15
                <maven arg="eclipse:eclipse" />
16
        </target>
17
        
18
        <target name="classpath.check">
19
            <condition property="classpath-present">
20
            <available file=".classpath"/>
21
            </condition>
22
        </target>
23

    
24
        <target name="eclipse.classpath" depends="classpath.check" if="classpath-present">
25
                <xslt in="pom.xml" out=".classpath.libs" style="${gvSIG-eclipse-tasks.basedir}/eclipse-classpath.xsl">
26
                        <outputproperty name="encoding" value="iso8859_1" />
27
                        <outputproperty name="indent" value="yes" />
28
                        <outputproperty name="method" value="txt" />
29
                </xslt>
30

    
31
                <!--
32
                <loadfile property="result01" srcFile=".classpath.libs" />
33
                <echo>After XSLT processing:
34
                        ${result01}</echo>
35
                -->
36

    
37
                <!-- Remove some uneeded text -->
38
                <replace file=".classpath.libs" value="">
39
                          <replacetoken><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>]]></replacetoken>
40
                </replace>
41
                <replace file=".classpath.libs" value="">
42
                          <replacetoken><![CDATA[<classpath>]]></replacetoken>
43
                </replace>
44
                <replace file=".classpath.libs" value="">
45
                          <replacetoken><![CDATA[<classpath/>]]></replacetoken>
46
                        <replacevalue><![CDATA[</classpath>]]></replacevalue>
47
                </replace>
48
                <replace file=".classpath.libs" value="">
49
                          <replacetoken><![CDATA[${basedir}/]]></replacetoken>
50
                </replace>
51
                <!-- Remove blanks and returns read by the xml parser into the tag content -->
52
                <replace file=".classpath.libs" value="">
53
                          <replacetoken><![CDATA[&#10;]]></replacetoken>
54
                </replace>
55
                <replace file=".classpath.libs" value="">
56
                          <replacetoken><![CDATA[&#9;]]></replacetoken>
57
                </replace>
58

    
59
                <loadfile property="result" srcFile=".classpath.libs" />
60

    
61
                <!--
62
                <echo>After removing uneeded tags:
63
                        ${result}</echo>
64
                -->
65
                
66
                <!-- Append the classpath entries to the .classpath file -->
67
                <replace file=".classpath" value="${result}">
68
                          <replacetoken><![CDATA[</classpath>]]></replacetoken>
69
                </replace>
70

    
71
                <delete file=".classpath.libs" />
72
        </target>
73

    
74
</project>