root / branches / v2_0_0_prep / build / ant-tasks / maven-archetypes.xml @ 29554
History | View | Annotate | Download (3.78 KB)
1 |
<project name="gvSIG-maven-archetypes" default="mvn-create-library" |
---|---|
2 |
xmlns:artifact="antlib:org.apache.maven.artifact.ant"> |
3 |
<dirname property="gvSIG-maven-archetypes.basedir" file="${ant.file.gvSIG-maven-archetypes}" /> |
4 |
<import file="${gvSIG-maven-archetypes.basedir}/ant-tasks-config.xml" /> |
5 |
|
6 |
<property name="defaultGroupId" value="org.gvsig"/> |
7 |
<property name="defaultVersion" value="2.0-SNAPSHOT"/> |
8 |
|
9 |
<target name="mvn-create-library" depends="mvn-create-library.getparams" |
10 |
description="Generates a new library project with the initial structure and configuration"> |
11 |
|
12 |
<echo>
|
13 |
groupId: ${lib.groupId} |
14 |
artifactId: ${lib.artifactId} |
15 |
version: ${lib.version} |
16 |
</echo>
|
17 |
<maven
|
18 |
arg="archetype:generate -B -DarchetypeGroupId=org.gvsig -DarchetypeArtifactId=org.gvsig.library-archetype -DgroupId=${lib.groupId} -DartifactId=${lib.artifactId} -Dversion=${lib.version} -Dpackage=${lib.artifactId}" /> |
19 |
|
20 |
<move todir="${workspace_loc}/${lib.artifactId}"> |
21 |
<fileset dir="${lib.artifactId}" /> |
22 |
</move>
|
23 |
|
24 |
<artifact:mvn mavenHome="${build.folder}/maven" fork="true" |
25 |
failonerror="true" dir="${workspace_loc}/${lib.artifactId}"> |
26 |
<arg line="eclipse:eclipse" /> |
27 |
</artifact:mvn>
|
28 |
</target>
|
29 |
|
30 |
<target name="mvn-create-library.getparams"> |
31 |
<property name="lib.groupId" value="${defaultGroupId}" /> |
32 |
<property name="lib.artifactId" value="${defaultGroupId}.mylibrary" /> |
33 |
<property name="lib.version" value="${defaultVersion}" /> |
34 |
<antform title="Create a new library project" image="gvSIG.png"> |
35 |
|
36 |
<label>Create a new library project for gvSIG</label> |
37 |
<textProperty label="Maven groupId:" property="lib.groupId" |
38 |
Required="true" /> |
39 |
<textProperty label="Maven artifactId:" property="lib.artifactId" |
40 |
focus="true" Required="true" /> |
41 |
<textProperty label="Project version:" property="lib.version" |
42 |
Required="true" /> |
43 |
<label>
|
44 |
Note: |
45 |
Once the process has finished, import the project into your |
46 |
eclipse workspace. |
47 |
</label>
|
48 |
<controlbar>
|
49 |
<button label="Cancel" target="cancel" type="cancel"/> |
50 |
<button label="Ok" type="ok"/> |
51 |
</controlbar>
|
52 |
</antform>
|
53 |
</target>
|
54 |
|
55 |
<target name="mvn-create-extension" depends="mvn-create-extension.getparams" |
56 |
description="Generates a new extension project with the initial structure and configuration"> |
57 |
|
58 |
<echo>
|
59 |
groupId: ${ext.groupId} |
60 |
artifactId: ${ext.artifactId} |
61 |
version: ${ext.version} |
62 |
</echo>
|
63 |
<maven
|
64 |
arg="archetype:generate -B -DarchetypeGroupId=org.gvsig -DarchetypeArtifactId=org.gvsig.extension-archetype -DgroupId=${ext.groupId} -DartifactId=${ext.artifactId} -Dversion=${ext.version} -Dpackage=${ext.artifactId}" /> |
65 |
|
66 |
<move todir="${workspace_loc}/${ext.artifactId}"> |
67 |
<fileset dir="${ext.artifactId}" /> |
68 |
</move>
|
69 |
|
70 |
<artifact:mvn mavenHome="${build.folder}/maven" fork="true" |
71 |
failonerror="true" dir="${workspace_loc}/${ext.artifactId}"> |
72 |
<arg line="eclipse:eclipse" /> |
73 |
</artifact:mvn>
|
74 |
</target>
|
75 |
|
76 |
<target name="mvn-create-extension.getparams"> |
77 |
<property name="ext.groupId" value="${defaultGroupId}" /> |
78 |
<property name="ext.artifactId" value="${defaultGroupId}.myextension" /> |
79 |
<property name="ext.version" value="${defaultVersion}" /> |
80 |
<antform title="Create a new gvSIG extension project" image="gvSIG.png"> |
81 |
<label>Create a new extension project for gvSIG</label> |
82 |
<textProperty label="Maven groupId:" property="ext.groupId" |
83 |
Required="true" /> |
84 |
<textProperty label="Maven artifactId:" property="ext.artifactId" |
85 |
focus="true" Required="true" /> |
86 |
<textProperty label="Project version:" property="ext.version" |
87 |
Required="true" /> |
88 |
<label>
|
89 |
Note: |
90 |
Once the process has finished, import the project into your |
91 |
eclipse workspace. |
92 |
</label>
|
93 |
<controlbar>
|
94 |
<button label="Cancel" target="cancel" type="cancel"/> |
95 |
<button label="Ok" type="ok"/> |
96 |
</controlbar>
|
97 |
</antform>
|
98 |
</target>
|
99 |
|
100 |
</project>
|