svn-gvsig-desktop / branches / v2_0_0_prep / build / ant-tasks / maven-goals.xml @ 39889
History | View | Annotate | Download (7.03 KB)
1 |
<project name="gvSIG-maven-goals" default="mvn-install"> |
---|---|
2 |
|
3 |
<dirname property="gvSIG-maven-goals.basedir" |
4 |
file="${ant.file.gvSIG-maven-goals}" /> |
5 |
<import file="${gvSIG-maven-goals.basedir}/ant-tasks-config.xml" /> |
6 |
<import file="${gvSIG-maven-goals.basedir}/eclipse-tasks.xml" /> |
7 |
|
8 |
<description>
|
9 |
Ant tasks and macros to interact with maven |
10 |
</description>
|
11 |
|
12 |
<target name="mvn-clean" description="Cleans all artifacts"> |
13 |
<maven arg="clean" /> |
14 |
</target>
|
15 |
|
16 |
<target name="mvn-compile" description="Compiles all source code"> |
17 |
<svn><info path=".."/></svn> |
18 |
<echo>svn: ${svn.info.repositoryRootUrl} rev ${svn.info.revision}</echo> |
19 |
<maven arg="compile" /> |
20 |
</target>
|
21 |
|
22 |
<target name="mvn-test" description="Launches unit tests"> |
23 |
<maven arg="test" /> |
24 |
</target>
|
25 |
|
26 |
<target name="mvn-install" description="Compiles and installs"> |
27 |
<svn><info path=".."/></svn> |
28 |
<echo>svn: ${svn.info.repositoryRootUrl} rev ${svn.info.revision}</echo> |
29 |
<maven arg="install" /> |
30 |
</target>
|
31 |
|
32 |
<target name="mvn-create-installer" |
33 |
description="Compiles and generates an installer if the project is a gvSIG plugin"> |
34 |
<maven arg="-P create-installer install" /> |
35 |
</target>
|
36 |
|
37 |
<target name="mvn-create-installer-linux" description="Compiles and generates an installer for linux, if the plugin uses native libraries"> |
38 |
<maven.lin arg="-P create-installer install" /> |
39 |
</target>
|
40 |
|
41 |
<target name="mvn-create-installer-windows" description="Compiles and generates an installer for windows, if the plugin uses native libraries"> |
42 |
<maven.win arg="-P create-installer install" /> |
43 |
</target>
|
44 |
|
45 |
<target name="mvn-install-ignore-tests" description="Compiles and installs and ignore tests"> |
46 |
<svn><info path=".."/></svn> |
47 |
<echo>svn: ${svn.info.repositoryRootUrl} rev ${svn.info.revision}</echo> |
48 |
<maven arg="install -Dmaven.test.failure.ignore" /> |
49 |
</target>
|
50 |
|
51 |
<target name="mvn-install-without-tests" |
52 |
description="Compiles and installs without launching tests"> |
53 |
<svn><info path=".."/></svn> |
54 |
<echo>svn: ${svn.info.repositoryRootUrl} rev ${svn.info.revision}</echo> |
55 |
<maven arg="-Dmaven.test.skip=true install" /> |
56 |
</target>
|
57 |
|
58 |
<target name="mvn-reinstall" |
59 |
description="Performs a clean install"> |
60 |
<svn><info path=".."/></svn> |
61 |
<echo>svn: ${svn.info.repositoryRootUrl} rev ${svn.info.revision}</echo> |
62 |
<maven arg="clean install" /> |
63 |
</target>
|
64 |
|
65 |
<target name="mvn-reinstall-without-tests" |
66 |
description="Performs a clean install without launching tests"> |
67 |
<svn><info path=".."/></svn> |
68 |
<echo>svn: ${svn.info.repositoryRootUrl} rev ${svn.info.revision}</echo> |
69 |
<maven arg="-Dmaven.test.skip=true clean install" /> |
70 |
</target>
|
71 |
|
72 |
<target name="mvn-dependency-tree" |
73 |
description="Creates a text tree with the project dependencies"> |
74 |
<maven arg="dependency:tree" /> |
75 |
</target>
|
76 |
|
77 |
<target name="mvn-deploy" |
78 |
description="Compiles, installs and deploys"> |
79 |
<maven arg="deploy" /> |
80 |
</target>
|
81 |
|
82 |
<target name="release.get.params"> |
83 |
<!-- Default values -->
|
84 |
<property name="svn.username" value="${user.name}"/> |
85 |
|
86 |
<readpom/> |
87 |
<property name="svn.tag" value="${mypom.version}"/> |
88 |
<propertyregex property="svn.tag" input="${svn.tag}" |
89 |
regexp="(.*)-SNAPSHOT" select="\1" casesensitive="false" override="true" /> |
90 |
|
91 |
<antform title="Release parameters" image="${gvsiglogo}" resetMessage="Cancel" |
92 |
previousTarget="cancel"> |
93 |
|
94 |
<label>Set the values needed to perform the release.</label> |
95 |
|
96 |
<textProperty label="SVN user name: " property="svn.username" |
97 |
password="false" /> |
98 |
<textProperty label="SVN user password: " property="svn.password" |
99 |
password="true" /> |
100 |
<textProperty label="SVN tag: " property="svn.tag" |
101 |
password="false" /> |
102 |
<textProperty label="Next development version: " |
103 |
property="developmentVersion" |
104 |
password="false" /> |
105 |
<label>
|
106 |
Note: |
107 |
Don't include the suffix "-SNAPSHOT" in the development version, |
108 |
it will be automatically included where needed. |
109 |
</label>
|
110 |
</antform>
|
111 |
</target>
|
112 |
|
113 |
<target name="mvn-release-prepare-perform" depends="release.get.params" description="Prepares and performs (tag, version upgrade and deploys) a new release of the project"> |
114 |
<echo>mvn release:clean release:prepare release:perform -DpreparationGoals='clean install' -Dusername=${svn.username} -Dpassword=******* -Dtag=${svn.tag} -DdevelopmentVersion=${developmentVersion}-SNAPSHOT</echo> |
115 |
<maven arg="release:clean release:prepare release:perform -DpreparationGoals='clean install' -Dusername=${svn.username} -Dpassword=${svn.password} -Dtag=${svn.tag} -DdevelopmentVersion=${developmentVersion}-SNAPSHOT" /> |
116 |
</target>
|
117 |
|
118 |
<target name="mvn-release-prepare-dry-run" depends="release.get.params" description="Performs a dry run (does not perform the real release) of a new release of the project"> |
119 |
<echo>mvn release:clean release:prepare -DdryRun=true -Dtag=${svn.tag} -DdevelopmentVersion=${developmentVersion}-SNAPSHOT</echo> |
120 |
<maven arg="release:clean release:prepare -DdryRun=true -Dtag=${svn.tag} -DdevelopmentVersion=${developmentVersion}-SNAPSHOT" /> |
121 |
</target>
|
122 |
|
123 |
<target name="mvn-release-clean" description="Cleans all files created by the release-prepare* targets"> |
124 |
<maven arg="release:clean" /> |
125 |
</target>
|
126 |
|
127 |
<target name="mvn-configure-eclipse-workspace" |
128 |
description="Configures the eclipse workspace for maven integration"> |
129 |
|
130 |
<input message="Eclipse workspace folder to configure?:" |
131 |
addproperty="eclipse.workspace" |
132 |
defaultvalue="${workspace_loc}" /> |
133 |
|
134 |
<maven arg="-Declipse.workspace='${eclipse.workspace}' eclipse:add-maven-repo" /> |
135 |
<mkdir dir="${eclipse.workspace}/.metadata/.plugins/org.eclipse.ui.workbench" /> |
136 |
<copy
|
137 |
file="${build.folder}/metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml" |
138 |
todir="${eclipse.workspace}/.metadata/.plugins/org.eclipse.ui.workbench" /> |
139 |
</target>
|
140 |
|
141 |
<target name="mvn-eclipse-clean" |
142 |
description="Cleans the maven generated eclipse project files"> |
143 |
<maven arg="eclipse:clean" /> |
144 |
</target>
|
145 |
|
146 |
<!-- Replaced by the target eclipse.project in eclipse-tasks.xml -->
|
147 |
<!--
|
148 |
<target name="mvn-eclipse-eclipse"
|
149 |
description="Generates an eclipse project configuration from the pom.xml">
|
150 |
<maven arg="eclipse:eclipse" />
|
151 |
</target>
|
152 |
-->
|
153 |
<target name="mvn-eclipse-eclipse" |
154 |
description="Generates an eclipse project configuration from the pom.xml"> |
155 |
<maven arg="-P eclipse-project" /> |
156 |
</target>
|
157 |
|
158 |
<target name="mvn-site" |
159 |
description="Generates the project site documentation"> |
160 |
<maven arg="site" /> |
161 |
</target>
|
162 |
|
163 |
<target name="mvn-any" |
164 |
description="Asks for the parameters to launch maven with"> |
165 |
<antform title="Launch maven" image="${gvsiglogo}" resetMessage="Cancel" |
166 |
previousTarget="cancel"> |
167 |
<textProperty label="mvn " property="mvn.parameters" |
168 |
password="false" /> |
169 |
</antform>
|
170 |
<maven arg="${mvn.parameters}" /> |
171 |
</target>
|
172 |
|
173 |
</project>
|