svn-gvsig-desktop / tags / v2_0_0_Build_2040 / build / ant-tasks / maven-archetypes.xml @ 44114
History | View | Annotate | Download (3.79 KB)
1 | 29554 | cordinyana | <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 | 29613 | jpiera | arg="archetype:generate -B -DarchetypeGroupId=org.gvsig -DarchetypeArtifactId=org.gvsig.maven-archetype.library -DgroupId=${lib.groupId} -DartifactId=${lib.artifactId} -Dversion=${lib.version} -Dpackage=${lib.artifactId}" /> |
19 | 29554 | cordinyana | |
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 | 29613 | jpiera | arg="archetype:generate -B -DarchetypeGroupId=org.gvsig -DarchetypeArtifactId=org.gvsig.maven-archetype.extension -DgroupId=${ext.groupId} -DartifactId=${ext.artifactId} -Dversion=${ext.version} -Dpackage=${ext.artifactId}" /> |
65 | 29554 | cordinyana | |
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> |