Revision 38505
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/prepare-templates.xml | ||
---|---|---|
1 |
<project name="prepare-templates.build" default="prepare-templates"> |
|
2 |
|
|
3 |
<dirname property="prepare-templates.build.basedir" |
|
4 |
file="${ant.file.prepare-templates.build}" /> |
|
5 |
<target name="prepare-templates" depends="prepare-fortunecookies,prepare-landregistryviewer"> |
|
6 |
</target> |
|
7 |
|
|
8 |
<!-- *************** Fortune cookies template **************** --> |
|
9 |
|
|
10 |
<target name="check-fortunecookies"> |
|
11 |
<available file="${prepare-templates.build.basedir}/target/templates/downloads/fortunecookies" |
|
12 |
type="dir" |
|
13 |
property="fortunecookies.downloaded" /> |
|
14 |
</target> |
|
15 |
|
|
16 |
<target name="download-fortunecookies" |
|
17 |
depends="check-fortunecookies" |
|
18 |
unless="fortunecookies.downloaded"> |
|
19 |
<echo>Downloading fortunecookies templates...</echo> |
|
20 |
<mkdir dir="${prepare-templates.build.basedir}/target/templates/downloads/fortunecookies" /> |
|
21 |
<mkdir dir="${prepare-templates.build.basedir}/target/templates-zips" /> |
|
22 |
|
|
23 |
<java classname="org.tmatesoft.svn.cli.SVN" |
|
24 |
classpath="${runtime_classpath}" |
|
25 |
dir="${prepare-templates.build.basedir}/target/templates/downloads/fortunecookies/" |
|
26 |
fork="true" |
|
27 |
failonerror="true"> |
|
28 |
<arg value="export" /> |
|
29 |
<arg value="https://devel.gvsig.org/svn/gvsig-plugintemplates/org.gvsig.fortunecookies/trunk/basic-with-user-interface" /> |
|
30 |
</java> |
|
31 |
<java classname="org.tmatesoft.svn.cli.SVN" |
|
32 |
classpath="${runtime_classpath}" |
|
33 |
dir="${prepare-templates.build.basedir}/target/templates/downloads/fortunecookies/" |
|
34 |
fork="true" |
|
35 |
failonerror="true"> |
|
36 |
<arg value="export" /> |
|
37 |
<arg value="https://devel.gvsig.org/svn/gvsig-plugintemplates/org.gvsig.fortunecookies/trunk/provider-based-implementation-with-user-interface" /> |
|
38 |
</java> |
|
39 |
</target> |
|
40 |
|
|
41 |
<target name="prepare-fortunecookies" depends="download-fortunecookies"> |
|
42 |
<echo>Zipping fortunecookies...</echo> |
|
43 |
<delete file="${prepare-templates.build.basedir}/target/templates-zips/fortunecookies-basic.zip"/> |
|
44 |
<delete file="${prepare-templates.build.basedir}/target/templates-zips/fortunecookies-pbi.zip"/> |
|
45 |
<zip destfile="${prepare-templates.build.basedir}/target/templates-zips/fortunecookies-basic.zip" |
|
46 |
basedir="${prepare-templates.build.basedir}/target/templates/downloads/fortunecookies/basic-with-user-interface/" |
|
47 |
includes="**/*" /> |
|
48 |
<zip destfile="${prepare-templates.build.basedir}/target/templates-zips/fortunecookies-pbi.zip" |
|
49 |
basedir="${prepare-templates.build.basedir}/target/templates/downloads/fortunecookies/provider-based-implementation-with-user-interface/" |
|
50 |
includes="**/*" /> |
|
51 |
</target> |
|
52 |
|
|
53 |
|
|
54 |
<!-- *************** Land registry viewer template **************** --> |
|
55 |
|
|
56 |
<target name="check-landregistryviewer"> |
|
57 |
<available file="${prepare-templates.build.basedir}/target/templates/downloads/landregistryviewer" |
|
58 |
type="dir" |
|
59 |
property="landregistryviewer.downloaded" /> |
|
60 |
</target> |
|
61 |
|
|
62 |
<target name="download-landregistryviewer" |
|
63 |
depends="check-landregistryviewer" |
|
64 |
unless="landregistryviewer.downloaded"> |
|
65 |
<echo>Downloading landregistryviewer template...</echo> |
|
66 |
<mkdir dir="${prepare-templates.build.basedir}/target/templates/downloads/landregistryviewer" /> |
|
67 |
<mkdir dir="${prepare-templates.build.basedir}/target/templates-zips" /> |
|
68 |
|
|
69 |
<java classname="org.tmatesoft.svn.cli.SVN" |
|
70 |
classpath="${runtime_classpath}" |
|
71 |
dir="${prepare-templates.build.basedir}/target/templates/downloads/landregistryviewer/" |
|
72 |
fork="true" |
|
73 |
failonerror="true"> |
|
74 |
<arg value="export" /> |
|
75 |
<arg value="https://devel.gvsig.org/svn/gvsig-plugintemplates/org.gvsig.landregistryviewer/trunk/org.gvsig.landregistryviewer" /> |
|
76 |
</java> |
|
77 |
<java classname="org.tmatesoft.svn.cli.SVN" |
|
78 |
classpath="${runtime_classpath}" |
|
79 |
dir="${prepare-templates.build.basedir}/target/templates/downloads/landregistryviewer/" |
|
80 |
fork="true" |
|
81 |
failonerror="true"> |
|
82 |
<arg value="export" /> |
|
83 |
<arg value="https://devel.gvsig.org/svn/gvsig-plugintemplates/org.gvsig.landregistryviewer.app/trunk/org.gvsig.landregistryviewer.app" /> |
|
84 |
</java> |
|
85 |
</target> |
|
86 |
|
|
87 |
<target name="prepare-landregistryviewer" depends="download-landregistryviewer"> |
|
88 |
<echo>Zipping landregistryviewer...</echo> |
|
89 |
<delete file="${prepare-templates.build.basedir}/target/templates-zips/landregistryviewer.zip"/> |
|
90 |
<zip destfile="${prepare-templates.build.basedir}/target/templates-zips/landregistryviewer.zip" |
|
91 |
basedir="${prepare-templates.build.basedir}/target/templates/downloads/landregistryviewer/" |
|
92 |
includes="**/*" /> |
|
93 |
</target> |
|
94 |
|
|
95 |
|
|
96 |
</project> |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/prepare-workspace.xml | ||
---|---|---|
1 |
<project name="org.gvsig.initial.build" default="prepare-workspace"> |
|
2 |
|
|
3 |
<dirname property="org.gvsig.initial.build.basedir" file="${ant.file.org.gvsig.initial.build}" /> |
|
4 |
|
|
5 |
<property name="workspace.basedir" value="${org.gvsig.initial.build.basedir}/.." /> |
|
6 |
<property name="build.basedir" value="${workspace.basedir}/org.gvsig.maven.base.build" description="Eclipse workspace location" /> |
|
7 |
<property name="build.jar.version" value="1.0.8-SNAPSHOT" /> |
|
8 |
<property name="build.jar.file" value="org.gvsig.maven.base.build-${build.jar.version}.jar" /> |
|
9 |
|
|
10 |
<property name="ant.libs.dir" location="${build.basedir}" description="Additional ant tasks libs folder" /> |
|
11 |
|
|
12 |
<target name="check-maven-base-build-available"> |
|
13 |
<available file="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" property="maven-base-build-available" /> |
|
14 |
</target> |
|
15 |
|
|
16 |
<target name="get-maven-base-build-local" depends="check-maven-base-build-available" if="maven-base-build-available"> |
|
17 |
<!-- Unzip de build jar file from the maven repository into the workspace root folder --> |
|
18 |
<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false"> |
|
19 |
<zipfileset src="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}"> |
|
20 |
<patternset> |
|
21 |
<exclude name="META-INF/**" /> |
|
22 |
</patternset> |
|
23 |
</zipfileset> |
|
24 |
</copy> |
|
25 |
</target> |
|
26 |
|
|
27 |
<target name="get-maven-base-build-remote" depends="check-maven-base-build-available" unless="maven-base-build-available"> |
|
28 |
<mkdir dir="target" /> |
|
29 |
|
|
30 |
<!-- Download the build jar file --> |
|
31 |
<get src="http://devel.gvsig.org/m2repo/j2se/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" dest="target/${build.jar.file}" verbose="true" /> |
|
32 |
|
|
33 |
<!-- Unzip de build jar file into the workspace root folder --> |
|
34 |
<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false"> |
|
35 |
<zipfileset src="target/${build.jar.file}"> |
|
36 |
<patternset> |
|
37 |
<exclude name="META-INF/**" /> |
|
38 |
</patternset> |
|
39 |
</zipfileset> |
|
40 |
</copy> |
|
41 |
|
|
42 |
</target> |
|
43 |
|
|
44 |
<target name="find.depends.natives.file"> |
|
45 |
<condition property="depends.natives.file.exists"> |
|
46 |
<available file="${org.gvsig.initial.build.basedir}/DEPENDS_ON_NATIVE_LIBRARIES"/> |
|
47 |
</condition> |
|
48 |
</target> |
|
49 |
|
|
50 |
<target name="find.gvsig.platform.properties.file" |
|
51 |
depends="find.depends.natives.file" |
|
52 |
if="depends.natives.file.exists"> |
|
53 |
<condition property="gvsig.platform.exists"> |
|
54 |
<available file="${user.home}/.gvsig.platform.properties"/> |
|
55 |
</condition> |
|
56 |
</target> |
|
57 |
|
|
58 |
<target name="check.gvsig.platform.properties" |
|
59 |
depends="find.gvsig.platform.properties.file"> |
|
60 |
<fail if="depends.natives.file.exists" unless="gvsig.platform.exists"> |
|
61 |
ERROR!! |
|
62 |
|
|
63 |
You have to define your gvSIG platform properties, |
|
64 |
by creating the file: ${user.home}/.gvsig.platform.properties |
|
65 |
with the following content: |
|
66 |
|
|
67 |
native_platform=linux |
|
68 |
native_distribution=all |
|
69 |
native_compiler=gcc4 |
|
70 |
native_arch=i386 |
|
71 |
native_libraryType=dynamic |
|
72 |
export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType} |
|
73 |
|
|
74 |
Replace the fifth initial variables values with the ones appropiate |
|
75 |
to your platform. |
|
76 |
|
|
77 |
If you use maven in the command line, you can use the previous file also |
|
78 |
to define the MAVEN_OPTS environment variable, by adding to your |
|
79 |
.bash_rc file something like this: |
|
80 |
|
|
81 |
if [ -f "${HOME}/.gvsig.platform.properties" ] |
|
82 |
then |
|
83 |
. ${HOME}/.gvsig.platform.properties |
|
84 |
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier}" |
|
85 |
else |
|
86 |
export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m" |
|
87 |
fi |
|
88 |
|
|
89 |
It will work if you use the bash shell. In any other case or platform, you'll |
|
90 |
have to define your MAVEN_OPTS environment variable and set the |
|
91 |
"native-classifier" parameter directly. |
|
92 |
</fail> |
|
93 |
|
|
94 |
</target> |
|
95 |
|
|
96 |
<target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote,check.gvsig.platform.properties"> |
|
97 |
|
|
98 |
<mkdir dir="target" /> |
|
99 |
|
|
100 |
<chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug" /> |
|
101 |
|
|
102 |
<!-- Copy the maven launchers to the workspace metadata folder --> |
|
103 |
<copy todir="${workspace.basedir}/.metadata"> |
|
104 |
<fileset dir="${build.basedir}/eclipse-launchers"> |
|
105 |
<exclude name="**/org.eclipse.jdt.core.prefs" /> |
|
106 |
<exclude name="**/org.eclipse.core.variables.prefs" /> |
|
107 |
</fileset> |
|
108 |
</copy> |
|
109 |
|
|
110 |
<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true"> |
|
111 |
<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.jdt.core.prefs" /> |
|
112 |
</concat> |
|
113 |
<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" append="true"> |
|
114 |
<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.core.variables.prefs" /> |
|
115 |
</concat> |
|
116 |
|
|
117 |
<!-- Configure the eclipse workspace --> |
|
118 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" /> |
|
119 |
|
|
120 |
<!-- Configure the gvSIG profile --> |
|
121 |
<ant antfile="${build.basedir}/check-gvsig-profile.xml" /> |
|
122 |
|
|
123 |
<property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" /> |
|
124 |
|
|
125 |
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"> |
|
126 |
<classpath> |
|
127 |
<pathelement location="${ant.libs.dir}/com.oopsconsultancy.xmltask-1.16.1.jar" /> |
|
128 |
</classpath> |
|
129 |
</taskdef> |
|
130 |
|
|
131 |
<xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}"> |
|
132 |
<copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location" /> |
|
133 |
</xmltask> |
|
134 |
|
|
135 |
<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" /> |
|
136 |
<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" /> |
|
137 |
|
|
138 |
<!-- Compile, install and generate eclipse projects --> |
|
139 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" /> |
|
140 |
|
|
141 |
<echo>INFORMATION!!!</echo> |
|
142 |
<echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo> |
|
143 |
|
|
144 |
<!-- TODO: copiar al proyecto de configuraciĆ³n general --> |
|
145 |
</target> |
|
146 |
|
|
147 |
<target name="clean"> |
|
148 |
<delete dir="target" /> |
|
149 |
</target> |
|
150 |
|
|
151 |
</project> |
|
0 | 152 |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.mkmvnproject</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<version>2.0-SNAPSHOT</version> |
|
9 |
<name>Development project wizard</name> |
|
10 |
<description> |
|
11 |
Utilities and gvSIG plugin to create new gvSIG projects from a template |
|
12 |
</description> |
|
13 |
<parent> |
|
14 |
<groupId>org.gvsig</groupId> |
|
15 |
<artifactId>org.gvsig.maven.base.extension.pom</artifactId> |
|
16 |
<version>1.0.8-SNAPSHOT</version> |
|
17 |
</parent> |
|
18 |
<scm> |
|
19 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/extensions/org.gvsig.mkmvnproject</connection> |
|
20 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/extensions/org.gvsig.mkmvnproject</developerConnection> |
|
21 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/branches/v2_0_0_prep/extensions/org.gvsig.mkmvnproject</url> |
|
22 |
</scm> |
|
23 |
<developers> |
|
24 |
<developer> |
|
25 |
<id>jjdelcerro</id> |
|
26 |
<name>Joaqu?n Jos? del Cerro</name> |
|
27 |
<email>jjdelcerro@gvsig.org</email> |
|
28 |
<roles> |
|
29 |
<role>Architect</role> |
|
30 |
<role>Developer</role> |
|
31 |
</roles> |
|
32 |
</developer> |
|
33 |
<developer> |
|
34 |
<id>jbadia</id> |
|
35 |
<name>Jos? Bad?a</name> |
|
36 |
<email>badia_jos@gva.es</email> |
|
37 |
<roles> |
|
38 |
<role>Developer</role> |
|
39 |
</roles> |
|
40 |
</developer> |
|
41 |
<developer> |
|
42 |
<id>cordinyana</id> |
|
43 |
<name>C?sar Ordi?ana</name> |
|
44 |
<email>cordinyana@gvsig.com</email> |
|
45 |
<roles> |
|
46 |
<role>Architect</role> |
|
47 |
<role>Developer</role> |
|
48 |
</roles> |
|
49 |
</developer> |
|
50 |
</developers> |
|
51 |
<repositories> |
|
52 |
<repository> |
|
53 |
<id>gvsig-public-http-repository</id> |
|
54 |
<name>gvSIG maven public HTTP repository</name> |
|
55 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
56 |
<releases> |
|
57 |
<enabled>true</enabled> |
|
58 |
<updatePolicy>daily</updatePolicy> |
|
59 |
<checksumPolicy>warn</checksumPolicy> |
|
60 |
</releases> |
|
61 |
<snapshots> |
|
62 |
<enabled>true</enabled> |
|
63 |
<updatePolicy>daily</updatePolicy> |
|
64 |
<checksumPolicy>warn</checksumPolicy> |
|
65 |
</snapshots> |
|
66 |
</repository> |
|
67 |
</repositories> |
|
68 |
<dependencyManagement> |
|
69 |
<dependencies> |
|
70 |
<dependency> |
|
71 |
<groupId>org.gvsig</groupId> |
|
72 |
<artifactId>org.gvsig.core.maven.dependencies</artifactId> |
|
73 |
<version>2.0.1-SNAPSHOT</version> |
|
74 |
<type>pom</type> |
|
75 |
<scope>import</scope> |
|
76 |
</dependency> |
|
77 |
</dependencies> |
|
78 |
</dependencyManagement> |
|
79 |
<dependencies> |
|
80 |
<dependency> |
|
81 |
<groupId>org.slf4j</groupId> |
|
82 |
<artifactId>slf4j-api</artifactId> |
|
83 |
<scope>compile</scope> |
|
84 |
</dependency> |
|
85 |
<dependency> |
|
86 |
<groupId>org.apache.ant</groupId> |
|
87 |
<artifactId>ant</artifactId> |
|
88 |
<scope>compile</scope> |
|
89 |
</dependency> |
|
90 |
<dependency> |
|
91 |
<groupId>org.apache.ant</groupId> |
|
92 |
<artifactId>ant-apache-oro</artifactId> |
|
93 |
<scope>runtime</scope> |
|
94 |
</dependency> |
|
95 |
<dependency> |
|
96 |
<groupId>ant-contrib</groupId> |
|
97 |
<artifactId>ant-contrib</artifactId> |
|
98 |
<scope>runtime</scope> |
|
99 |
</dependency> |
|
100 |
<dependency> |
|
101 |
<groupId>org.apache.ant</groupId> |
|
102 |
<artifactId>ant-launcher</artifactId> |
|
103 |
<scope>compile</scope> |
|
104 |
</dependency> |
|
105 |
<dependency> |
|
106 |
<groupId>org.apache.ant</groupId> |
|
107 |
<artifactId>ant-nodeps</artifactId> |
|
108 |
<scope>runtime</scope> |
|
109 |
</dependency> |
|
110 |
<dependency> |
|
111 |
<groupId>org.tigris.antelope</groupId> |
|
112 |
<artifactId>antelopetasks</artifactId> |
|
113 |
<scope>runtime</scope> |
|
114 |
</dependency> |
|
115 |
<dependency> |
|
116 |
<groupId>com.sardak</groupId> |
|
117 |
<artifactId>antform</artifactId> |
|
118 |
<scope>runtime</scope> |
|
119 |
</dependency> |
|
120 |
<dependency> |
|
121 |
<groupId>org.gvsig</groupId> |
|
122 |
<artifactId>org.gvsig.andami</artifactId> |
|
123 |
<scope>compile</scope> |
|
124 |
</dependency> |
|
125 |
<dependency> |
|
126 |
<groupId>org.gvsig</groupId> |
|
127 |
<artifactId>org.gvsig.maven.base.build</artifactId> |
|
128 |
<scope>compile</scope> |
|
129 |
<version>1.0.6-SNAPSHOT</version> |
|
130 |
</dependency> |
|
131 |
<dependency> |
|
132 |
<groupId>org.gvsig</groupId> |
|
133 |
<artifactId>org.gvsig.i18n</artifactId> |
|
134 |
<scope>compile</scope> |
|
135 |
</dependency> |
|
136 |
<dependency> |
|
137 |
<groupId>org.tmatesoft.svnkit</groupId> |
|
138 |
<artifactId>svnkit</artifactId> |
|
139 |
<scope>runtime</scope> |
|
140 |
</dependency> |
|
141 |
<dependency> |
|
142 |
<groupId>org.tmatesoft.svnkit</groupId> |
|
143 |
<artifactId>svnkit-cli</artifactId> |
|
144 |
<scope>runtime</scope> |
|
145 |
</dependency> |
|
146 |
</dependencies> |
|
147 |
<build> |
|
148 |
<resources> |
|
149 |
<resource> |
|
150 |
<directory>src/main/resources</directory> |
|
151 |
<excludes> |
|
152 |
<exclude>config.xml</exclude> |
|
153 |
<exclude>gvSIG.png</exclude> |
|
154 |
<exclude>scripts/**</exclude> |
|
155 |
</excludes> |
|
156 |
</resource> |
|
157 |
</resources> |
|
158 |
|
|
159 |
<plugins> |
|
160 |
<plugin> |
|
161 |
<artifactId>maven-antrun-plugin</artifactId> |
|
162 |
<executions> |
|
163 |
<execution> |
|
164 |
<id>prepare-templates</id> |
|
165 |
<phase>package</phase> |
|
166 |
<configuration> |
|
167 |
<tasks> |
|
168 |
<!-- Regexp implementation to use --> |
|
169 |
<property name="ant.regexp.regexpimpl" |
|
170 |
value="org.apache.tools.ant.util.regexp.JakartaOroRegexp" /> |
|
171 |
|
|
172 |
<property name="runtime_classpath" |
|
173 |
refid="maven.runtime.classpath" /> |
|
174 |
<ant antfile="${basedir}/prepare-templates.xml" /> |
|
175 |
</tasks> |
|
176 |
</configuration> |
|
177 |
<goals> |
|
178 |
<goal>run</goal> |
|
179 |
</goals> |
|
180 |
</execution> |
|
181 |
</executions> |
|
182 |
<dependencies> |
|
183 |
<dependency> |
|
184 |
<groupId>org.apache.ant</groupId> |
|
185 |
<artifactId>ant-apache-oro</artifactId> |
|
186 |
<version>1.8.1</version> |
|
187 |
</dependency> |
|
188 |
</dependencies> |
|
189 |
</plugin> |
|
190 |
</plugins> |
|
191 |
</build> |
|
192 |
<profiles> |
|
193 |
<profile> |
|
194 |
<id>gvsig-install</id> |
|
195 |
<activation> |
|
196 |
<activeByDefault>true</activeByDefault> |
|
197 |
</activation> |
|
198 |
<properties> |
|
199 |
<!-- gvSIG installation folder relative to the current workspace --> |
|
200 |
<gvsig.install.dir>${basedir}/../build/product</gvsig.install.dir> |
|
201 |
</properties> |
|
202 |
</profile> |
|
203 |
<profile> |
|
204 |
<id>create-project</id> |
|
205 |
<build> |
|
206 |
<plugins> |
|
207 |
<plugin> |
|
208 |
<artifactId>maven-antrun-plugin</artifactId> |
|
209 |
<executions> |
|
210 |
<execution> |
|
211 |
<id>Run mkmvnproject.xml</id> |
|
212 |
<phase>install</phase> |
|
213 |
<configuration> |
|
214 |
<tasks> |
|
215 |
<!-- Regexp implementation to use --> |
|
216 |
<property name="ant.regexp.regexpimpl" |
|
217 |
value="org.apache.tools.ant.util.regexp.JakartaOroRegexp" /> |
|
218 |
<ant |
|
219 |
antfile="${project.build.directory}/${project.artifactId}-${project.version}-distribution/${project.artifactId}-${project.version}/gvSIG/extensiones/${project.artifactId}/scripts/mkmvnproject.xml" /> |
|
220 |
</tasks> |
|
221 |
</configuration> |
|
222 |
<goals> |
|
223 |
<goal>run</goal> |
|
224 |
</goals> |
|
225 |
</execution> |
|
226 |
</executions> |
|
227 |
<dependencies> |
|
228 |
<dependency> |
|
229 |
<groupId>org.apache.ant</groupId> |
|
230 |
<artifactId>ant-apache-oro</artifactId> |
|
231 |
<version>1.8.1</version> |
|
232 |
</dependency> |
|
233 |
</dependencies> |
|
234 |
</plugin> |
|
235 |
</plugins> |
|
236 |
</build> |
|
237 |
</profile> |
|
238 |
</profiles> |
|
239 |
<properties> |
|
240 |
<package.info.state>alpha6</package.info.state> |
|
241 |
<package.info.categories>Development</package.info.categories> |
|
242 |
</properties> |
|
243 |
</project> |
|
0 | 244 |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/build.xml | ||
---|---|---|
1 |
<project name="gvSIG-build-config" default="mvn-install" xmlns:artifact="antlib:org.apache.maven.artifact.ant"> |
|
2 |
|
|
3 |
<property name="maven.folder" |
|
4 |
location="${basedir}/src/main/resources/maven" /> |
|
5 |
|
|
6 |
<!-- Maven ant tasks registration --> |
|
7 |
<path id="maven-ant-tasks.classpath" |
|
8 |
path="${maven.folder}/lib/maven-ant-tasks-2.0.10.jar" /> |
|
9 |
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" |
|
10 |
uri="antlib:org.apache.maven.artifact.ant" |
|
11 |
classpathref="maven-ant-tasks.classpath" /> |
|
12 |
|
|
13 |
<!-- Maven targets --> |
|
14 |
<macrodef name="maven"> |
|
15 |
<attribute name="arg" /> |
|
16 |
<sequential> |
|
17 |
<echo>mvn @{arg}</echo> |
|
18 |
<artifact:mvn mavenHome="${maven.folder}" fork="true" |
|
19 |
failonerror="true" maxmemory="256M"> |
|
20 |
<arg line="@{arg}" /> |
|
21 |
<jvmarg value="-XX:MaxPermSize=64M" /> |
|
22 |
</artifact:mvn> |
|
23 |
</sequential> |
|
24 |
</macrodef> |
|
25 |
|
|
26 |
<!-- Utility targets --> |
|
27 |
<target name="cancel"> |
|
28 |
<fail>User canceled</fail> |
|
29 |
</target> |
|
30 |
|
|
31 |
<target name="mvn-clean" description="Cleans all artifacts"> |
|
32 |
<maven arg="clean" /> |
|
33 |
</target> |
|
34 |
|
|
35 |
<target name="mvn-compile" description="Compiles all source code"> |
|
36 |
<maven arg="compile" /> |
|
37 |
</target> |
|
38 |
|
|
39 |
<target name="mvn-test" description="Launches unit tests"> |
|
40 |
<maven arg="test" /> |
|
41 |
</target> |
|
42 |
|
|
43 |
<target name="mvn-install" description="Compiles and installs"> |
|
44 |
<maven arg="install" /> |
|
45 |
</target> |
|
46 |
|
|
47 |
<target name="mvn-install-ignore-tests" description="Compiles and installs and ignore tests"> |
|
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 |
<maven arg="-Dmaven.test.skip=true install" /> |
|
54 |
</target> |
|
55 |
|
|
56 |
<target name="mvn-reinstall" |
|
57 |
description="Performs a clean install"> |
|
58 |
<maven arg="clean install" /> |
|
59 |
</target> |
|
60 |
|
|
61 |
<target name="mvn-reinstall-without-tests" |
|
62 |
description="Performs a clean install without launching tests"> |
|
63 |
<maven arg="-Dmaven.test.skip=true clean install" /> |
|
64 |
</target> |
|
65 |
|
|
66 |
<target name="mvn-deploy" |
|
67 |
description="Compiles, installs and deploys"> |
|
68 |
<maven arg="deploy" /> |
|
69 |
</target> |
|
70 |
|
|
71 |
<target name="mvn-deploy-release" |
|
72 |
description="Compiles, installs and deploys for release"> |
|
73 |
<maven arg="-P release deploy" /> |
|
74 |
</target> |
|
75 |
|
|
76 |
<target name="mvn-eclipse-clean" |
|
77 |
description="Cleans the maven generated eclipse project files"> |
|
78 |
<maven arg="eclipse:clean" /> |
|
79 |
</target> |
|
80 |
|
|
81 |
<target name="mvn-eclipse-eclipse" |
|
82 |
description="Generates an eclipse project configuration from the pom.xml"> |
|
83 |
<maven arg="eclipse:eclipse" /> |
|
84 |
</target> |
|
85 |
|
|
86 |
<target name="mvn-site" |
|
87 |
description="Generates the project site documentation"> |
|
88 |
<maven arg="site" /> |
|
89 |
</target> |
|
90 |
</project> |
|
0 | 91 |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/distribution/distribution.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>distribution</id> |
|
3 |
<formats> |
|
4 |
<format>dir</format> |
|
5 |
</formats> |
|
6 |
<fileSets> |
|
7 |
<!-- Estructure for the extension --> |
|
8 |
<fileSet> |
|
9 |
<directory>src/main/resources/scripts</directory> |
|
10 |
<outputDirectory>${extension.install.dir.name}/scripts</outputDirectory> |
|
11 |
</fileSet> |
|
12 |
<fileSet> |
|
13 |
<directory>src/main/resources/compilationcheck</directory> |
|
14 |
<outputDirectory>${extension.install.dir.name}/compilationcheck</outputDirectory> |
|
15 |
</fileSet> |
|
16 |
<fileSet> |
|
17 |
<directory>src/main/resources/config</directory> |
|
18 |
<outputDirectory>${extension.install.dir.name}</outputDirectory> |
|
19 |
</fileSet> |
|
20 |
<fileSet> |
|
21 |
<directory>target/templates-zips</directory> |
|
22 |
<outputDirectory>${extension.install.dir.name}/templates |
|
23 |
</outputDirectory> |
|
24 |
</fileSet> |
|
25 |
</fileSets> |
|
26 |
<files> |
|
27 |
<file> |
|
28 |
<source>package.info</source> |
|
29 |
<outputDirectory>${extension.install.dir.name} |
|
30 |
</outputDirectory> |
|
31 |
</file> |
|
32 |
</files> |
|
33 |
<dependencySets> |
|
34 |
<dependencySet> |
|
35 |
<outputDirectory>${extension.install.dir.name}/${library-dir} |
|
36 |
</outputDirectory> |
|
37 |
<includes> |
|
38 |
<include>org.gvsig:org.gvsig.mkmvnproject</include> |
|
39 |
<include>ant-contrib:ant-contrib</include> |
|
40 |
<include>org.apache.ant:ant</include> |
|
41 |
<include>org.apache.ant:ant-launcher</include> |
|
42 |
<include>org.apache.ant:ant-nodeps</include> |
|
43 |
<include>org.apache.ant:ant-apache-oro</include> |
|
44 |
<include>com.sardak:antform</include> |
|
45 |
<include>org.tigris.antelope:antelopetasks</include> |
|
46 |
</includes> |
|
47 |
</dependencySet> |
|
48 |
</dependencySets> |
|
49 |
</assembly> |
|
0 | 50 |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/buildNumber.properties | ||
---|---|---|
1 |
#maven.buildNumber.plugin properties file |
|
2 |
#Mon Jun 25 11:22:03 CEST 2012 |
|
3 |
buildNumber=2051 |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/config/text.properties | ||
---|---|---|
1 |
_Java_compiler_not_found_near_current_JRE_nor_in_JAVA_HOME=No se ha encontrado compilador Java junto a JRE actual ni en la ubicaci?n indicada por JAVA_HOME |
|
2 |
_Continue_question=?Desea continuar? |
|
3 |
_Searching_JDK=Buscando JDK |
|
4 |
_gvSIG_is_running_on_JDK=gvSIG se est? ejecutando sobre un JDK |
|
5 |
_gvSIG_is_not_running_on_JDK=gvSIG no se est? ejecutando sobre un JDK |
|
6 |
_JAVA_HOME_is_not_set=La variable de entorno JAVA_HOME no est? declarada |
|
7 |
_JAVA_HOME_is_set_to=La variable de entorno JAVA_HOME tiene el valor |
|
8 |
_You_might_need_to_run_gvSIG_on_JDK_or_set_JAVA_HOME_properly=Es probable que necesite ejecutar gvSIG sobre un JDK o establecer JAVA_HOME correctamente |
|
9 |
_Visit_gvSIG_website_for_details=Visite la p?gina web de gvSIG para m?s informaci?n |
|
10 |
_Detected_settings=Configuraci?n detectada |
|
11 |
_On_Linux_make_JAVA_HOME_point_to_JDK_1_5_higher=En Linux, aseg?rese de que la variable de entorno JAVA_HOME apunta a un JDK 1.5 ? superior |
|
12 |
_On_Windows_run_JDK_use_devel_exe=En Windows, aseg?rese de que gvSIG se ejecuta sobre un JDK y use 'gvsig-desktop-devel.exe' para iniciarlo |
|
13 |
_Make_maven_project_plugin=Complemento para crear proyecto maven |
|
14 |
_Requirements_for_this_plugin=Requisitos para este plugin |
|
15 |
|
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/config/text_en.properties | ||
---|---|---|
1 |
_Java_compiler_not_found_near_current_JRE_nor_in_JAVA_HOME=Java compiler not found near current JRE nor in location pointed by JAVA_HOME |
|
2 |
_Continue_question=Would you like to continue? |
|
3 |
_Searching_JDK=Searching JDK |
|
4 |
_gvSIG_is_running_on_JDK=gvSIG is running on JDK |
|
5 |
_gvSIG_is_not_running_on_JDK=gvSIG is not running on JDK |
|
6 |
_JAVA_HOME_is_not_set=Environment variable JAVA_HOME is not set |
|
7 |
_JAVA_HOME_is_set_to=Environment variable JAVA_HOME is set to |
|
8 |
_You_might_need_to_run_gvSIG_on_JDK_or_set_JAVA_HOME_properly=You might need to run gvSIG on JDK or set JAVA_HOME properly |
|
9 |
_Visit_gvSIG_website_for_details=Visit gvSIG website for details |
|
10 |
_Detected_settings=Detected settings |
|
11 |
_On_Linux_make_JAVA_HOME_point_to_JDK_1_5_higher=On Linux, make sure the environment variable JAVA_HOME points at JDK 1.5 or higher |
|
12 |
_On_Windows_run_JDK_use_devel_exe=On Windows, make sure you are running gvSIG on a JDK and start it with 'gvsig-desktop-devel.exe' |
|
13 |
_Make_maven_project_plugin=Make maven project plugin |
|
14 |
_Requirements_for_this_plugin=Requirements for this plugin |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/config/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<depends plugin-name="org.gvsig.app" /> |
|
4 |
<resourceBundle name="text"/> |
|
5 |
<libraries library-dir="lib"/> |
|
6 |
<extensions> |
|
7 |
<extension class-name="org.gvsig.mkmvnproject.MakeMavenProjectExtension" |
|
8 |
description="" |
|
9 |
active="true" |
|
10 |
priority="1"> |
|
11 |
<menu text="tools/Development/Create Plugin" |
|
12 |
position="7009080" |
|
13 |
action-command="gvSIGProjectWizard"/> |
|
14 |
</extension> |
|
15 |
</extensions> |
|
16 |
</plugin-config> |
|
0 | 17 |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/scripts/checkjdk.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project name="check-jdk-project" default="default" basedir=".."> |
|
3 |
|
|
4 |
<property name="src_folder" location="compilationcheck" /> |
|
5 |
|
|
6 |
<target name="default"> |
|
7 |
|
|
8 |
<javac srcdir="${src_folder}" |
|
9 |
destdir="${src_folder}" |
|
10 |
executable="${executable}" |
|
11 |
fork="true" |
|
12 |
debug="on" /> |
|
13 |
</target> |
|
14 |
|
|
15 |
</project> |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/scripts/fortunecookies-provider.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project name="gvSIG-make-cookies-provider-project" default="mkproject-build" basedir="."> |
|
3 |
|
|
4 |
<!-- Get current file location folder --> |
|
5 |
<dirname property="gvSIG-make-cookies-provider-project.basedir" file="${ant.file.gvSIG-make-cookies-provider-project}" /> |
|
6 |
|
|
7 |
<target name="mkproject-build"> |
|
8 |
<ant dir="${gvSIG-make-cookies-provider-project.basedir}" antfile="fortunecookies.xml" target="mkproject-build-provider" /> |
|
9 |
</target> |
|
10 |
|
|
11 |
</project> |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/scripts/landregistryviewer.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project name="gvSIG-make-maven-project" default="mkproject-build" 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"> |
|
43 |
<echo> |
|
44 |
Project name: "${project.name}" |
|
45 |
Project name capitalized: "${project.name.capitalized}" |
|
46 |
Project name lowercase: ${project.name.lowercase}" |
|
47 |
Group id: "${project.group.id}" |
|
48 |
ArtifactId: "${project.artifact.id}" |
|
49 |
Project folder: "${project.folder}" |
|
50 |
</echo> |
|
51 |
|
|
52 |
<echo>Unzipping the basic template project</echo> |
|
53 |
<unzip src="${templates.folder}/landregistryviewer.zip" dest="${project.folder}" /> |
|
54 |
|
|
55 |
<!-- Calculate the project artifact id as PATH --> |
|
56 |
<propertyregex property="project.artifact.id.folder" input="${project.artifact.id}" regexp="([^\.]*).([^\.]*)" replace="\1${file.separator}\2" /> |
|
57 |
|
|
58 |
<echo>Renaming folder ${project.folder}/org.gvsig.landregistryviewer to |
|
59 |
${project.folder}/${project.artifact.id}</echo> |
|
60 |
|
|
61 |
<move todir="${project.folder}"> |
|
62 |
<fileset dir="${project.folder}"> |
|
63 |
<include name="org.gvsig.landregistryviewer/**/*.txt" /> |
|
64 |
<include name="org.gvsig.landregistryviewer/**/*.java" /> |
|
65 |
<include name="org.gvsig.landregistryviewer/**/*.xml" /> |
|
66 |
<include name="org.gvsig.landregistryviewer/**/org.gvsig.tools.library.Library" /> |
|
67 |
<include name="org.gvsig.landregistryviewer.app/**/org.gvsig.tools.library.Library" /> |
|
68 |
<include name="org.gvsig.landregistryviewer.app/**/*.txt" /> |
|
69 |
<include name="org.gvsig.landregistryviewer.app/**/*.xml" /> |
|
70 |
<include name="org.gvsig.landregistryviewer.app/**/*.java" /> |
|
71 |
</fileset> |
|
72 |
<mapper> |
|
73 |
<filtermapper> |
|
74 |
<replacestring from="org.gvsig.landregistryviewer" to="${project.artifact.id}" /> |
|
75 |
<replacestring from="org${file.separator}gvsig${file.separator}landregistryviewer" to="${project.artifact.id.folder}" /> |
|
76 |
<replacestring from="LandRegistryViewer" to="${project.name.capitalized}" /> |
|
77 |
</filtermapper> |
|
78 |
</mapper> |
|
79 |
<filterchain> |
|
80 |
<tokenfilter> |
|
81 |
<replacestring from="org.gvsig.landregistryviewer" to="${project.artifact.id}" /> |
|
82 |
</tokenfilter> |
|
83 |
<tokenfilter> |
|
84 |
<replacestring from="LandRegistryViewer" to="${project.name.capitalized}" /> |
|
85 |
<replacestring from="Land Registry Viewer" to="${project.name.capitalized}" /> |
|
86 |
<replacestring from="gvsig-landregistryviewer" to="gvsig-${project.name.lowercase}" /> |
|
87 |
</tokenfilter> |
|
88 |
<tokenfilter> |
|
89 |
<replacestring from="LandRegistryViewer" to="${project.name.capitalized}" /> |
|
90 |
<replacestring from="Land Registry Viewer" to="${project.name.capitalized}" /> |
|
91 |
<replacestring from="gvsig-landregistryviewer" to="gvsig-${project.name.lowercase}" /> |
|
92 |
</tokenfilter> |
|
93 |
</filterchain> |
|
94 |
</move> |
|
95 |
<move todir="${project.folder}"> |
|
96 |
<fileset dir="${project.folder}"> |
|
97 |
<include name="org.gvsig.landregistryviewer/**" /> |
|
98 |
<include name="org.gvsig.landregistryviewer.app/**" /> |
|
99 |
</fileset> |
|
100 |
<mapper> |
|
101 |
<filtermapper> |
|
102 |
<replacestring from="org.gvsig.landregistryviewer" to="${project.artifact.id}" /> |
|
103 |
<replacestring from="org${file.separator}gvsig${file.separator}landregistryviewer" to="${project.artifact.id.folder}" /> |
|
104 |
<replacestring from="LandRegistryViewer" to="${project.name.capitalized}" /> |
|
105 |
</filtermapper> |
|
106 |
</mapper> |
|
107 |
</move> |
|
108 |
<!-- |
|
109 |
<delete dir="${project.folder}/org.gvsig.landregistryviewer"/> |
|
110 |
<delete dir="${project.folder}/org.gvsig.landregistryviewer.app"/> |
|
111 |
--> |
|
112 |
</target> |
|
113 |
|
|
114 |
|
|
115 |
</project> |
|
0 | 116 |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/scripts/fortunecookies-basic.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project name="gvSIG-make-cookies-basic-project" default="mkproject-build" basedir="."> |
|
3 |
|
|
4 |
<!-- Get current file location folder --> |
|
5 |
<dirname property="gvSIG-make-cookies-basic-project.basedir" file="${ant.file.gvSIG-make-cookies-basic-project}" /> |
|
6 |
|
|
7 |
<target name="mkproject-build"> |
|
8 |
<ant dir="${gvSIG-make-cookies-basic-project.basedir}" antfile="fortunecookies.xml" target="mkproject-build-basic" /> |
|
9 |
</target> |
|
10 |
|
|
11 |
</project> |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/scripts/fortunecookies.xml | ||
---|---|---|
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> |
|
0 | 129 |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/scripts/mkmvnproject.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project name="gvSIG-make-maven-project" default="mkproject" 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 |
<property name="form.width" value="700" /> |
|
20 |
<property name="form.height" value="550" /> |
|
21 |
<property name="form.columns" value="40" /> |
|
22 |
|
|
23 |
|
|
24 |
<taskdef resource="net/sf/antcontrib/antlib.xml"> |
|
25 |
<classpath> |
|
26 |
<pathelement location="${antcontrib.lib}" /> |
|
27 |
</classpath> |
|
28 |
</taskdef> |
|
29 |
|
|
30 |
<taskdef name="antform" classname="com.sardak.antform.AntForm" classpath="${antform.lib}" /> |
|
31 |
|
|
32 |
<taskdef name="antmenu" classname="com.sardak.antform.AntMenu" classpath="${antform.lib}" /> |
|
33 |
|
|
34 |
<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" classpath="${antelope.lib}" /> |
|
35 |
|
|
36 |
|
|
37 |
<!-- |
|
38 |
================ begin specific code of templates ================= |
|
39 |
--> |
|
40 |
<property name="template.fortunecookies-basic.option" value="1 - General project based on Fortune cookies basic example project" /> |
|
41 |
<property name="template.fortunecookies-basic.description1" value="Create a general pourpose project with the multimodule" /> |
|
42 |
<property name="template.fortunecookies-basic.description2" value="structure. It has no GEO logic and is based on a basic" /> |
|
43 |
<property name="template.fortunecookies-basic.description3" value="API/implementation separation" /> |
|
44 |
|
|
45 |
<property name="template.fortunecookies-provider.option" value="2 - General project based on Fortune cookies example project" /> |
|
46 |
<property name="template.fortunecookies-provider.description1" value="Create a general pourpose project with the multimodule" /> |
|
47 |
<property name="template.fortunecookies-provider.description2" value="structure. It has no GEO logic and is based on" /> |
|
48 |
<property name="template.fortunecookies-provider.description3" value="API/SPI/implementation separation and providers" /> |
|
49 |
|
|
50 |
<property name="template.landregistryviewer.option" value="3 - Basic plugin with spatial support" /> |
|
51 |
<property name="template.landregistryviewer.description1" value="Create a project based in the LandRegistryViewer example." /> |
|
52 |
<property name="template.landregistryviewer.description2" value="Uses access to View, MapControl and datasources." /> |
|
53 |
<property name="template.landregistryviewer.description3" value="" /> |
|
54 |
|
|
55 |
<property name="templates" value="fortunecookies-basic,fortunecookies-provider,landregistryviewer" /> |
|
56 |
<!-- |
|
57 |
================ End specific code of templates ================= |
|
58 |
--> |
|
59 |
|
|
60 |
<target name="mkproject" depends="mkproject-prompt-basic-data"> |
|
61 |
<description>Creates a new gvSIG project</description> |
|
62 |
</target> |
|
63 |
|
|
64 |
<target name="mkproject-prompt-basic-data"> |
|
65 |
|
|
66 |
<property name="project.group.id" value="org.gvsig" /> |
|
67 |
|
|
68 |
<antform title="Create project" width="${form.width}" image="${gvsiglogo}"> |
|
69 |
<textProperty label="" editable="false" columns="${form.columns}" property="form.title" /> |
|
70 |
<textProperty label="Name : " property="project.name" required="true" /> |
|
71 |
<label> For the project name, use the java class naming rules. |
|
72 |
Ex: FortuneCookie or LandRegistryViewer</label> |
|
73 |
<textProperty label="Group Id : " property="project.group.id" required="true" /> |
|
74 |
|
|
75 |
<fileSelectionProperty label="Create project in : " property="project.folder" directoryChooser="true" editable="false" required="true" /> |
|
76 |
<separator /> |
|
77 |
<label>Select the template to use:</label> |
|
78 |
|
|
79 |
<!-- |
|
80 |
================ begin specific code of templates ================= |
|
81 |
--> |
|
82 |
<checkSelectionProperty property="template.landregistryviewer.check" values="${template.landregistryviewer.option}" label="" /> |
|
83 |
<label> ${template.landregistryviewer.description1} |
|
84 |
${template.landregistryviewer.description2} |
|
85 |
${template.landregistryviewer.description3}</label> |
|
86 |
|
|
87 |
<checkSelectionProperty property="template.fortunecookies-basic.check" values="${template.fortunecookies-basic.option}" label="" /> |
|
88 |
<label> ${template.fortunecookies-basic.description1} |
|
89 |
${template.fortunecookies-basic.description2} |
|
90 |
${template.fortunecookies-basic.description3}</label> |
|
91 |
<checkSelectionProperty property="template.fortunecookies-provider.check" values="${template.fortunecookies-provider.option}" label="" /> |
|
92 |
<label> ${template.fortunecookies-provider.description1} |
|
93 |
${template.fortunecookies-provider.description2} |
|
94 |
${template.fortunecookies-provider.description3}</label> |
|
95 |
<!-- |
|
96 |
================ End specific code of templates ================= |
|
97 |
--> |
|
98 |
<separator /> |
|
99 |
<controlbar> |
|
100 |
<button type="cancel" label=" Cancel " target="mkproject-build-cancelled" /> |
|
101 |
<button type="ok" label=" Next " target="mkproject-fixnames" /> |
|
102 |
</controlbar> |
|
103 |
</antform> |
|
104 |
</target> |
|
105 |
|
|
106 |
<target name="mkproject-fixnames"> |
|
107 |
|
|
108 |
<!-- Trim project name and group id --> |
|
109 |
<stringutil string="${project.name}" property="project.name"> |
|
110 |
<trim /> |
|
111 |
</stringutil> |
|
112 |
<stringutil string="${project.group.id}" property="project.group.id"> |
|
113 |
<trim /> |
|
114 |
</stringutil> |
|
115 |
|
|
116 |
<!-- Lower case project name --> |
|
117 |
<stringutil string="${project.name}" property="project.name.lowercase"> |
|
118 |
<lowercase /> |
|
119 |
</stringutil> |
|
120 |
|
|
121 |
<!-- Capitalize project name, just in case --> |
|
122 |
<stringutil string="${project.name}" property="project.name.capitalized.end"> |
|
123 |
<substring beginindex="1" /> |
|
124 |
</stringutil> |
|
125 |
<stringutil string="${project.name}" property="project.name.capitalized.beginning"> |
|
126 |
<substring endindex="1" /> |
|
127 |
<uppercase /> |
|
128 |
</stringutil> |
|
129 |
<property name="project.name.capitalized" value="${project.name.capitalized.beginning}${project.name.capitalized.end}" /> |
|
130 |
|
|
131 |
<!-- Create artifactID with project.group.id + . + project.name.lowercase --> |
|
132 |
<property name="project.artifact.id" value="${project.group.id}.${project.name.lowercase}" /> |
|
133 |
|
|
134 |
<for list="${templates}" param="template"> |
|
135 |
<sequential> |
|
136 |
<var name="template.name" value="@{template}" /> |
|
137 |
<var name="check.name" value="template.${template.name}.check" /> |
|
138 |
<propertycopy override="true" name="arg1" from="${check.name}" /> |
|
139 |
<propertycopy override="true" name="arg2" from="template.${template.name}.option" /> |
|
140 |
<if> |
|
141 |
<and> |
|
142 |
<isset property="selected.template" /> |
|
143 |
<equals arg1="${arg1}" arg2="${arg2}" /> |
|
144 |
</and> |
|
145 |
<then> |
|
146 |
<antcall target="fail"> |
|
147 |
<param name="message" value="Only one template can be selected" /> |
|
148 |
</antcall> |
|
149 |
</then> |
|
150 |
</if> |
|
151 |
<if> |
|
152 |
<equals arg1="${arg1}" arg2="${arg2}" /> |
|
153 |
<then> |
|
154 |
<echo>selected.template = "${template.name}"</echo> |
|
155 |
<property name="selected.template" value="${template.name}" /> |
|
156 |
</then> |
|
157 |
</if> |
|
158 |
</sequential> |
|
159 |
</for> |
|
160 |
<antcall target="mkproject-confirm" inheritall="true" /> |
|
161 |
</target> |
|
162 |
|
|
163 |
<target name="mkproject-confirm"> |
|
164 |
<antform title="Confirm the creation" width="${form.width}" image="${gvsiglogo}"> |
|
165 |
<textProperty label="" editable="false" columns="${form.columns}" property="form.title" /> |
|
166 |
<label>The data used for the creation of project are:</label> |
|
167 |
<textProperty label="Project" editable="false" property="project.name" /> |
|
168 |
<textProperty label="Project name capitalized" editable="false" property="project.name.capitalized" /> |
|
169 |
<textProperty label="Project name lowercase" editable="false" property="project.name.lowercase" /> |
|
170 |
<textProperty label="Group Id" editable="false" property="project.group.id" /> |
|
171 |
<textProperty label="Artifact Id" editable="false" property="project.artifact.id" /> |
|
172 |
<textProperty label="Folder" editable="false" property="project.folder" /> |
|
173 |
<textProperty label="Template" editable="false" property="selected.template" /> |
|
174 |
<label>Continue ?</label> |
|
175 |
<separator /> |
|
176 |
<controlbar> |
|
177 |
<button type="cancel" label=" Cancel " target="mkproject-build-cancelled" /> |
|
178 |
<button type="ok" label=" Previous " target="mkproject-prompt-basic-data" /> |
|
179 |
<button type="ok" label=" Next " target="mkproject-build" /> |
|
180 |
</controlbar> |
|
181 |
</antform> |
|
182 |
</target> |
|
183 |
|
|
184 |
<target name="mkproject-build"> |
|
185 |
<echo> |
|
186 |
Project name: "${project.name}" |
|
187 |
Project name capitalized: "${project.name.capitalized}" |
|
188 |
Project name lowercase: ${project.name.lowercase}" |
|
189 |
Group id: "${project.group.id}" |
|
190 |
ArtifactId: "${project.artifact.id}" |
|
191 |
Project folder: "${project.folder}" |
|
192 |
Selected template: "${selected.template}" |
|
193 |
</echo> |
|
194 |
<!-- call specific code of the selected template --> |
|
195 |
<ant antfile="${selected.template}.xml" inheritall="false"> |
|
196 |
<property name="project.name" value="${project.name}" /> |
|
197 |
<property name="project.name.capitalized" value="${project.name.capitalized}" /> |
|
198 |
<property name="project.name.lowercase" value="${project.name.lowercase}" /> |
|
199 |
<property name="project.group.id" value="${project.group.id}" /> |
|
200 |
<property name="project.artifact.id" value="${project.artifact.id}" /> |
|
201 |
<property name="project.folder" value="${project.folder}" /> |
|
202 |
<property name="form.width" value="${form.width}" /> |
|
203 |
<property name="form.height" value="${form.height}" /> |
|
204 |
<property name="form.columns" value="${form.columns}" /> |
|
205 |
</ant> |
|
206 |
<if> |
|
207 |
<resourceexists> |
|
208 |
<file file="${project.folder}/${project.artifact.id}" /> |
|
209 |
</resourceexists> |
|
210 |
<then> |
|
211 |
<antcall target="mkproject-prepare-workspace" inheritall="true" /> |
|
212 |
<antcall target="mkproject-build-succesfully" inheritall="true" /> |
|
213 |
</then> |
|
214 |
<else> |
|
215 |
<antcall target="mkproject-build-cancelled" inheritall="true" /> |
|
216 |
</else> |
|
217 |
</if> |
|
218 |
</target> |
|
219 |
|
|
220 |
<target name="mkproject-prepare-workspace"> |
|
221 |
<ant dir="${project.folder}/${project.artifact.id}" antfile="prepare-workspace.xml" target="prepare-workspace" /> |
|
222 |
<if> |
|
223 |
<resourceexists> |
|
224 |
<file file="${project.folder}/${project.artifact.id}.app" /> |
|
225 |
</resourceexists> |
|
226 |
<then> |
|
227 |
<ant dir="${project.folder}/${project.artifact.id}.app" antfile="../org.gvsig.maven.base.build/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" /> |
|
228 |
</then> |
|
229 |
</if> |
|
230 |
</target> |
|
231 |
|
|
232 |
<target name="mkproject-build-succesfully"> |
|
233 |
<antform title="Project creation" width="${form.width}" image="${gvsiglogo}"> |
|
234 |
<textProperty label="" editable="false" columns="${form.columns}" property="form.title" /> |
|
235 |
<label>Project ${project.name} was created succesfully</label> |
|
236 |
<controlbar> |
|
237 |
<button type="ok" label=" Close " /> |
|
238 |
</controlbar> |
|
239 |
</antform> |
|
240 |
</target> |
|
241 |
|
|
242 |
<target name="mkproject-build-cancelled"> |
|
243 |
<antform title="Project creation cancelled" width="${form.width}" image="${gvsiglogo}"> |
|
244 |
<textProperty label="" editable="false" columns="40" property="form.title" /> |
|
245 |
<label>Creation cancelled.</label> |
|
246 |
<separator /> |
|
247 |
<controlbar> |
|
248 |
<button type="cancel" label=" Close " /> |
|
249 |
</controlbar> |
|
250 |
</antform> |
|
251 |
</target> |
|
252 |
|
|
253 |
<target name="fail"> |
|
254 |
<echo>${message}</echo> |
|
255 |
<fail message="${message}" /> |
|
256 |
</target> |
|
257 |
|
|
258 |
</project> |
|
0 | 259 |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/resources/compilationcheck/DummyClass.java | ||
---|---|---|
1 |
public class DummyClass extends Exception { |
|
2 |
|
|
3 |
public DummyClass() { |
|
4 |
super("X"); |
|
5 |
method(); |
|
6 |
} |
|
7 |
|
|
8 |
public void method() { |
|
9 |
System.out.println("Nothing to do here!"); |
|
10 |
} |
|
11 |
|
|
12 |
|
|
13 |
} |
tags/v2_0_0_Build_2049/extensions/org.gvsig.mkmvnproject/src/main/java/org/gvsig/mkmvnproject/CreatePluginConsolePanel.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
package org.gvsig.mkmvnproject; |
|
23 |
|
|
24 |
import java.awt.BorderLayout; |
|
25 |
import java.awt.Color; |
|
26 |
import java.awt.Dimension; |
|
27 |
import java.io.BufferedReader; |
|
28 |
import java.io.IOException; |
|
29 |
import java.io.InputStreamReader; |
|
30 |
import java.io.PipedInputStream; |
|
31 |
import java.io.PipedOutputStream; |
|
32 |
import java.io.PrintStream; |
|
33 |
|
|
34 |
import javax.swing.JPanel; |
|
35 |
import javax.swing.JScrollPane; |
|
36 |
import javax.swing.JTextArea; |
|
37 |
import javax.swing.SwingUtilities; |
|
38 |
|
|
39 |
import org.slf4j.Logger; |
|
40 |
import org.slf4j.LoggerFactory; |
|
41 |
|
|
42 |
/** |
|
43 |
* A panel which shows the execution log messages of the create plugin process. |
|
44 |
* |
|
45 |
* @author gvSIG Team |
|
46 |
* @version $Id$ |
|
47 |
*/ |
|
48 |
public class CreatePluginConsolePanel extends JPanel { |
|
49 |
|
|
50 |
private static final long serialVersionUID = -7213048219847956909L; |
|
51 |
|
|
52 |
private static final Logger LOG = LoggerFactory |
|
53 |
.getLogger(CreatePluginConsolePanel.class); |
|
54 |
|
|
55 |
private JTextArea console; |
|
56 |
|
|
57 |
private PrintStream printStream; |
|
58 |
private PipedOutputStream pipedos; |
|
59 |
private PipedInputStream pipedis; |
|
60 |
private Thread consoleThread; |
|
61 |
|
|
62 |
/** |
|
63 |
* Constructor. |
|
64 |
* |
|
65 |
* @throws IOException |
|
66 |
* if there is an error creating the console streams |
|
67 |
*/ |
|
68 |
public CreatePluginConsolePanel() throws IOException { |
|
69 |
super(); |
|
70 |
initialize(); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* Constructor. |
|
75 |
* |
|
76 |
* @param isDoubleBuffered |
|
77 |
* if the panel must be double buffered. |
|
78 |
* @throws IOException |
|
79 |
* if there is an error creating the console streams |
|
80 |
*/ |
|
81 |
public CreatePluginConsolePanel(boolean isDoubleBuffered) |
|
82 |
throws IOException { |
|
83 |
super(isDoubleBuffered); |
|
84 |
initialize(); |
|
85 |
} |
|
86 |
|
|
87 |
/** |
|
88 |
* Initializes the panel GUI. |
|
89 |
* |
|
90 |
* @throws IOException |
|
91 |
*/ |
|
92 |
private void initialize() throws IOException { |
|
93 |
Dimension dimension = new Dimension(600, 200); |
|
94 |
setSize(dimension); |
|
95 |
setLayout(new BorderLayout()); |
|
96 |
|
|
97 |
console = new JTextArea(); |
|
98 |
console.setEditable(false); |
|
99 |
// console.setColumns(20); |
|
100 |
// console.setRows(5); |
|
101 |
console.setBackground(Color.WHITE); |
|
102 |
console.setLineWrap(true); |
|
103 |
console.setWrapStyleWord(true); |
|
104 |
|
|
105 |
JScrollPane consoleScrollPane = new JScrollPane(console); |
|
106 |
add(consoleScrollPane, BorderLayout.CENTER); |
|
107 |
|
|
108 |
pipedis = new PipedInputStream(); |
|
109 |
|
|
110 |
pipedos = new PipedOutputStream(pipedis); |
|
111 |
|
|
112 |
printStream = new PrintStream(pipedos); |
|
113 |
consoleThread = new ConsoleThread(pipedis, console); |
|
114 |
consoleThread.start(); |
|
115 |
} |
|
116 |
|
|
117 |
/** |
|
118 |
* Returns a {@link PrintStream} which allows to write messages to the |
|
119 |
* console. |
|
120 |
* |
Also available in: Unified diff