Revision 41090
tags/org.gvsig.desktop-2.0.23/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.23/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 -Dmaven.test.skip=true -Dsource.skip=true -DskipTests -Dmaven.javadoc.skip=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 |
Another option that works on Windows in declaring the user and password in the command: |
|
346 |
|
|
347 |
mvn release:prepare -Dusername=[username] -Dpassword=[password] |
|
348 |
|
|
349 |
|
tags/org.gvsig.desktop-2.0.23/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.23/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.23/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.23/org.gvsig.desktop.library/org.gvsig.utils/src/test/java/org/gvsig/utils/DoubleUtilitiesTest.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 gvSIG Association. |
|
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 3 |
|
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 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
package org.gvsig.utils; |
|
25 |
|
|
26 |
import org.gvsig.utils.DoubleUtilities; |
|
27 |
|
|
28 |
import junit.framework.TestCase; |
|
29 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
30 |
* |
|
31 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
32 |
* |
|
33 |
* This program is free software; you can redistribute it and/or |
|
34 |
* modify it under the terms of the GNU General Public License |
|
35 |
* as published by the Free Software Foundation; either version 2 |
|
36 |
* of the License, or (at your option) any later version. |
|
37 |
* |
|
38 |
* This program is distributed in the hope that it will be useful, |
|
39 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
40 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
41 |
* GNU General Public License for more details. |
|
42 |
* |
|
43 |
* You should have received a copy of the GNU General Public License |
|
44 |
* along with this program; if not, write to the Free Software |
|
45 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
46 |
* |
|
47 |
* For more information, contact: |
|
48 |
* |
|
49 |
* Generalitat Valenciana |
|
50 |
* Conselleria d'Infraestructures i Transport |
|
51 |
* Av. Blasco Ib??ez, 50 |
|
52 |
* 46010 VALENCIA |
|
53 |
* SPAIN |
|
54 |
* |
|
55 |
* +34 963862235 |
|
56 |
* gvsig@gva.es |
|
57 |
* www.gvsig.gva.es |
|
58 |
* |
|
59 |
* or |
|
60 |
* |
|
61 |
* IVER T.I. S.A |
|
62 |
* Salamanca 50 |
|
63 |
* 46005 Valencia |
|
64 |
* Spain |
|
65 |
* |
|
66 |
* +34 963163400 |
|
67 |
* dac@iver.es |
|
68 |
*/ |
|
69 |
/* CVS MESSAGES: |
|
70 |
* |
|
71 |
* $Id: DoubleUtilitiesTest.java 29631 2009-06-29 16:56:19Z jpiera $ |
|
72 |
* $Log$ |
|
73 |
* Revision 1.2 2006-11-06 07:29:59 jaume |
|
74 |
* organize imports |
|
75 |
* |
|
76 |
* Revision 1.1 2006/05/16 13:02:41 jorpiell |
|
77 |
* Se ha a?adido la clase DoubleUtiles, donde ha un metodo para limitar el tama?o de los decimales de un double y para quitar los "puntos" de la parte entera |
|
78 |
* |
|
79 |
* |
|
80 |
*/ |
|
81 |
/** |
|
82 |
* Para probar los double utilities |
|
83 |
* @author Jorge Piera Llodr? (piera_jor@gva.es) |
|
84 |
*/ |
|
85 |
public class DoubleUtilitiesTest extends TestCase { |
|
86 |
public void testDouble(){ |
|
87 |
double numero = 1.36645345645; |
|
88 |
numero = DoubleUtilities.format(numero,".".charAt(0),4); |
|
89 |
assertEquals(numero,1.3665,0.00000000001); |
|
90 |
} |
|
91 |
} |
|
0 | 92 |
tags/org.gvsig.desktop-2.0.23/org.gvsig.desktop.library/org.gvsig.utils/src/test/java/org/gvsig/utils/TestMathExtension.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 gvSIG Association. |
|
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 3 |
|
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 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
package org.gvsig.utils; |
|
25 |
|
|
26 |
import org.gvsig.utils.MathExtension; |
|
27 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
28 |
* |
|
29 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
30 |
* |
|
31 |
* This program is free software; you can redistribute it and/or |
|
32 |
* modify it under the terms of the GNU General Public License |
|
33 |
* as published by the Free Software Foundation; either version 2 |
|
34 |
* of the License, or (at your option) any later version. |
|
35 |
* |
|
36 |
* This program is distributed in the hope that it will be useful, |
|
37 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
38 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
39 |
* GNU General Public License for more details. |
|
40 |
* |
|
41 |
* You should have received a copy of the GNU General Public License |
|
42 |
* along with this program; if not, write to the Free Software |
|
43 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
44 |
* |
|
45 |
* For more information, contact: |
|
46 |
* |
|
47 |
* Generalitat Valenciana |
|
48 |
* Conselleria d'Infraestructures i Transport |
|
49 |
* Av. Blasco Ib??ez, 50 |
|
50 |
* 46010 VALENCIA |
|
51 |
* SPAIN |
|
52 |
* |
|
53 |
* +34 963862235 |
|
54 |
* gvsig@gva.es |
|
55 |
* www.gvsig.gva.es |
|
56 |
* |
|
57 |
* or |
|
58 |
* |
|
59 |
* IVER T.I. S.A |
|
60 |
* Salamanca 50 |
|
61 |
* 46005 Valencia |
|
62 |
* Spain |
|
63 |
* |
|
64 |
* +34 963163400 |
|
65 |
* dac@iver.es |
|
66 |
*/ |
|
67 |
|
|
68 |
/** |
|
69 |
* Tests for the MathExtension class |
|
70 |
* |
|
71 |
* @author Pablo Piqueras Bartolom? (p_queras@hotmail.com) |
|
72 |
*/ |
|
73 |
public class TestMathExtension { |
|
74 |
/** |
|
75 |
* Test method for the TestMathExtension class |
|
76 |
* |
|
77 |
* @param args |
|
78 |
*/ |
|
79 |
public static void main(String[] args) |
|
80 |
{ |
|
81 |
// Test 1 |
|
82 |
System.out.println("Test 1 -> log2(1)"); |
|
83 |
showResultState(0, MathExtension.log2(1), 1); |
|
84 |
|
|
85 |
// Test 2 |
|
86 |
System.out.println("Test 2 -> log2(16)"); |
|
87 |
showResultState(4, MathExtension.log2(16), 2); |
|
88 |
|
|
89 |
// Test 3 |
|
90 |
System.out.println("Test 3 -> log2Integer(15)"); |
|
91 |
showResultState(3, MathExtension.log2Integer(15), 3); |
|
92 |
|
|
93 |
// Test 4 |
|
94 |
System.out.println("Test 4 -> log2Integer(64)"); |
|
95 |
showResultState(6, MathExtension.log2Integer(64), 4); |
|
96 |
|
|
97 |
// Test 5 |
|
98 |
System.out.println("Test 5 -> logX(e2, e6)"); |
|
99 |
showResultState(3, MathExtension.logX(Math.pow(Math.E, 2), Math.pow(Math.E, 6)), 5); |
|
100 |
|
|
101 |
// Test 6 |
|
102 |
System.out.println("Test 6 -> logXInteger(5, 137.43)"); |
|
103 |
showResultState(3, MathExtension.logXInteger(5, 137.43), 6); |
|
104 |
|
|
105 |
|
|
106 |
// There might be more tests |
|
107 |
|
|
108 |
} |
|
109 |
|
|
110 |
/** |
|
111 |
* Indicates if the result of the current test has been successfull or not |
|
112 |
* |
|
113 |
* @param correct The correct result |
|
114 |
* @param result The result of the operation |
|
115 |
* @param testNumber The numer of the current test |
|
116 |
*/ |
|
117 |
private static void showResultState(double correct, double result, int testNumber) { |
|
118 |
if (correct == result) |
|
119 |
System.out.println("Test " + testNumber + " OK (Result: " + result + ")"); |
|
120 |
else |
|
121 |
System.out.println("Test " + testNumber + " FAILED (Result: " + result + ")"); |
|
122 |
} |
|
123 |
} |
|
0 | 124 |
tags/org.gvsig.desktop-2.0.23/org.gvsig.desktop.library/org.gvsig.utils/src/test/java/org/gvsig/utils/stringNumberUtilities/TestStringNumberUtilities.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 gvSIG Association. |
|
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 3 |
|
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 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
23 |
*/ |
|
24 |
package org.gvsig.utils.stringNumberUtilities; |
|
25 |
|
|
26 |
import org.gvsig.utils.stringNumberUtilities.StringNumberUtilities; |
|
27 |
|
|
28 |
import junit.framework.TestCase; |
|
29 |
|
|
30 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
31 |
* |
|
32 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
33 |
* |
|
34 |
* This program is free software; you can redistribute it and/or |
|
35 |
* modify it under the terms of the GNU General Public License |
|
36 |
* as published by the Free Software Foundation; either version 2 |
|
37 |
* of the License, or (at your option) any later version. |
|
38 |
* |
|
39 |
* This program is distributed in the hope that it will be useful, |
|
40 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
41 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
42 |
* GNU General Public License for more details. |
|
43 |
* |
|
44 |
* You should have received a copy of the GNU General Public License |
|
45 |
* along with this program; if not, write to the Free Software |
|
46 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
47 |
* |
|
48 |
* For more information, contact: |
|
49 |
* |
|
50 |
* Generalitat Valenciana |
|
51 |
* Conselleria d'Infraestructures i Transport |
|
52 |
* Av. Blasco Ib??ez, 50 |
|
53 |
* 46010 VALENCIA |
|
54 |
* SPAIN |
|
55 |
* |
|
56 |
* +34 963862235 |
|
57 |
* gvsig@gva.es |
|
58 |
* www.gvsig.gva.es |
|
59 |
* |
|
60 |
* or |
|
61 |
* |
|
62 |
* IVER T.I. S.A |
|
63 |
* Salamanca 50 |
|
64 |
* 46005 Valencia |
|
65 |
* Spain |
|
66 |
* |
|
67 |
* +34 963163400 |
|
68 |
* dac@iver.es |
|
69 |
*/ |
|
70 |
|
|
71 |
/** |
|
72 |
* Tests the methods of the class StringNumberUtilities |
|
73 |
* |
|
74 |
* @author Pablo Piqueras Bartolom? (p_queras@hotmail.com) |
|
75 |
*/ |
|
76 |
public class TestStringNumberUtilities extends TestCase{ |
|
77 |
private String word; |
|
78 |
|
|
79 |
/* |
|
80 |
* (non-Javadoc) |
|
81 |
* @see junit.framework.TestCase#setUp() |
|
82 |
*/ |
|
83 |
protected void setUp() throws Exception { |
|
84 |
super.setUp(); |
|
85 |
word = new String(); |
|
86 |
} |
|
87 |
|
|
88 |
/* |
|
89 |
* (non-Javadoc) |
|
90 |
* @see junit.framework.TestCase#tearDown() |
|
91 |
*/ |
|
92 |
protected void tearDown() throws Exception { |
|
93 |
super.tearDown(); |
|
94 |
} |
|
95 |
|
|
96 |
/** |
|
97 |
* A test |
|
98 |
*/ |
|
99 |
public void test1() { |
|
100 |
word = "2.3"; |
|
101 |
ShowText.showIsNumberText(word); |
|
102 |
|
|
103 |
if (StringNumberUtilities.isNumber(word)) { |
|
104 |
ShowText.showYes(); |
|
105 |
} |
|
106 |
else { |
|
107 |
ShowText.showNo(); |
|
108 |
fail(); |
|
109 |
} |
|
110 |
} |
|
111 |
|
|
112 |
/** |
|
113 |
* A test |
|
114 |
*/ |
|
115 |
public void test2() { |
|
116 |
word = "a as wz rwa"; |
|
117 |
ShowText.showIsNumberText(word); |
|
118 |
|
|
119 |
if (StringNumberUtilities.isNumber(word)) { |
|
120 |
ShowText.showYes(); |
|
121 |
} |
|
122 |
else { |
|
123 |
ShowText.showNo(); |
|
124 |
fail(); |
|
125 |
} |
|
126 |
} |
|
127 |
|
|
128 |
/** |
|
129 |
* A test |
|
130 |
*/ |
|
131 |
public void test3() { |
|
132 |
word = "2"; |
|
133 |
ShowText.showIsNumberText(word); |
|
134 |
|
|
135 |
if (StringNumberUtilities.isNumber(word)) { |
|
136 |
ShowText.showYes(); |
|
137 |
} |
|
138 |
else { |
|
139 |
ShowText.showNo(); |
|
140 |
fail(); |
|
141 |
} |
|
142 |
} |
|
143 |
|
|
144 |
/** |
|
145 |
* A test |
|
146 |
*/ |
|
147 |
public void test4() { |
|
148 |
word = ""; |
|
149 |
ShowText.showIsNumberText(word); |
|
150 |
|
|
151 |
if (StringNumberUtilities.isNumber(word)) { |
|
152 |
ShowText.showYes(); |
|
153 |
} |
|
154 |
else { |
|
155 |
ShowText.showNo(); |
|
156 |
fail(); |
|
157 |
} |
|
158 |
} |
|
159 |
|
|
160 |
/** |
|
161 |
* A test |
|
162 |
*/ |
|
163 |
public void test5() { |
|
164 |
word = "-2.3"; |
|
165 |
ShowText.showIsNumberText(word); |
|
166 |
|
|
167 |
if (StringNumberUtilities.isNumber(word)) { |
|
168 |
ShowText.showYes(); |
|
169 |
} |
|
170 |
else { |
|
171 |
ShowText.showNo(); |
|
172 |
fail(); |
|
173 |
} |
|
174 |
} |
|
175 |
|
|
176 |
/** |
|
177 |
* A test |
|
178 |
*/ |
|
179 |
public void test6() { |
|
180 |
word = "-300"; |
|
181 |
ShowText.showIsNumberText(word); |
|
182 |
|
|
183 |
if (StringNumberUtilities.isNumber(word)) { |
|
184 |
ShowText.showYes(); |
|
185 |
} |
|
186 |
else { |
Also available in: Unified diff