Revision 44907
tags/org.gvsig.desktop-2.0.274/README.txt | ||
---|---|---|
1 |
|
|
2 |
Como compilar |
|
3 |
================ |
|
4 |
|
|
5 |
Para compilar la aplicacion gvSIG es necesario disponer de: |
|
6 |
|
|
7 |
- Un jdk 1.6 o superior (realmente solo se ha probado con el 1.6 y el 1.7). |
|
8 |
|
|
9 |
- maven instalado en el sistema, recomenado maven 3 (aunque podria compilar |
|
10 |
con maven 2), y que use el jdk 1.6 o superior. |
|
11 |
|
|
12 |
- Acceso a internet para acceder a los repositorios de maven de la aplicacion. |
|
13 |
|
|
14 |
- Si usan maven2 debera configurar la variable MAVEN_OPTS con el valor adecuado |
|
15 |
(ver "notas de compilacion"), con mvn3 en linux no suele ser necesario. |
|
16 |
|
|
17 |
- Descargar la carpeta org.gvsig.desktop y ejecutar "mvn clean install". |
|
18 |
|
|
19 |
Esto, por defecto, desplegara en la carpeta target/product la instalacion |
|
20 |
de gvSIG. |
|
21 |
|
|
22 |
Si se va a compilar todo desde cero, y no se tiene acceso al repositorio de |
|
23 |
gvSIG, puede ser necesario compilar antes el projecto org.gvsig.desktop.buildtools |
|
24 |
|
|
25 |
Notas de compilacion |
|
26 |
======================== |
|
27 |
|
|
28 |
MAVEN_OPTS |
|
29 |
------------ |
|
30 |
|
|
31 |
Usando maven 2, para que compile correctamente gvsig precisaremos especificar |
|
32 |
en la variable MAVEN_OPTS una serie de valores para reserbar memoria para el |
|
33 |
compilador. |
|
34 |
|
|
35 |
Valores adecuados para la compilacion del proyecto "org.gvsig.desktop" son:: |
|
36 |
|
|
37 |
-Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m |
|
38 |
|
|
39 |
Para asignar estos valores en linux puede hacerlo ejecutando la siguiente |
|
40 |
instruccion en la linea de comandos desde la que vaya a compilar:: |
|
41 |
|
|
42 |
export MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m" |
|
43 |
|
|
44 |
|
|
45 |
En Windows se establece en esta opci?n o similar |
|
46 |
(depende de versi?n de Windows): |
|
47 |
|
|
48 |
Panel de control |
|
49 |
> Sistema |
|
50 |
> Configurac?n avanzada del sistema |
|
51 |
> Variables de entorno |
|
52 |
> Nueva (en el valor no hace falta comillas) |
|
53 |
|
|
54 |
|
|
55 |
Si esta compilando desde eclipse, precisara tener instalado el plugin maven2e |
|
56 |
|
|
57 |
Usando maven2, cuando no especifica correctamente estos valores pueden |
|
58 |
aparecerle errores como: |
|
59 |
|
|
60 |
- Error "Compilation failure...":: |
|
61 |
|
|
62 |
[ERROR] BUILD FAILURE |
|
63 |
[INFO] --------------------------------------------------------------- |
|
64 |
[INFO] Compilation failure |
|
65 |
Failure executing javac, but could not parse the error: |
|
66 |
|
|
67 |
|
|
68 |
The system is out of resources. |
|
69 |
Consult the following stack trace for details. |
|
70 |
java.lang.OutOfMemoryError: PermGen space |
|
71 |
|
|
72 |
|
|
73 |
- Error "Error while executing forked tests...":: |
|
74 |
|
|
75 |
[ERROR] BUILD ERROR |
|
76 |
[INFO] --------------------------------------------------------------- |
|
77 |
[INFO] Error while executing forked tests.; nested exception is org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineException: Error setting up environmental variables |
|
78 |
|
|
79 |
java.io.IOException: error=12, Cannot allocate memory |
|
80 |
|
|
81 |
gvsig-devel.properties |
|
82 |
------------------------------ |
|
83 |
|
|
84 |
Por defecto al ejecutar "mvn install" sobre org.gvsig.desktop la aplicacion |
|
85 |
se desplegara en la carpeta target/product de ese mismo directorio. Una vez |
|
86 |
ejecutado ese primer comando maven sobre la carpeta org.gvsig.desktop debera |
|
87 |
editar el fichero ".gvsig-devel.properties" de la carpeta del usuario si |
|
88 |
desea cambiarlo. |
|
89 |
|
|
90 |
Si tiene varios espacios de trabajo y desea que cada uno despliegue sobre |
|
91 |
una carpeta distinta puede copiar el fichero de su carpeta de usuario a la |
|
92 |
carpeta raiz de org.gvsig.desktop con el nombre "gvsig-devel.properties" y |
|
93 |
cambiar en el sobre donde quiere hacer el despliegue, asi puede tener varias |
|
94 |
"instancias" del desarrollo de gvSIG desplegandose sobre sitios distintos. |
|
95 |
|
|
96 |
Si ejecuta "mvn install" desde algun subproyecto de org.gvsig.desktop tenga |
|
97 |
en cuenta que solo se utilizara el fichero ".gvsig-devel.properties" que hay |
|
98 |
en su carpeta de usuario y no el del que se encuentre en org.gvsig.desktop. |
|
99 |
|
|
100 |
|
|
101 |
Como generar una distribucion de gvSIG |
|
102 |
========================================== |
|
103 |
|
|
104 |
- Descargaremos el trunk o nos aseguraremos de que estemos actualizados. |
|
105 |
|
|
106 |
- Nos cercioraremos que en nuestro fichero "gvsig-devel.properties", se apunta |
|
107 |
al target de lo que nos acabamos de descargar, o simplemente borraremos |
|
108 |
el fichero para que se recree con el valor correcto. |
|
109 |
|
|
110 |
- Comprobaremos que el numero de build de |
|
111 |
|
|
112 |
org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/buildNumber.properties |
|
113 |
|
|
114 |
Es el numero de build con el que debe salir la nueva distribucion. |
|
115 |
|
|
116 |
Si no lo es, ejecutaremos: |
|
117 |
|
|
118 |
mvn -Dincrease-build-number process-sources |
|
119 |
|
|
120 |
desde la carpeta org.gvsig.desktop para incrementarlo y commitaremos los cambios. |
|
121 |
|
|
122 |
- "cd org.gvsig.desktop" |
|
123 |
|
|
124 |
- "mvn clean" |
|
125 |
|
|
126 |
- "mvn install" |
|
127 |
|
|
128 |
Si la compilacion no ha dado problemas probaremos a ejecutar el gvSIG que hay en la carpeta |
|
129 |
org.gvsig.desktop/target/product para cercionarnos de que por lo menos arranca. |
|
130 |
|
|
131 |
- "mvn release:prepare 2>&1 | tee /tmp/mvn-release-prepare.log" |
|
132 |
|
|
133 |
Esto incrementa en local los numeros de version de todos los proyecos maven y prepara el tag |
|
134 |
con los fuentes en el repositorio. |
|
135 |
|
|
136 |
- "cd org.gvsig.desktop.installer" |
|
137 |
|
|
138 |
- "mvn clean" |
|
139 |
|
|
140 |
- "mvn install" |
|
141 |
|
|
142 |
Con esto se generara el instalable de gvSIG, asi como el paquete (gvspks) con los plugins basicos |
|
143 |
de la distribucion, y un zip con estos para incluirlos en el pool del repositorio de plugins |
|
144 |
de gvSIG. |
|
145 |
Como ya hemos hecho el "release:prepare" y aun no el "release:perform", los numeros de version de los |
|
146 |
proyectos saldran con las versiones finales (sin SNAPSHOT). |
|
147 |
|
|
148 |
- Subiremos los binarios que haya en org.gvsig.desktop.installer/target a donde se |
|
149 |
encuentren los builds de la aplicacion, por ejemplo: |
|
150 |
|
|
151 |
http://downloads.gvsig.org/download/gvsig-desktop/dists/2.1.0/builds |
|
152 |
|
|
153 |
Los ficheros a subir, por ejemplo para la 2.1.0 build 2202 serian: |
|
154 |
|
|
155 |
- gvSIG-desktop-2.1.0-2202-devel-win-x86-online.exe (binarios para windows) |
|
156 |
- gvSIG-desktop-2.1.0-2202-devel-lin-x86-online.bin (binarios para linux) |
|
157 |
- gvSIG-desktop-2.1.0-2202-devel-all-x86-online.zip (zip multiplataforma) |
|
158 |
- gvSIG-desktop-2.1.0-2202-devel-all-all.gvspks (paquetes a usar en la instalacion) |
|
159 |
- gvSIG-desktop-2.1.0-2202-devel-all-all-pool.zip (paquetes para incluir en el pool) |
|
160 |
|
|
161 |
- Si despues de ejecutar el "release:prepare" y antes de llegar aqui se produce algun error, |
|
162 |
ejecutaremos un "mvn release:rollback" para deshacer los cambios. |
|
163 |
|
|
164 |
A pesar de ello, se habra quedado creado el tag en el SVN, que podemos ir y eliminar a mano. |
|
165 |
|
|
166 |
- "mvn release:perform 2>&1 | tee /tmp/mvn-release-perform.log" |
|
167 |
|
|
168 |
Si todo habia ido bien, al ejecutar esto, se subiran los artefactos maven de la distribucion al |
|
169 |
repositorio de maven, y se crearan los sites de todos los proyectos para esta version. |
|
170 |
|
|
171 |
Los artefactos con la nueva version en SNAPSHOT no se habran compilado, ni instalado o |
|
172 |
desplegado. Si consideramos oportuno disponer en el repo de maven de los |
|
173 |
nuevos artefactos en SNAPSHOT deberemos hacerlo a mano tras terminar todo el proceso. |
|
174 |
|
|
175 |
Con esto se deberia haber completado la generacion de la distribucion. Ahora faltaria |
|
176 |
actualizar el repositorio de plugins de gvSIG. |
|
177 |
|
|
178 |
|
|
179 |
Notas pendientes |
|
180 |
================= |
|
181 |
|
|
182 |
Puede ser interesante mirar el plugin |
|
183 |
|
|
184 |
http://mojo.codehaus.org/versions-maven-plugin/ |
|
185 |
|
|
186 |
|
|
187 |
A tener en cuenta |
|
188 |
-------------------- |
|
189 |
|
|
190 |
- Andami se lleva ahora muchas mas dependencias que antes, entre otras el |
|
191 |
api de la libreria de proyecciones (se lo lleva org.gvsig.ui) pero como |
|
192 |
no se lleva una implementacion peta en la inicializacion. De momento he |
|
193 |
puesto un exclude de org.gvsig.projection en el assembly. |
|
194 |
|
|
195 |
- Los snappers que hay en appgvsig dependen de jts. |
|
196 |
Habria que ver de cambiar su implementacion para que usen el API |
|
197 |
de la libreria de geometrias y eliminar la dependencia de compilacion |
|
198 |
de appgvsig hacia jts del pom. |
|
199 |
|
|
200 |
- TangentPointSnapper |
|
201 |
- PixelSnapper |
|
202 |
- MediumPointSnapper |
|
203 |
- PerpendicularPointSnapper |
|
204 |
- NearestPointSnapper |
|
205 |
|
|
206 |
- La clase Line2DOffset en org.gvsig.symbology.lib.impl hace uso intensivo |
|
207 |
de JTS. Ver si es viable crear una operacion sobre la geometria que haga |
|
208 |
lo que hace esa clase. |
|
209 |
|
|
210 |
- En org.gvsig.symbology.swing se hace uso de funcionalidades de andami. |
|
211 |
|
|
212 |
- Hay que repasar la asignacion de iconos a las capas. Ver la extension |
|
213 |
de extDWG, pero puede afectar a otras. |
|
214 |
|
|
215 |
- Ver que pasa con las clases de DAL FeatureQueryOrder y DefaultFeatureComparator. |
|
216 |
De momento he hecho una chapuza y he incrustado DefaultFeatureComparator |
|
217 |
dentro de FeatureQueryOrder en el API. |
|
218 |
|
|
219 |
- En la libreria de geometrias, la operacion Equals y el metodo equals de |
|
220 |
Geometry hacen cosas distintas. En mapcontext, EqualsGeometryEvaluator, |
|
221 |
he sustituido la llamada a la operacion por el metodo. |
|
222 |
|
|
223 |
- El proyecto org.gvsig.new.layer.lib.impl tiene una dependencia con |
|
224 |
org.gvsig.projection.cresques.ui |
|
225 |
|
|
226 |
- En PluginServices, en el metodo getPluginHomeFolder, habria que hacer que |
|
227 |
si es nuevo copie los contenidos de los AlternativeNames a el. De esta |
|
228 |
forma seguira funcionanado con la configuracion que tuviese el usuario |
|
229 |
aunque se renombre un plugin. |
|
230 |
|
|
231 |
|
|
0 | 232 |
tags/org.gvsig.desktop-2.0.274/maven-howto.rst | ||
---|---|---|
1 |
|
|
2 |
================================== |
|
3 |
Usefull maven "howtos" and FAQs |
|
4 |
================================== |
|
5 |
|
|
6 |
.. contents:: |
|
7 |
|
|
8 |
How to reduce the process of "install" to run as fast as possible. |
|
9 |
------------------------------------------------------------------- |
|
10 |
|
|
11 |
Can reduce install execution skiping test execution and compilation, |
|
12 |
javadoc generation, test signature checking, license checking, and |
|
13 |
attach sources in jar. |
|
14 |
|
|
15 |
mvn -Danimal.sniffer.skip=true -Dsource.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -DskipTests -Dgvsig.skip.downloadPluginTemplates=true install |
|
16 |
|
|
17 |
How to increment the build number of gvSIG plugins |
|
18 |
---------------------------------------------------- |
|
19 |
|
|
20 |
To increase the build number of gvSIG plugins, yo can do: |
|
21 |
|
|
22 |
mvn -Dincrease-build-number process-sources |
|
23 |
|
|
24 |
How to deploy a package of a gvSIG plugin |
|
25 |
-------------------------------------------- |
|
26 |
|
|
27 |
Yo can deploy the package of a gvSIG plugin with: |
|
28 |
|
|
29 |
mvn -Ddeploy-package -Duser=USER -Dpassword=PASSWORD install |
|
30 |
|
|
31 |
Notes: |
|
32 |
- Require that the gvsig.package.info.poolURL property that this set to the correct value. |
|
33 |
- The process uses WEBDAV to upload the packages, gvspkg and gvspki, and require |
|
34 |
access to write in the location specified by gvsig.package.info.poolURL |
|
35 |
- If "user" or "password" is not present, the process ask its each time it need. |
|
36 |
- If folder specified in gvsig.package.info.poolURL does not exist, the process try to create it. |
|
37 |
- The process create a file "addon-request.txt" in the target with the information to |
|
38 |
add to the ticket to request the update of the package in the main repository of |
|
39 |
packages of gvSIG. |
|
40 |
|
|
41 |
How show the list of files that have problems with the header. |
|
42 |
---------------------------------------------------------------- |
|
43 |
|
|
44 |
You can use the mave plugin "license" to check the headers of the files in |
|
45 |
the project. Use:: |
|
46 |
|
|
47 |
mvn -Dlicense.quiet=false license:check |
|
48 |
|
|
49 |
How to skip license check from command line |
|
50 |
---------------------------------------------- |
|
51 |
|
|
52 |
If in the project is enabled by default the checking of the headers |
|
53 |
of files, you can skip this setting the property "license.skip" to |
|
54 |
true in the command line:: |
|
55 |
|
|
56 |
mvn -Dlicense.skip=true install |
|
57 |
|
|
58 |
How to skip attach sources in jar from command line |
|
59 |
------------------------------------------------------ |
|
60 |
|
|
61 |
If in the project is enabled by default the generation of jar whith |
|
62 |
the sources of the project, you can disable this setting the property |
|
63 |
"source.skip" to true in the command line:: |
|
64 |
|
|
65 |
mvn -Dsource.skip=true install |
|
66 |
|
|
67 |
How to skip test compile from command line |
|
68 |
-------------------------------------------- |
|
69 |
|
|
70 |
You can skip the compilation of test setting the propety "maven.test.skip" |
|
71 |
to true in the command line:: |
|
72 |
|
|
73 |
mvn -Dmaven.test.skip=true install |
|
74 |
|
|
75 |
|
|
76 |
How to skip test execution from command line |
|
77 |
---------------------------------------------- |
|
78 |
|
|
79 |
You can skip the tests execution setting the propety "skipTests" to true |
|
80 |
in the command line:: |
|
81 |
|
|
82 |
mvn -DskipTests install |
|
83 |
|
|
84 |
How to skip javadoc generation from command line |
|
85 |
-------------------------------------------------- |
|
86 |
|
|
87 |
You can skip the javadoc generation setting the property |
|
88 |
"maven.javadoc.skip" to true in the command line:: |
|
89 |
|
|
90 |
mvn -Dmaven.javadoc.skip=true install |
|
91 |
|
|
92 |
How to skip test signature cheks from command line |
|
93 |
--------------------------------------------------- |
|
94 |
|
|
95 |
You can skip the signature check setting the property |
|
96 |
"animal.sniffer.skip" to true in the command line:: |
|
97 |
|
|
98 |
mvn -Danimal.sniffer.skip=true install |
|
99 |
|
|
100 |
How to install a project without install submodules |
|
101 |
---------------------------------------------------------- |
|
102 |
|
|
103 |
To install a project with submodules and only install the |
|
104 |
parent project without submodules use the option "--non-recursive" :: |
|
105 |
|
|
106 |
mvn --non-recursive install |
|
107 |
|
|
108 |
How to check and fix the header of source files. |
|
109 |
-------------------------------------------------- |
|
110 |
|
|
111 |
You can check the headers of the files in you project |
|
112 |
using the goal "license". To check the header use:: |
|
113 |
|
|
114 |
mvn license:check |
|
115 |
|
|
116 |
To fix the header use:: |
|
117 |
|
|
118 |
mvn license:format |
|
119 |
|
|
120 |
How to skip test compilation |
|
121 |
-------------------------------- |
|
122 |
|
|
123 |
To configure a project to don't run the compilation |
|
124 |
of test you can add to this pom the next configuration of |
|
125 |
the plugin "maven-compiler-plugin":: |
|
126 |
|
|
127 |
<build> |
|
128 |
<plugins> |
|
129 |
... |
|
130 |
<plugin> |
|
131 |
<!-- Skip compilation tests --> |
|
132 |
<groupId>org.apache.maven.plugins</groupId> |
|
133 |
<artifactId>maven-compiler-plugin</artifactId> |
|
134 |
<executions> |
|
135 |
<execution> |
|
136 |
<id>default-testCompile</id> |
|
137 |
<phase>process-test-sources</phase> |
|
138 |
<goals> |
|
139 |
<goal>testCompile</goal> |
|
140 |
</goals> |
|
141 |
<configuration> |
|
142 |
<skip>true</skip> |
|
143 |
</configuration> |
|
144 |
</execution> |
|
145 |
</executions> |
|
146 |
</plugin> |
|
147 |
... |
|
148 |
</plugins> |
|
149 |
</build> |
|
150 |
|
|
151 |
Skip test execution |
|
152 |
---------------------- |
|
153 |
|
|
154 |
To configure a project to don't run the execution |
|
155 |
of test you can add to this pom the next configuration of |
|
156 |
the plugin "maven-surefire-plugin":: |
|
157 |
|
|
158 |
|
|
159 |
<build> |
|
160 |
<plugins> |
|
161 |
... |
|
162 |
<plugin> |
|
163 |
<!-- Skip test execution --> |
|
164 |
<groupId>org.apache.maven.plugins</groupId> |
|
165 |
<artifactId>maven-surefire-plugin</artifactId> |
|
166 |
<configuration> |
|
167 |
<skipTests>true</skipTests> |
|
168 |
</configuration> |
|
169 |
</plugin> |
|
170 |
... |
|
171 |
</plugins> |
|
172 |
</build> |
|
173 |
|
|
174 |
Continue on test failure |
|
175 |
----------------------------- |
|
176 |
|
|
177 |
You can configure a project to continue on test execution |
|
178 |
failure. To do this add to the pom of the project the next |
|
179 |
configuration of plugin "maven-surefire-plugin" :: |
|
180 |
|
|
181 |
<build> |
|
182 |
<plugins> |
|
183 |
... |
|
184 |
<plugin> |
|
185 |
<!-- Continue on test failure --> |
|
186 |
<groupId>org.apache.maven.plugins</groupId> |
|
187 |
<artifactId>maven-surefire-plugin</artifactId> |
|
188 |
<configuration> |
|
189 |
<testFailureIgnore>true</testFailureIgnore> |
|
190 |
</configuration> |
|
191 |
</plugin> |
|
192 |
... |
|
193 |
</plugins> |
|
194 |
</build> |
|
195 |
|
|
196 |
|
|
197 |
Set java compatibility |
|
198 |
-------------------------- |
|
199 |
|
|
200 |
To set the compatibility with a java version add to the |
|
201 |
pom of the project the next configuration of plugin |
|
202 |
"maven-compiler-plugin" :: |
|
203 |
|
|
204 |
<build> |
|
205 |
<plugins> |
|
206 |
... |
|
207 |
<plugin> |
|
208 |
<!-- Set java compatibility --> |
|
209 |
<groupId>org.apache.maven.plugins</groupId> |
|
210 |
<artifactId>maven-compiler-plugin</artifactId> |
|
211 |
<configuration> |
|
212 |
<source>1.5</source> |
|
213 |
<target>1.5</target> |
|
214 |
<encoding>ISO-8859-1</encoding> |
|
215 |
</configuration> |
|
216 |
</plugin> |
|
217 |
... |
|
218 |
</plugins> |
|
219 |
</build> |
|
220 |
|
|
221 |
Packaging tests in jar |
|
222 |
------------------------ |
|
223 |
|
|
224 |
Test classes do not packaging in jar by default. |
|
225 |
To packing add to pom:: |
|
226 |
|
|
227 |
<build> |
|
228 |
<plugins> |
|
229 |
... |
|
230 |
<plugin> |
|
231 |
<!-- Packaging tests in jar --> |
|
232 |
<groupId>org.apache.maven.plugins</groupId> |
|
233 |
<artifactId>maven-jar-plugin</artifactId> |
|
234 |
<executions> |
|
235 |
<!-- Generates a jar file only with the test classes --> |
|
236 |
<execution> |
|
237 |
<goals> |
|
238 |
<goal>test-jar</goal> |
|
239 |
</goals> |
|
240 |
<configuration> |
|
241 |
<includes> |
|
242 |
<include>**/**</include> |
|
243 |
</includes> |
|
244 |
</configuration> |
|
245 |
</execution> |
|
246 |
</executions> |
|
247 |
</plugin> |
|
248 |
... |
|
249 |
</plugins> |
|
250 |
</build> |
|
251 |
|
|
252 |
How to set a dependency with tests jar |
|
253 |
----------------------------------------- |
|
254 |
|
|
255 |
You can set a dependency with a test jar adding to |
|
256 |
the declaration of the dependency the scope of |
|
257 |
test and the type of "test-jar":: |
|
258 |
|
|
259 |
<dependency> |
|
260 |
<groupId>...</groupId> |
|
261 |
<artifactId>...</artifactId> |
|
262 |
<type>test-jar</type> |
|
263 |
<scope>test</scope> |
|
264 |
</dependency> |
|
265 |
|
|
266 |
How use ant in maven |
|
267 |
------------------------- |
|
268 |
|
|
269 |
You can use ant embed in the pom of you project. |
|
270 |
To do this use:: |
|
271 |
|
|
272 |
<plugin> |
|
273 |
<artifactId>maven-antrun-plugin</artifactId> |
|
274 |
<version>1.7</version> |
|
275 |
<executions> |
|
276 |
<execution> |
|
277 |
<phase>generate-sources</phase> |
|
278 |
<configuration> |
|
279 |
<target> |
|
280 |
<echo>Hello world!</echo> |
|
281 |
</target> |
|
282 |
</configuration> |
|
283 |
<goals> |
|
284 |
<goal>run</goal> |
|
285 |
</goals> |
|
286 |
</execution> |
|
287 |
</executions> |
|
288 |
</plugin> |
|
289 |
|
|
290 |
Fail when execute "mvn deploy" with "No connector available" |
|
291 |
------------------------------------------------------------- |
|
292 |
|
|
293 |
When execute a "mvn deploy" fail with the error:: |
|
294 |
|
|
295 |
[INFO] ------------------------------------------------------------------------ |
|
296 |
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy |
|
297 |
(default-deploy) on project org.gvsig.desktop: Failed to deploy artifacts/metadata: |
|
298 |
No connector available to access repository gvsig-repository (dav:https://devel.gvsig.org/m2repo/j2se) |
|
299 |
of type default using the available factories WagonRepositoryConnectorFactory -> [Help 1] |
|
300 |
[ERROR] |
|
301 |
|
|
302 |
This happens to be configured the webdav wagon as an extension in the section "build":: |
|
303 |
|
|
304 |
... |
|
305 |
<build> |
|
306 |
<extensions> |
|
307 |
<extension> |
|
308 |
<groupId>org.apache.maven.wagon</groupId> |
|
309 |
<artifactId>wagon-webdav-jackrabbit</artifactId> |
|
310 |
<version>1.0-beta-7</version> |
|
311 |
</extension> |
|
312 |
</extensions> |
|
313 |
... |
|
314 |
|
|
315 |
Fail when execute "mvn release: prepare" with "svn command failed... Could not authenticate" |
|
316 |
------------------------------------------------------------------------------------------------ |
|
317 |
|
|
318 |
When running "mvn release: prepare" updates poms, compiles, and then |
|
319 |
fails with the following error :: |
|
320 |
|
|
321 |
[INFO] ------------------------------------------------------------------------ |
|
322 |
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare |
|
323 |
(default-cli) on project org.gvsig.desktop: Unable to commit files |
|
324 |
[ERROR] Provider message: |
|
325 |
[ERROR] The svn command failed. |
|
326 |
[ERROR] Command output: |
|
327 |
[ERROR] svn: Commit failed (details follow): |
|
328 |
[ERROR] svn: MKACTIVITY of '/svn/gvsig-desktop/!svn/act/931a27bc-57e8-45d9-adcd-5a2cf54a7045': |
|
329 |
authorization failed: Could not authenticate to server: rejected Basic challenge (https://devel.gvsig.org) |
|
330 |
[ERROR] -> [Help 1] |
|
331 |
[ERROR] |
|
332 |
[ERROR] |
|
333 |
|
|
334 |
Apparently maven in linux system use the svn of system and if you're not |
|
335 |
authenticated when trying to access to the repository, svn fails. |
|
336 |
|
|
337 |
This is solved by executing a commit from the command line on |
|
338 |
some file of the project (only if you have not enabled the option |
|
339 |
"store-passwords = no" in $ HOME / .subversion / config). For example, you |
|
340 |
can add or remove at the end of "pom.xml" a blank line and then run |
|
341 |
from the command line :: |
|
342 |
|
|
343 |
svn ci -m "" pom.xml |
|
344 |
|
|
345 |
Alternatively can excute:: |
|
346 |
|
|
347 |
svn list https://devel.gvsig.org/svn/gvsig-desktop/ |
|
348 |
|
|
349 |
And manually accept the certificate permanently. |
|
350 |
|
|
351 |
Another option that works on Windows in declaring the user and password in the command: |
|
352 |
|
|
353 |
mvn release:prepare -Dusername=[username] -Dpassword=[password] |
|
354 |
|
|
355 |
Fail when execute "mvn release:perform" with unable to find valid certification |
|
356 |
------------------------------------------------------------------------------------------------ |
|
357 |
|
|
358 |
When running "mvn release:perform" fail with unable to find valid certification:: |
|
359 |
|
|
360 |
|
|
361 |
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project org.gvsig.tools: Failed to deploy artifacts: Could not transfer artifact org.gvsig:org.gvsig.tools:pom:3.0.15 from/to gvsig-repository (dav:https://devel.gvsig.org/m2repo/j2se): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] |
|
362 |
[INFO] [ERROR] |
|
363 |
[INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. |
|
364 |
[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging. |
|
365 |
[INFO] [ERROR] |
|
366 |
[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles: |
|
367 |
[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException |
|
368 |
|
|
369 |
Consulte la seccion "Acceso de escritura al repositorio maven de gvSIG" de |
|
370 |
|
|
371 |
http://www.gvsig.org/plone/projects/gvsig-desktop/docs/devel/gvsig-devel-guide/2.0.0/trabajar-con-el-nucleo-de-gvsig/gvsig-compilation/initial-configuration/initial-configuration/?searchterm=maven%20java%20certification |
|
372 |
|
|
373 |
How to deploy a jar to gvSIG maven repository |
|
374 |
--------------------------------------------------- |
|
375 |
|
|
376 |
Si queremos subir el fichero: |
|
377 |
|
|
378 |
- file formsrt.jar |
|
379 |
- artifactId formsrt |
|
380 |
- groupId com.jeta |
|
381 |
- version 2.1.0_M3-1 |
|
382 |
|
|
383 |
Al repositorio de gvSIG tendriamos que: |
|
384 |
|
|
385 |
- primero crear la carpeta https://devel.gvsig.org/m2repo/j2se/com/jeta/2.1.0_M3-1 en caso de que no exista. |
|
386 |
Podemos hacerlo usando un cliente de webdav, por ejemplo el cadaver. |
|
387 |
|
|
388 |
- Podemos necesitar instalar los certificados correspondientes al https del servidor de gvSIG. |
|
389 |
Para ello podemos seguir las instrucciones indicadas en: |
|
390 |
|
|
391 |
http://docs.gvsig.org/plone/projects/gvsig-desktop/docs/devel/gvsig-devel-guide/2.0.0/trabajar-con-el-nucleo-de-gvsig/gvsig-compilation/initial-configuration/initial-configuration#acceso-de-escritura-al-repositorio-maven-de-gvsig |
|
392 |
|
|
393 |
- Nos aseguraremos que en el settings.xml estan incluidos en la seccion servers los datos para acceder al servidor de gvSIG:: |
|
394 |
|
|
395 |
<?xml version="1.0" encoding="UTF-8"?> |
|
396 |
<settings xmlns="http://maven.apache.org/POM/4.0.0" |
|
397 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
398 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
|
399 |
http://maven.apache.org/xsd/settings-1.0.0.xsd"> |
|
400 |
<servers> |
|
401 |
<server> |
|
402 |
<id>gvsig-repository</id> |
|
403 |
<username>USUARIO</username> |
|
404 |
<password>CLAVE</password> |
|
405 |
<filePermissions>664</filePermissions> |
|
406 |
<directoryPermissions>774</directoryPermissions> |
|
407 |
</server> |
|
408 |
</servers> |
|
409 |
</settings> |
|
410 |
|
|
411 |
- Luego subimos el fichero ejectando el siguiente comando maven:: |
|
412 |
|
|
413 |
mvn deploy:deploy-file \ |
|
414 |
-Durl=https://devel.gvsig.org/m2repo/j2se \ |
|
415 |
-DrepositoryId=gvsig-repository \ |
|
416 |
-DgroupId=com.jeta \ |
|
417 |
-DartifactId=formsrt \ |
|
418 |
-Dversion=2.1.0_M3-1 \ |
|
419 |
-Dpackaging=jar \ |
|
420 |
-Dfile=formsrt.jar \ |
|
421 |
-Ddescription="Abeille runtime 2.1.0_M3 with the jgoodies clases removeds." |
|
422 |
|
|
423 |
- Si queremos subir un "tar.gz", sustituiremos el packaging por "tar.gz", por ejemplo: |
|
424 |
|
|
425 |
mvn deploy:deploy-file \ |
|
426 |
-Durl=https://devel.gvsig.org/m2repo/j2se \ |
|
427 |
-DrepositoryId=gvsig-repository \ |
|
428 |
-DgroupId=org.gdal \ |
|
429 |
-DartifactId=gdal \ |
|
430 |
-Dversion=1.11.2.1 \ |
|
431 |
-Dpackaging=tar.gz \ |
|
432 |
-Dclassifier="osgeolive-9.0-ubuntu-14.04.3-amd64" \ |
|
433 |
-Dfile=gdal-1.11.2.1-osgeolive-9.0-ubuntu-14.04.3-amd64.tar.gz \ |
|
434 |
-Ddescription="GDAL extraido del OSGEO live 9.0 (Ubuntu 14.04.3 x86_64)" |
tags/org.gvsig.desktop-2.0.274/org.gvsig.desktop.buildtools/src/main/resources/header.txt | ||
---|---|---|
1 |
gvSIG. Desktop Geographic Information System. |
|
2 |
|
|
3 |
Copyright (C) 2007-2013 gvSIG Association. |
|
4 |
|
|
5 |
This program is free software; you can redistribute it and/or |
|
6 |
modify it under the terms of the GNU General Public License |
|
7 |
as published by the Free Software Foundation; either version 3 |
|
8 |
of the License, or (at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU General Public License |
|
16 |
along with this program; if not, write to the Free Software |
|
17 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
MA 02110-1301, USA. |
|
19 |
|
|
20 |
For any additional information, do not hesitate to contact us |
|
21 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
0 | 22 |
tags/org.gvsig.desktop-2.0.274/org.gvsig.desktop.buildtools/src/main/resources/gvsig/checkstyle.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
|
|
4 |
gvSIG. Desktop Geographic Information System. |
|
5 |
|
|
6 |
Copyright (C) 2007-2013 gvSIG Association. |
|
7 |
|
|
8 |
This program is free software; you can redistribute it and/or |
|
9 |
modify it under the terms of the GNU General Public License |
|
10 |
as published by the Free Software Foundation; either version 3 |
|
11 |
of the License, or (at your option) any later version. |
|
12 |
|
|
13 |
This program is distributed in the hope that it will be useful, |
|
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
GNU General Public License for more details. |
|
17 |
|
|
18 |
You should have received a copy of the GNU General Public License |
|
19 |
along with this program; if not, write to the Free Software |
|
20 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
MA 02110-1301, USA. |
|
22 |
|
|
23 |
For any additional information, do not hesitate to contact us |
|
24 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
25 |
|
|
26 |
--> |
|
27 |
<!DOCTYPE module PUBLIC |
|
28 |
"-//Puppy Crawl//DTD Check Configuration 1.2//EN" |
|
29 |
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> |
|
30 |
|
|
31 |
<!-- |
|
32 |
|
|
33 |
Checkstyle configuration that checks the sun coding conventions from: |
|
34 |
|
|
35 |
- the Java Language Specification at |
|
36 |
http://java.sun.com/docs/books/jls/second_edition/html/index.html |
|
37 |
|
|
38 |
- the Sun Code Conventions at http://java.sun.com/docs/codeconv/ |
|
39 |
|
|
40 |
- the Javadoc guidelines at |
|
41 |
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html |
|
42 |
|
|
43 |
- the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html |
|
44 |
|
|
45 |
- some best practices |
|
46 |
|
|
47 |
Checkstyle is very configurable. Be sure to read the documentation at |
|
48 |
http://checkstyle.sf.net (or in your downloaded distribution). |
|
49 |
|
|
50 |
Most Checks are configurable, be sure to consult the documentation. |
|
51 |
|
|
52 |
To completely disable a check, just comment it out or delete it from the file. |
|
53 |
|
|
54 |
Finally, it is worth reading the documentation. |
|
55 |
|
|
56 |
--> |
|
57 |
|
|
58 |
<module name="Checker"> |
|
59 |
<!-- |
|
60 |
If you set the basedir property below, then all reported file |
|
61 |
names will be relative to the specified directory. See |
|
62 |
http://checkstyle.sourceforge.net/5.x/config.html#Checker |
|
63 |
|
|
64 |
<property name="basedir" value="${basedir}"/> |
|
65 |
--> |
|
66 |
<!-- gvSIG: All project files have the ISO-8859-1 charset --> |
|
67 |
<property name="charset" value="ISO-8859-1" /> |
|
68 |
|
|
69 |
<!-- Checks that a package-info.java file exists for each package. --> |
|
70 |
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> |
|
71 |
<module name="JavadocPackage"> |
|
72 |
<property name="allowLegacy" value="true" /> |
|
73 |
</module> |
|
74 |
|
|
75 |
<!-- Checks whether files end with a new line. --> |
|
76 |
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> |
|
77 |
<module name="NewlineAtEndOfFile"/> |
|
78 |
|
|
79 |
<!-- Checks that property files contain the same keys. --> |
|
80 |
<!-- See http://checkstyle.sf.net/config_misc.html#Translation --> |
|
81 |
<module name="Translation"/> |
|
82 |
|
|
83 |
<!-- Checks for Size Violations. --> |
|
84 |
<!-- See http://checkstyle.sf.net/config_sizes.html --> |
|
85 |
<module name="FileLength"/> |
|
86 |
|
|
87 |
<!-- Checks for whitespace --> |
|
88 |
<!-- See http://checkstyle.sf.net/config_whitespace.html --> |
|
89 |
<module name="FileTabCharacter"/> |
|
90 |
|
|
91 |
|
|
92 |
<module name="TreeWalker"> |
|
93 |
|
|
94 |
<!-- Miscellaneous other checks. --> |
|
95 |
<!-- See http://checkstyle.sf.net/config_misc.html --> |
|
96 |
<!-- gvSIG: apply only to java files --> |
|
97 |
<module name="RegexpSinglelineJava"> |
|
98 |
<property name="format" value="\s+$"/> |
|
99 |
<property name="minimum" value="0"/> |
|
100 |
<property name="maximum" value="0"/> |
|
101 |
<property name="message" value="Line has trailing spaces."/> |
|
102 |
<property name="ignoreComments" value="true"/> |
|
103 |
</module> |
|
104 |
|
|
105 |
<!-- Checks for Javadoc comments. --> |
|
106 |
<!-- See http://checkstyle.sf.net/config_javadoc.html --> |
|
107 |
<!-- |
|
108 |
gvSIG rule 3: All protected or public classes must have a Javadoc comments, |
|
109 |
except getters and setters |
|
110 |
--> |
|
111 |
<module name="JavadocMethod"> |
|
112 |
<property name="scope" value="protected" /> |
|
113 |
<property name="allowMissingPropertyJavadoc" value="true" /> |
|
114 |
</module> |
|
115 |
<!-- |
|
116 |
gvSIG rule 9: All classes must have a Javadoc comment |
|
117 |
with the "@author tag" and the "@version $Id$" tag included |
|
118 |
--> |
|
119 |
<module name="JavadocType"> |
|
120 |
<property name="scope" value="private" /> |
|
121 |
<property name="authorFormat" value="\S" /> |
|
122 |
<property name="versionFormat" value="\$Id.*\$"/> |
|
123 |
</module> |
|
124 |
<module name="JavadocVariable"> |
|
125 |
<property name="scope" value="protected" /> |
|
126 |
</module> |
|
127 |
<!-- gvSIG rule 3: Check correctly formatted Javadoc --> |
|
128 |
<module name="JavadocStyle"> |
|
129 |
<property name="scope" value="protected" /> |
|
130 |
</module> |
|
131 |
|
|
132 |
|
|
133 |
<!-- Checks for Naming Conventions. --> |
|
134 |
<!-- See http://checkstyle.sf.net/config_naming.html --> |
|
135 |
<module name="ConstantName"/> |
|
136 |
<module name="LocalFinalVariableName"/> |
|
137 |
<module name="LocalVariableName"/> |
|
138 |
<module name="MemberName"/> |
|
139 |
<module name="MethodName"/> |
|
140 |
<!-- gvSIG rule 15: All packages must begin with org.gvsig. --> |
|
141 |
<module name="PackageName"> |
|
142 |
<property name="format" value="^org\.gvsig(\.[a-z][a-z0-9]*)+$" /> |
|
143 |
</module> |
|
144 |
<!-- gvSIG advised rule 1: Abstract class names must begin with Abstract. --> |
|
145 |
<!-- module name="AbstractClassName" /--> |
|
146 |
<module name="ParameterName"/> |
|
147 |
<module name="StaticVariableName"/> |
|
148 |
<module name="TypeName"/> |
|
149 |
|
|
150 |
<!-- Checks for imports --> |
|
151 |
<!-- See http://checkstyle.sf.net/config_import.html --> |
|
152 |
<module name="AvoidStarImport"/> |
|
153 |
<module name="IllegalImport"/> <!-- defaults to sun.* packages --> |
|
154 |
<module name="RedundantImport"/> |
|
155 |
<module name="UnusedImports"/> |
|
156 |
|
|
157 |
|
|
158 |
<!-- Checks for Size Violations. --> |
|
159 |
<!-- See http://checkstyle.sf.net/config_sizes.html --> |
|
160 |
<module name="LineLength"/> |
|
161 |
<module name="MethodLength"/> |
|
162 |
<module name="ParameterNumber"/> |
|
163 |
|
|
164 |
|
|
165 |
<!-- Checks for whitespace --> |
|
166 |
<!-- See http://checkstyle.sf.net/config_whitespace.html --> |
|
167 |
<module name="EmptyForIteratorPad"/> |
|
168 |
<module name="GenericWhitespace"/> |
|
169 |
<module name="MethodParamPad"/> |
|
170 |
<module name="NoWhitespaceAfter"/> |
|
171 |
<module name="NoWhitespaceBefore"/> |
|
172 |
<module name="OperatorWrap"/> |
|
173 |
<module name="ParenPad"/> |
|
174 |
<module name="TypecastParenPad"/> |
|
175 |
<module name="WhitespaceAfter"/> |
|
176 |
<module name="WhitespaceAround"/> |
|
177 |
|
|
178 |
|
|
179 |
<!-- Modifier Checks --> |
|
180 |
<!-- See http://checkstyle.sf.net/config_modifiers.html --> |
|
181 |
<module name="ModifierOrder"/> |
|
182 |
<module name="RedundantModifier"/> |
|
183 |
|
|
184 |
|
|
185 |
<!-- Checks for blocks. You know, those {}'s --> |
|
186 |
<!-- See http://checkstyle.sf.net/config_blocks.html --> |
|
187 |
<module name="AvoidNestedBlocks"/> |
|
188 |
<module name="EmptyBlock"/> |
|
189 |
<module name="LeftCurly"/> |
|
190 |
<module name="NeedBraces"/> |
|
191 |
<module name="RightCurly"/> |
|
192 |
|
|
193 |
|
|
194 |
<!-- Checks for common coding problems --> |
|
195 |
<!-- See http://checkstyle.sf.net/config_coding.html --> |
|
196 |
<module name="AvoidInlineConditionals"/> |
|
197 |
<module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> |
|
198 |
<module name="EmptyStatement"/> |
|
199 |
<module name="EqualsHashCode"/> |
|
200 |
<module name="HiddenField"/> |
|
201 |
<module name="IllegalInstantiation"/> |
|
202 |
<module name="InnerAssignment"/> |
|
203 |
<module name="MagicNumber"/> |
|
204 |
<module name="MissingSwitchDefault"/> |
|
205 |
<module name="RedundantThrows"/> |
|
206 |
<module name="SimplifyBooleanExpression"/> |
|
207 |
<module name="SimplifyBooleanReturn"/> |
|
208 |
|
|
209 |
<!-- gvSIG: Check for some common programming errors --> |
|
210 |
<module name="CovariantEquals" /> |
|
211 |
<module name="StringLiteralEquality" /> |
|
212 |
|
|
213 |
<!-- Checks for class design --> |
|
214 |
<!-- See http://checkstyle.sf.net/config_design.html --> |
|
215 |
<module name="DesignForExtension"/> |
|
216 |
<module name="FinalClass"/> |
|
217 |
<module name="HideUtilityClassConstructor"/> |
|
218 |
<module name="InterfaceIsType"/> |
|
219 |
<module name="VisibilityModifier"/> |
|
220 |
|
|
221 |
|
|
222 |
<!-- Miscellaneous other checks. --> |
|
223 |
<!-- See http://checkstyle.sf.net/config_misc.html --> |
|
224 |
<module name="ArrayTypeStyle"/> |
|
225 |
<!-- gvSIG: removed --> |
|
226 |
<!-- module name="FinalParameters"/--> |
|
227 |
<module name="TodoComment"/> |
|
228 |
<module name="UpperEll"/> |
|
229 |
|
|
230 |
<!-- gvSIG rule 2: Sun style with 4 spaces --> |
|
231 |
<module name="Indentation"> |
|
232 |
<property name="basicOffset" value="4"/> |
|
233 |
<property name="caseIndent" value="0"/> |
|
234 |
</module> |
|
235 |
|
|
236 |
<!-- gvSIG rule 10: Do not use System.out/err to log --> |
|
237 |
<module name="Regexp"> |
|
238 |
<!-- . matches any character, so we need to escape it and use \. |
|
239 |
to match dots.--> |
|
240 |
<property name="format" value="System\.[out|err]\.println"/> |
|
241 |
<property name="illegalPattern" value="true"/> |
|
242 |
</module> |
|
243 |
|
|
244 |
<!-- gvSIG rule 11: Try to avoid catching Throwable or |
|
245 |
Exception and catch specific exceptions instead. --> |
|
246 |
<module name="IllegalCatch"/> |
|
247 |
|
|
248 |
<!-- gvSIG rule 13: Use interfaces in the declaration of |
|
249 |
methods and variables. |
|
250 |
By default only avoids usage of Classes: |
|
251 |
"java.util.GregorianCalendar, java.util.Hashtable, |
|
252 |
java.util.HashSet, java.util.HashMap, java.util.ArrayList, |
|
253 |
java.util.LinkedList, java.util.LinkedHashMap, |
|
254 |
java.util.LinkedHashSet, java.util.TreeSet, |
|
255 |
java.util.TreeMap, java.util.Vector" --> |
|
256 |
<module name="IllegalType"> |
|
257 |
<property name="ignoredMethodNames" value="getInstance"/> |
|
258 |
</module> |
|
259 |
|
|
260 |
</module> |
|
261 |
|
|
262 |
<!-- gvSIG rule 1: check for the gvSIG header --> |
|
263 |
<!-- Uneeded, use the maven-license-plugin instead |
|
264 |
<module name="RegexpHeader"> --> |
|
265 |
<!-- The follow property value demonstrates the ability --> |
|
266 |
<!-- to have access to ANT properties. In this case it uses --> |
|
267 |
<!-- the ${basedir} property to allow Checkstyle to be run --> |
|
268 |
<!-- from any directory within a project. See property --> |
|
269 |
<!-- expansion, --> |
|
270 |
<!-- http://checkstyle.sf.net/config.html#properties --> |
|
271 |
<!-- |
|
272 |
<property name="headerFile" value="${checkstyle.header.file}" /> |
|
273 |
</module> |
|
274 |
--> |
|
275 |
|
|
276 |
</module> |
|
0 | 277 |
tags/org.gvsig.desktop-2.0.274/org.gvsig.desktop.buildtools/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.desktop.buildtools</artifactId> |
|
6 |
<version>1.0.0</version> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<name>${project.artifactId}</name> |
|
9 |
<description>Resources used for build gvsig desktop</description> |
|
10 |
|
|
11 |
|
|
12 |
<!-- No puede ser hijo de org.gvsig.desktop para evitar referencas circulares --> |
|
13 |
<!-- |
|
14 |
<parent> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.desktop</artifactId> |
|
17 |
<version>2.0.10-SNAPSHOT</version> |
|
18 |
</parent> |
|
19 |
--> |
|
20 |
|
|
21 |
|
|
22 |
<licenses> |
|
23 |
<license> |
|
24 |
<name>GPLv3</name> |
|
25 |
<url>http://www.gnu.org/licenses/gpl.html</url> |
|
26 |
<distribution>repo</distribution> |
|
27 |
<comments> |
|
28 |
"GPL" stands for "General Public License". The most widespread such |
|
29 |
license is the GNU General Public License, or GNU GPL for short. |
|
30 |
This can be further shortened to "GPL", when it is understood that |
|
31 |
the GNU GPL is the one intended. |
|
32 |
</comments> |
|
33 |
</license> |
|
34 |
</licenses> |
|
35 |
|
|
36 |
<organization> |
|
37 |
<name>gvSIG Association</name> |
|
38 |
<url>http://www.gvsig.com/</url> |
|
39 |
</organization> |
|
40 |
|
|
41 |
<scm> |
|
42 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/trunk</connection> |
|
43 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/trunk</developerConnection> |
|
44 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/trunk</url> |
|
45 |
</scm> |
|
46 |
|
|
47 |
<repositories> |
|
48 |
<repository> |
|
49 |
<id>gvsig-public-http-repository</id> |
|
50 |
<name>gvSIG maven public HTTP repository</name> |
|
51 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
52 |
<releases> |
|
53 |
<enabled>true</enabled> |
|
54 |
<updatePolicy>daily</updatePolicy> |
|
55 |
<checksumPolicy>warn</checksumPolicy> |
|
56 |
</releases> |
|
57 |
<snapshots> |
|
58 |
<enabled>true</enabled> |
|
59 |
<updatePolicy>daily</updatePolicy> |
|
60 |
<checksumPolicy>warn</checksumPolicy> |
|
61 |
</snapshots> |
|
62 |
</repository> |
|
63 |
</repositories> |
|
64 |
|
|
65 |
<distributionManagement> |
|
66 |
<site> |
|
67 |
<id>gvsig-repository</id> |
|
68 |
<url>dav:https://devel.gvsig.org/sites/${project.artifactId}/${project.version}</url> |
|
69 |
</site> |
|
70 |
<repository> |
|
71 |
<id>gvsig-repository</id> |
|
72 |
<name>gvSIG maven repository</name> |
|
73 |
<url>dav:https://devel.gvsig.org/m2repo/j2se</url> |
|
74 |
<uniqueVersion>false</uniqueVersion> |
|
75 |
</repository> |
|
76 |
<snapshotRepository> |
|
77 |
<id>gvsig-repository</id> |
|
78 |
<name>gvSIG maven repository</name> |
|
79 |
<url>dav:https://devel.gvsig.org/m2repo/j2se</url> |
|
80 |
<uniqueVersion>false</uniqueVersion> |
|
81 |
</snapshotRepository> |
|
82 |
</distributionManagement> |
|
83 |
|
|
84 |
<issueManagement> |
|
85 |
<system>redmine</system> |
|
86 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-desktop</url> |
|
87 |
</issueManagement> |
|
88 |
|
|
89 |
<mailingLists> |
|
90 |
<mailingList> |
|
91 |
<name>User List</name> |
|
92 |
<subscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios</subscribe> |
|
93 |
<unsubscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_usuarios</unsubscribe> |
|
94 |
<post>gvsig_usuarios@listserv.gva.es</post> |
|
95 |
<archive>http://www.gvsig.org/web/community/mailing-lists/gvsig-nabble</archive> |
|
96 |
<otherArchives> |
|
97 |
<otherArchive>http://www.mail-archive.com/gvsig_usuarios@runas.cap.gva.es</otherArchive> |
|
98 |
<otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive> |
|
99 |
</otherArchives> |
|
100 |
</mailingList> |
|
101 |
<mailingList> |
|
102 |
<name>Developer List</name> |
|
103 |
<subscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores</subscribe> |
|
104 |
<unsubscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores</unsubscribe> |
|
105 |
<post>gvsig_desarrolladores@listserv.gva.es</post> |
|
106 |
<archive>http://www.gvsig.org/web/community/mailing-lists/gvsig-nabble</archive> |
|
107 |
<otherArchives> |
|
108 |
<otherArchive>http://www.mail-archive.com/gvsig_desarrolladores@runas.cap.gva.es</otherArchive> |
|
109 |
<otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive> |
|
110 |
</otherArchives> |
|
111 |
</mailingList> |
|
112 |
<mailingList> |
|
113 |
<name>International List</name> |
|
114 |
<subscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</subscribe> |
|
115 |
<unsubscribe>http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</unsubscribe> |
|
116 |
<post>gvsig_internacional@listserv.gva.es</post> |
|
117 |
<archive>http://www.gvsig.org/web/community/mailing-lists/gvsig-nabble</archive> |
|
118 |
<otherArchives> |
|
119 |
<otherArchive>http://www.mail-archive.com/gvsig_internacional@runas.cap.gva.es</otherArchive> |
|
120 |
<otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive> |
|
121 |
</otherArchives> |
|
122 |
</mailingList> |
|
123 |
</mailingLists> |
|
124 |
|
|
125 |
<build> |
|
126 |
<extensions> |
|
127 |
<extension> |
|
128 |
<groupId>org.apache.maven.wagon</groupId> |
|
129 |
<artifactId>wagon-webdav-jackrabbit</artifactId> |
|
130 |
<version>1.0-beta-7</version> |
|
131 |
</extension> |
|
132 |
</extensions> |
|
133 |
</build> |
|
134 |
|
|
135 |
</project> |
|
0 | 136 |
tags/org.gvsig.desktop-2.0.274/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.geometry/org.gvsig.expressionevaluator.geometry.lib/org.gvsig.expressionevaluator.geometry.lib.impl/src/test/resources/log4j.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
|
2 |
<!-- |
|
3 |
|
|
4 |
gvSIG. Desktop Geographic Information System. |
|
5 |
|
|
6 |
Copyright (C) 2007-2012 gvSIG Association. |
|
7 |
|
|
8 |
This program is free software; you can redistribute it and/or |
|
9 |
modify it under the terms of the GNU General Public License |
|
10 |
as published by the Free Software Foundation; either version 2 |
|
11 |
of the License, or (at your option) any later version. |
|
12 |
|
|
13 |
This program is distributed in the hope that it will be useful, |
|
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
GNU General Public License for more details. |
|
17 |
|
|
18 |
You should have received a copy of the GNU General Public License |
|
19 |
along with this program; if not, write to the Free Software |
|
20 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
MA 02110-1301, USA. |
|
22 |
|
|
23 |
For any additional information, do not hesitate to contact us |
|
24 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
25 |
|
|
26 |
--> |
|
27 |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> |
|
28 |
|
|
29 |
<!-- |
|
30 |
Log4J configuration file for unit tests execution. |
|
31 |
--> |
|
32 |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> |
|
33 |
|
|
34 |
<!-- Appender configuration to show logging messages through the console --> |
|
35 |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> |
|
36 |
<layout class="org.apache.log4j.PatternLayout"> |
|
37 |
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n %m%n" /> |
|
38 |
</layout> |
|
39 |
</appender> |
|
40 |
|
|
41 |
<!-- |
|
42 |
Activate logging messages of DEBUG level of higher only for the |
|
43 |
org.gvsig.tools packages. |
|
44 |
You can put full classes names or packages instead, to configure |
|
45 |
logging for all the classes and subpackages of the package. |
|
46 |
--> |
|
47 |
<category name="org.gvsig.tools"> |
|
48 |
<priority value="DEBUG" /> |
|
49 |
</category> |
|
50 |
<category name="org.gvsig.construc"> |
|
51 |
<priority value="DEBUG" /> |
|
52 |
</category> |
|
53 |
|
|
54 |
<!-- |
|
55 |
By default, show only logging messages of INFO level or higher, |
|
56 |
through the previously configured CONSOLE appender. |
|
57 |
--> |
|
58 |
<root> |
|
59 |
<priority value="INFO" /> |
|
60 |
<appender-ref ref="CONSOLE" /> |
|
61 |
</root> |
|
62 |
</log4j:configuration> |
tags/org.gvsig.desktop-2.0.274/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.geometry/org.gvsig.expressionevaluator.geometry.lib/org.gvsig.expressionevaluator.geometry.lib.impl/src/test/java/org/gvsig/expresionevaluator/impl/TestCodeToValue.java | ||
---|---|---|
1 |
package org.gvsig.expresionevaluator.impl; |
|
2 |
|
|
3 |
import junit.framework.TestCase; |
|
4 |
import org.cresques.cts.IProjection; |
|
5 |
import org.gvsig.expressionevaluator.Code; |
|
6 |
import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator; |
|
7 |
import org.gvsig.expressionevaluator.ExpressionEvaluatorManager; |
|
8 |
import org.gvsig.expressionevaluator.GeometryExpressionBuilder; |
|
9 |
import org.gvsig.expressionevaluator.GeometryExpressionUtils; |
|
10 |
import org.gvsig.expressionevaluator.LexicalAnalyzer; |
|
11 |
import org.gvsig.fmap.crs.CRSFactory; |
|
12 |
import org.gvsig.fmap.geom.GeometryUtils; |
|
13 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
|
14 |
import org.gvsig.fmap.geom.primitive.Point; |
|
15 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
|
16 |
|
|
17 |
public class TestCodeToValue extends TestCase { |
|
18 |
|
|
19 |
public TestCodeToValue(String testName) { |
|
20 |
super(testName); |
|
21 |
} |
|
22 |
|
|
23 |
@Override |
|
24 |
protected void setUp() throws Exception { |
|
25 |
super.setUp(); |
|
26 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
27 |
} |
|
28 |
|
|
29 |
@Override |
|
30 |
protected void tearDown() throws Exception { |
|
31 |
super.tearDown(); |
|
32 |
} |
|
33 |
|
|
34 |
// TODO add test methods here. The name must begin with 'test'. For example: |
|
35 |
// public void testHello() {} |
|
36 |
|
|
37 |
protected LexicalAnalyzer createLexicalAnalyzer() { |
|
38 |
ExpressionEvaluatorManager manager = ExpressionEvaluatorLocator.getManager(); |
|
39 |
LexicalAnalyzer lexer = manager.createLexicalAnalyzer(); |
|
40 |
return lexer; |
|
41 |
} |
|
42 |
|
|
43 |
protected org.gvsig.expressionevaluator.Compiler createCompiler() { |
|
44 |
ExpressionEvaluatorManager manager = ExpressionEvaluatorLocator.getManager(); |
|
45 |
org.gvsig.expressionevaluator.Compiler compiler = manager.createCompiler(); |
|
46 |
compiler.setLexicalAnalyzer(createLexicalAnalyzer()); |
|
47 |
return compiler; |
|
48 |
} |
|
49 |
|
|
50 |
public Code compileExpression(String source) { |
|
51 |
org.gvsig.expressionevaluator.Compiler compiler = createCompiler(); |
|
52 |
Code code = compiler.compileExpression(source); |
|
53 |
return code; |
|
54 |
} |
|
55 |
|
|
56 |
public void test3() throws CreateGeometryException { |
|
57 |
GeometryExpressionBuilder builder = GeometryExpressionUtils.createExpressionBuilder(); |
|
58 |
|
|
59 |
IProjection proj = CRSFactory.getCRS("EPSG:4326"); |
|
60 |
Point point = GeometryUtils.createPoint(10, 20); |
|
61 |
|
|
62 |
builder.set( |
|
63 |
builder.ST_Intersects( |
|
64 |
builder.geometry(point,proj), |
|
65 |
builder.variable("the_geom") |
|
66 |
) |
|
67 |
); |
|
68 |
Code code = compileExpression(builder.toString()); |
|
69 |
assertEquals( |
|
70 |
"ST_Intersects(ST_GeomFromWKB(DECODE('000000000140240000000000004034000000000000', 'hex'), 4326), \"the_geom\")", |
|
71 |
code.toValue().toString() |
|
72 |
); |
|
73 |
} |
|
74 |
|
|
75 |
public void test4() throws CreateGeometryException { |
|
76 |
GeometryExpressionBuilder builder = GeometryExpressionUtils.createExpressionBuilder(); |
|
77 |
|
|
78 |
IProjection proj = CRSFactory.getCRS("EPSG:4326"); |
|
79 |
Point point = GeometryUtils.createPoint(10, 20); |
|
80 |
|
|
81 |
builder.set( |
|
82 |
builder.function("ST_Intersects2", |
|
83 |
builder.geometry(point,proj), |
|
84 |
builder.variable("the_geom") |
|
85 |
) |
|
86 |
); |
|
87 |
Code code = compileExpression(builder.toString()); |
|
88 |
assertEquals( |
|
89 |
"ST_Intersects2(ST_GeomFromWKB(DECODE('000000000140240000000000004034000000000000', 'hex'), 4326), \"the_geom\")", |
|
90 |
code.toValue().toString() |
|
91 |
); |
|
92 |
} |
|
93 |
|
|
94 |
} |
tags/org.gvsig.desktop-2.0.274/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.geometry/org.gvsig.expressionevaluator.geometry.lib/org.gvsig.expressionevaluator.geometry.lib.impl/src/test/java/org/gvsig/expresionevaluator/impl/TestCompiler.java | ||
---|---|---|
1 |
package org.gvsig.expresionevaluator.impl; |
|
2 |
|
|
3 |
import junit.framework.TestCase; |
|
4 |
import org.gvsig.expressionevaluator.LexicalAnalyzer; |
|
5 |
import org.gvsig.expressionevaluator.Compiler; |
|
6 |
import org.gvsig.expressionevaluator.Code; |
|
7 |
import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator; |
|
8 |
import org.gvsig.expressionevaluator.ExpressionEvaluatorManager; |
|
9 |
import org.gvsig.expressionevaluator.ExpressionSyntaxException; |
|
10 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
|
11 |
|
|
12 |
|
|
13 |
public class TestCompiler extends TestCase { |
|
14 |
|
|
15 |
public TestCompiler(String testName) { |
|
16 |
super(testName); |
|
17 |
} |
|
18 |
|
|
19 |
@Override |
|
20 |
protected void setUp() throws Exception { |
|
21 |
super.setUp(); |
|
22 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
23 |
} |
|
24 |
|
|
25 |
@Override |
|
26 |
protected void tearDown() throws Exception { |
|
27 |
super.tearDown(); |
|
28 |
} |
|
29 |
|
|
30 |
// TODO add test methods here. The name must begin with 'test'. For example: |
|
31 |
// public void testHello() {} |
|
32 |
|
|
33 |
|
|
34 |
protected LexicalAnalyzer createLexicalAnalyzer() { |
|
35 |
ExpressionEvaluatorManager manager = ExpressionEvaluatorLocator.getManager(); |
|
36 |
LexicalAnalyzer lexer = manager.createLexicalAnalyzer(); |
|
37 |
return lexer; |
|
38 |
} |
|
39 |
|
|
40 |
protected org.gvsig.expressionevaluator.Compiler createCompiler() { |
|
41 |
ExpressionEvaluatorManager manager = ExpressionEvaluatorLocator.getManager(); |
|
42 |
Compiler compiler = manager.createCompiler(); |
|
43 |
compiler.setLexicalAnalyzer(createLexicalAnalyzer()); |
|
44 |
return compiler; |
|
45 |
} |
|
46 |
|
|
47 |
public void testIdentifier1() { |
|
48 |
String source = "precio"; |
|
49 |
|
|
50 |
Compiler compiler = createCompiler(); |
|
51 |
Code code = compiler.compileExpression(source); |
|
52 |
assertEquals("\"precio\"", code.toString()); |
|
53 |
} |
|
54 |
|
|
55 |
public void testIdentifier2() { |
|
56 |
Compiler compiler = createCompiler(); |
|
57 |
compiler.getLexicalAnalyzer().setUseBracketsForIdentifiers(true); |
|
58 |
|
|
59 |
String source = "[precio]"; |
|
60 |
|
|
61 |
Code code = compiler.compileExpression(source); |
|
62 |
assertEquals("\"precio\"", code.toString()); |
|
63 |
} |
|
64 |
|
|
65 |
public void testIdentifier3() { |
|
66 |
Compiler compiler = createCompiler(); |
|
67 |
|
|
68 |
String source = "\"precio\""; |
|
69 |
|
|
70 |
Code code = compiler.compileExpression(source); |
|
71 |
assertEquals("\"precio\"", code.toString()); |
|
72 |
} |
|
73 |
|
|
74 |
|
|
75 |
public void testTrue() { |
|
76 |
String source = "true"; |
|
77 |
|
|
78 |
Compiler compiler = createCompiler(); |
|
79 |
Code code = compiler.compileExpression(source); |
|
80 |
assertEquals("TRUE", code.toString()); |
|
81 |
} |
|
82 |
|
|
83 |
public void testFalse() { |
|
84 |
String source = "false"; |
|
85 |
|
|
86 |
Compiler compiler = createCompiler(); |
|
87 |
Code code = compiler.compileExpression(source); |
|
88 |
assertEquals("FALSE", code.toString()); |
|
89 |
} |
|
90 |
|
|
91 |
public void testNull() { |
|
92 |
String source = "null"; |
|
93 |
|
|
94 |
Compiler compiler = createCompiler(); |
|
95 |
Code code = compiler.compileExpression(source); |
|
96 |
assertEquals("NULL", code.toString()); |
|
97 |
} |
|
98 |
|
|
99 |
public void testIsNull() { |
|
100 |
String source = "10 is null"; |
|
101 |
|
|
102 |
Compiler compiler = createCompiler(); |
|
103 |
Code code = compiler.compileExpression(source); |
|
104 |
assertEquals("(10 IS NULL)", code.toString()); |
|
105 |
} |
|
106 |
|
|
107 |
public void testIsNotNull() { |
|
108 |
String source = "10 is not null"; |
|
109 |
|
|
110 |
Compiler compiler = createCompiler(); |
|
111 |
Code code = compiler.compileExpression(source); |
|
112 |
assertEquals("NOT((10 IS NULL))", code.toString()); |
|
113 |
} |
|
114 |
|
|
115 |
public void testNotTrue() { |
|
116 |
String source = "not true"; |
|
117 |
|
|
118 |
Compiler compiler = createCompiler(); |
|
119 |
Code code = compiler.compileExpression(source); |
|
120 |
assertEquals("NOT(TRUE)", code.toString()); |
|
121 |
} |
|
122 |
|
|
123 |
public void testInteger() { |
|
124 |
String source = "23"; |
|
125 |
|
|
126 |
Compiler compiler = createCompiler(); |
|
127 |
Code code = compiler.compileExpression(source); |
|
128 |
assertEquals("23", code.toString()); |
|
129 |
} |
|
130 |
|
|
131 |
public void operator(String operatorName) { |
|
132 |
String source = "precio " + operatorName + " 23"; |
|
133 |
|
|
134 |
Compiler compiler = createCompiler(); |
|
135 |
Code code = compiler.compileExpression(source); |
|
136 |
assertEquals("(\"precio\" "+ operatorName + " 23)", code.toString()); |
|
137 |
} |
|
138 |
|
|
139 |
public void testOperators() { |
|
140 |
|
|
141 |
operator("="); |
|
142 |
operator("<>"); |
|
143 |
operator(">"); |
|
144 |
operator(">="); |
|
145 |
operator("<"); |
|
146 |
operator("<="); |
|
147 |
operator("LIKE"); |
|
148 |
operator("ILIKE"); |
|
149 |
operator("||"); |
|
150 |
operator("+"); |
|
151 |
operator("-"); |
|
152 |
operator("*"); |
|
153 |
operator("OR"); |
|
154 |
operator("AND"); |
|
155 |
operator("%"); |
|
156 |
operator("IS"); |
|
157 |
|
|
158 |
operator("~"); |
|
159 |
} |
|
160 |
|
Also available in: Unified diff