root / branches / v2_0_0_prep / extensions / org.gvsig.mkmvnproject / src / main / resources / scripts / fortunecookies.xml @ 38075
History | View | Annotate | Download (5.29 KB)
1 |
<?xml version="1.0" encoding="ISO-8859-1"?>
|
---|---|
2 |
<project name="gvSIG-make-maven-project" default="mkproject-build-basic" basedir="."> |
3 |
|
4 |
<!-- Get current file location folder -->
|
5 |
<dirname property="gvSIG-make-maven-project.basedir" file="${ant.file.gvSIG-make-maven-project}" /> |
6 |
|
7 |
<!-- Libraries folder in the gvSIG extension -->
|
8 |
<property name="lib.folder" location="${gvSIG-make-maven-project.basedir}/../lib" /> |
9 |
<!-- Templates folder in the gvSIG extension -->
|
10 |
<property name="templates.folder" location="${gvSIG-make-maven-project.basedir}/../templates" /> |
11 |
|
12 |
<property name="gvsiglogo" location="${basedir}/../gvSIG.png" /> |
13 |
|
14 |
<!-- Load some ant external utility tasks -->
|
15 |
<property name="antform.lib" location="${lib.folder}/antform-2.0.jar" /> |
16 |
<property name="antcontrib.lib" location="${lib.folder}/ant-contrib-1.0b3.jar" /> |
17 |
<property name="antelope.lib" location="${lib.folder}/antelopetasks-3.2.10.jar" /> |
18 |
|
19 |
<taskdef resource="net/sf/antcontrib/antlib.xml"> |
20 |
<classpath>
|
21 |
<pathelement location="${antcontrib.lib}" /> |
22 |
</classpath>
|
23 |
</taskdef>
|
24 |
|
25 |
<taskdef name="antform" classname="com.sardak.antform.AntForm" classpath="${antform.lib}" /> |
26 |
|
27 |
<taskdef name="antmenu" classname="com.sardak.antform.AntMenu" classpath="${antform.lib}" /> |
28 |
|
29 |
<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" classpath="${antelope.lib}" /> |
30 |
|
31 |
<target name="mkproject-build-cancelled"> |
32 |
<antform title="Project creation cancelled" width="${form.width}" image="${gvsiglogo}"> |
33 |
<textProperty label="" editable="false" columns="40" property="form.title" /> |
34 |
<label>Creation cancelled.</label> |
35 |
<separator /> |
36 |
<controlbar>
|
37 |
<button type="cancel" label=" Close " /> |
38 |
</controlbar>
|
39 |
</antform>
|
40 |
</target>
|
41 |
|
42 |
<target name="mkproject-build-basic"> |
43 |
<antcall target="mkproject-build"> |
44 |
<param name="project.type" value="1" /> |
45 |
</antcall>
|
46 |
</target>
|
47 |
|
48 |
<target name="mkproject-build-provider"> |
49 |
<antcall target="mkproject-build"> |
50 |
<param name="project.type" value="2" /> |
51 |
</antcall>
|
52 |
</target>
|
53 |
|
54 |
<target name="mkproject-build"> |
55 |
<echo>
|
56 |
Project name: "${project.name}" |
57 |
Project name capitalized: "${project.name.capitalized}" |
58 |
Project name lowercase: ${project.name.lowercase}" |
59 |
Group id: "${project.group.id}" |
60 |
ArtifactId: "${project.artifact.id}" |
61 |
Project folder: "${project.folder}" |
62 |
Project type: "${project.type}" |
63 |
</echo>
|
64 |
|
65 |
<if>
|
66 |
<equals arg1="${project.type}" arg2="1" /> |
67 |
<then>
|
68 |
<echo>Unzipping the basic template project</echo> |
69 |
<unzip src="${templates.folder}/fortunecookies-basic.zip" dest="${project.folder}" /> |
70 |
</then>
|
71 |
<else>
|
72 |
<echo>Unzipping the provider based implementation template project</echo> |
73 |
<unzip src="${templates.folder}/fortunecookies-pbi.zip" dest="${project.folder}" /> |
74 |
</else>
|
75 |
</if>
|
76 |
|
77 |
<!-- Calculate the project artifact id as PATH -->
|
78 |
<propertyregex property="project.artifact.id.folder" input="${project.artifact.id}" regexp="([^\.]*).([^\.]*)" replace="\1${file.separator}\2" /> |
79 |
|
80 |
<echo>Renaming folder ${project.folder}/org.gvsig.fortunecookies to
|
81 |
${project.folder}/${project.artifact.id}</echo>
|
82 |
<move todir="${project.folder}"> |
83 |
<fileset dir="${project.folder}"> |
84 |
<include name="org.gvsig.fortunecookies/**" /> |
85 |
<include name="org.gvsig.fortunecookies.app/**" /> |
86 |
</fileset>
|
87 |
<mapper>
|
88 |
<filtermapper>
|
89 |
<replacestring from="org.gvsig.fortunecookies" to="${project.artifact.id}" /> |
90 |
<replacestring from="org${file.separator}gvsig${file.separator}fortunecookies" to="${project.artifact.id.folder}" /> |
91 |
<replacestring from="FortuneCookie" to="${project.name.capitalized}" /> |
92 |
</filtermapper>
|
93 |
</mapper>
|
94 |
<filterchain>
|
95 |
<tokenfilter>
|
96 |
<!-- Replace fortune cookie server url as it contains the FortuneCookie word in it. -->
|
97 |
<replacestring from="http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx/GetFortuneCookie" to="FC_URL_TO_PRESERVE" /> |
98 |
</tokenfilter>
|
99 |
<tokenfilter>
|
100 |
<replacestring from="org.gvsig.fortunecookies" to="${project.artifact.id}" /> |
101 |
</tokenfilter>
|
102 |
<tokenfilter>
|
103 |
<replacestring from="FortuneCookies" to="${project.name.capitalized}" /> |
104 |
<replacestring from="Fortune Cookies" to="${project.name.capitalized}" /> |
105 |
<replacestring from="Fortune cookies" to="${project.name.capitalized}" /> |
106 |
<replacestring from="fortune cookies" to="${project.name.capitalized}" /> |
107 |
<replacestring from="gvsig-fortunecookies" to="gvsig-${project.name.lowercase}" /> |
108 |
<replacestring from="fortunecookies" to="${project.name.capitalized}" /> |
109 |
</tokenfilter>
|
110 |
<tokenfilter>
|
111 |
<replacestring from="FortuneCookie" to="${project.name.capitalized}" /> |
112 |
<replacestring from="Fortune Cookie" to="${project.name.capitalized}" /> |
113 |
<replacestring from="Fortune cookie" to="${project.name.capitalized}" /> |
114 |
<replacestring from="fortune cookie" to="${project.name.capitalized}" /> |
115 |
<replacestring from="gvsig-fortunecookie" to="gvsig-${project.name.lowercase}" /> |
116 |
<replacestring from="fortunecookie" to="${project.name.capitalized}" /> |
117 |
</tokenfilter>
|
118 |
<tokenfilter>
|
119 |
<!-- Restore the fortune cookie server URL -->
|
120 |
<replacestring from="FC_URL_TO_PRESERVE" to="http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx/GetFortuneCookie" /> |
121 |
</tokenfilter>
|
122 |
</filterchain>
|
123 |
</move>
|
124 |
|
125 |
</target>
|
126 |
|
127 |
|
128 |
</project>
|