Revision 29162

View differences:

tags/v2_0_0_Build_2005/build/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
5
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
6
	<modelVersion>4.0.0</modelVersion>
7
	<groupId>org.gvsig</groupId>
8
	<artifactId>gvsig-basepoms</artifactId>
9
	<packaging>pom</packaging>
10
	<version>2.0-SNAPSHOT</version>
11
	<name>gvsig-base-pom</name>
12
	<description>Base POM for all GvSIG projects</description>
13
	<url>http://www.gvsig.org/</url>
14
	<inceptionYear>2004</inceptionYear>
15
	<issueManagement>
16
		<system>trac</system>
17
		<url>https://gvsig.org/trac/bugtracking/</url>
18
	</issueManagement>
19
	<ciManagement></ciManagement>
20
	<mailingLists>
21
		<mailingList>
22
			<name>User List</name>
23
			<subscribe>http://runas.cap.gva.es/mailman/listinfo/gvsig_usuarios</subscribe>
24
			<unsubscribe>http://runas.cap.gva.es/mailman/listinfo/gvsig_usuarios</unsubscribe>
25
			<post>gvsig_usuarios@runas.cap.gva.es</post>
26
			<archive>https://gvsig.org/web/community/mailing-lists/gvsig-nabble</archive>
27
			<otherArchives>
28
				<otherArchive>http://www.mail-archive.com/gvsig_usuarios@runas.cap.gva.es</otherArchive>
29
				<otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive>
30
			</otherArchives>
31
		</mailingList>
32
		<mailingList>
33
			<name>Developer List</name>
34
			<subscribe>http://runas.cap.gva.es/mailman/listinfo/gvsig_desarrolladores</subscribe>
35
			<unsubscribe>http://runas.cap.gva.es/mailman/listinfo/gvsig_desarrolladores</unsubscribe>
36
			<post>gvsig_desarrolladores@runas.cap.gva.es</post>
37
			<archive>https://gvsig.org/web/community/mailing-lists/gvsig-nabble</archive>
38
			<otherArchives>
39
				<otherArchive>http://www.mail-archive.com/gvsig_desarrolladores@runas.cap.gva.es</otherArchive>
40
				<otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive>
41
			</otherArchives>
42
		</mailingList>
43
		<mailingList>
44
			<name>International List</name>
45
			<subscribe>http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional</subscribe>
46
			<unsubscribe>http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional</unsubscribe>
47
			<post>gvsig_internacional@runas.cap.gva.es</post>
48
			<archive>https://gvsig.org/web/community/mailing-lists/gvsig-nabble</archive>
49
			<otherArchives>
50
				<otherArchive>http://www.mail-archive.com/gvsig_internacional@runas.cap.gva.es</otherArchive>
51
				<otherArchive>http://dir.gmane.org/index.php?prefix=gmane.comp.gis.gvsig</otherArchive>
52
			</otherArchives>
53
		</mailingList>
54
	</mailingLists>
55
	<scm>
56
		<connection>
57
			scm:svn:http://subversion.gvsig.org/gvSIG/branches/v2_0_0_prep/	    
58
	    </connection>
59
		<developerConnection>
60
			scm:svn:https://gvsig.org/svn/gvSIG/branches/v2_0_0_prep/
61
	    </developerConnection>
62
		<url>http://subversion.gvsig.org/viewvc/?root=gvSIG</url>
63
		<tag>HEAD</tag>
64
	</scm>
65
	<organization>
66
		<name>gvSIG</name>
67
		<url>http://www.gvsig.org/</url>
68
	</organization>
69

  
70
	<licenses>
71
		<license>
72
			<name>GPL Version 2</name>
73
			<url>http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt</url>
74
			<distribution>repo</distribution>
75
			<comments>
76
				"GPL" stands for "General Public License". The most widespread such
77
				license is the GNU General Public License, or GNU GPL for short.
78
				This can be further shortened to "GPL", when it is understood that
79
				the
80
				GNU GPL is the one intended.
81
	      </comments>
82
		</license>
83
	</licenses>
84

  
85
	<!--
86
		Put here the global properties who use all the projects of GvSIG
87
	-->
88
	<properties>
89
		<gvsig-path><!-- Name property -->
90
			../build/product
91
		</gvsig-path>
92
		<gvsig-lib-dir>${gvsig-path}/lib</gvsig-lib-dir>
93
		<extension-dir>${gvsig-path}/gvSIG/extensiones
94
		</extension-dir>
95
		<build-dir>${basedir}</build-dir>
96
		<localRepository>${user.home}/.m2/repository</localRepository>
97
		<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
98
		<cdc-runtime>${localRepository}/com/sun/phoneme/btclasses/bn102/btclasses-bn102.zip${path.separator}${localRepository}/com/sun/phonemert/bn102/rt-bn102.jar${path.separator}${localRepository}/org/gvsig/mobile/cdc-addons/1.0-SNAPSHOT/cdc-addons-1.0-SNAPSHOT.jar</cdc-runtime>
99
	</properties>
100
	<repositories>
101
		<repository>
102
			<id>gvsig-public-http-repository</id>
103
			<name>gvSIG maven public HTTP repository</name>
104
			<url>http://downloads.gvsig.org/pub/gvSIG-desktop/maven-repository</url>
105
		</repository>
106
		<repository>
107
			<id>refractions</id>
108
			<name>Refractions Research Maven 2 Repository</name>
109
			<url>http://lists.refractions.net/m2
110
			</url>
111
		</repository>
112
		<repository>
113
			<id>geotools</id>
114
			<url>http://maven.geotools.fr/repository
115
			</url>
116
		</repository>
117
	</repositories>
118
	<distributionManagement>
119
		<repository>
120
			<id>gvsig-ftp-repository</id>
121
			<name>gvSIG maven FTP repository</name>
122
			<url>ftpes://downloads.gvsig.org/anon/pub/gvSIG-desktop/maven-repository</url>
123
		</repository>
124
		<snapshotRepository>
125
			<id>gvsig-ftp-repository</id>
126
			<name>gvSIG maven FTP repository</name>
127
			<url>ftpes://downloads.gvsig.org/anon/pub/gvSIG-desktop/maven-repository</url>
128
		</snapshotRepository>
129
	</distributionManagement>
130
	<dependencies>
131
		<dependency>
132
			<groupId>junit</groupId>
133
			<artifactId>junit</artifactId>
134
			<version>3.8.1</version>
135
			<scope>test</scope>
136
		</dependency>
137
		<dependency>
138
			<groupId>org.slf4j</groupId>
139
			<artifactId>slf4j-api</artifactId>
140
			<version>1.5.5</version>
141
		</dependency>
142
		<dependency>
143
			<groupId>org.slf4j</groupId>
144
			<artifactId>slf4j-log4j12</artifactId>
145
			<version>1.5.5</version>
146
			<scope>runtime</scope>
147
		</dependency>
148
		<dependency>
149
			<groupId>log4j</groupId>
150
			<artifactId>log4j</artifactId>
151
			<version>1.2.14</version>
152
			<!--
153
				TODO: Change to runtime when everything becomes migrated to SLF4J
154
			-->
155
			<scope>compile</scope>
156
		</dependency>
157
	</dependencies>
158
	<build>
159

  
160
		<extensions>
161
			<extension>
162
				<groupId>org.gvsig.maven.wagon</groupId>
163
				<artifactId>wagon-ftp</artifactId>
164
				<version>0.2</version>
165
			</extension>
166
		</extensions>
167
		<plugins>
168
			<plugin>
169
				<groupId>org.apache.maven.plugins</groupId>
170
				<artifactId>maven-compiler-plugin</artifactId>
171
				<configuration>
172
					<source>1.5</source>
173
					<target>1.5</target>
174
					<!-- put your configurations here -->
175
					<encoding>ISO-8859-1</encoding>
176
					<!--<failOnError>false</failOnError>-->
177
				</configuration>
178
			</plugin>
179
			<plugin>
180
				<groupId>org.apache.maven.plugins</groupId>
181
				<artifactId>maven-resources-plugin</artifactId>
182
				<configuration>
183
					<encoding>ISO-8859-1</encoding>
184
				</configuration>
185
			</plugin>
186

  
187
			<plugin>
188
				<groupId>org.apache.maven.plugins</groupId>
189
				<artifactId>maven-eclipse-plugin</artifactId>
190
				<configuration>
191
					<downloadSources>true</downloadSources>
192
					<downloadJavadocs>true</downloadJavadocs>
193
				</configuration>
194
			</plugin>
195
			<plugin>
196
				<groupId>org.apache.maven.plugins</groupId>
197
				<artifactId>maven-source-plugin</artifactId>
198
				<executions>
199
					<execution>
200
						<id>attach-sources</id>
201
						<goals>
202
							<goal>jar</goal>
203
						</goals>
204
					</execution>
205
				</executions>
206
			</plugin>
207
			<plugin>
208
				<groupId>org.apache.maven.plugins</groupId>
209
				<artifactId>maven-checkstyle-plugin</artifactId>
210
				<dependencies>
211
					<dependency>
212
						<groupId>checkstyle</groupId>
213
						<artifactId>checkstyle</artifactId>
214
						<version>4.4</version>
215
					</dependency>
216
					<dependency>
217
						<groupId>checkstyle</groupId>
218
						<artifactId>checkstyle-optional</artifactId>
219
						<version>4.4</version>
220
					</dependency>
221
					<dependency>
222
						<groupId>org.gvsig</groupId>
223
						<artifactId>build-tools</artifactId>
224
						<version>1.0</version>
225
					</dependency>
226
				</dependencies>
227
			</plugin>
228
			<plugin>
229
				<groupId>org.apache.maven.plugins</groupId>
230
				<artifactId>maven-eclipse-plugin</artifactId>
231
				<configuration>
232
					<projectNameTemplate>[artifactId]</projectNameTemplate>
233
				</configuration>
234
			</plugin>
235

  
236
		</plugins>
237
	</build>
238
	<profiles>
239
		<profile>
240
			<id>release</id>
241
			<build>
242
				<plugins>
243
					<plugin>
244
						<groupId>org.apache.maven.plugins</groupId>
245
						<artifactId>maven-javadoc-plugin</artifactId>
246
						<executions>
247
							<execution>
248
								<id>attach-javadocs</id>
249
								<goals>
250
									<goal>jar</goal>
251
								</goals>
252
							</execution>
253
						</executions>
254
					</plugin>
255
				</plugins>
256
			</build>
257
		</profile>
258

  
259
		<profile>
260
			<id>cdc</id>
261
			<activation>
262
				<activeByDefault>false</activeByDefault>
263
			</activation>
264
			<dependencies>
265
				<dependency>
266
					<groupId>com.sun.phoneme</groupId>
267
					<artifactId>btclasses</artifactId>
268
					<version>bn102</version>
269
					<type>zip</type>
270
				</dependency>
271
				<dependency>
272
					<groupId>com.sun.phoneme</groupId>
273
					<artifactId>rt</artifactId>
274
					<version>bn102</version>
275
				</dependency>
276
				<dependency>
277
					<groupId>org.gvsig.mobile</groupId>
278
					<artifactId>cdc-addons</artifactId>
279
					<version>1.0-SNAPSHOT</version>
280
				</dependency>
281
			</dependencies>
282
			<build>
283
				<!--
284
					finalName>${project.artifactId}.cdc-${project.version}-${buildnumber}</finalName
285
				-->
286
				<!--finalName>${project.artifactId}-cdc-${project.version}</finalName-->
287
				<plugins>
288
					<plugin>
289
						<groupId>org.apache.maven.plugins</groupId>
290
						<artifactId>maven-compiler-plugin</artifactId>
291
						<configuration>
292
							<source>1.4</source>
293
							<target>1.4</target>
294
							<compilerArguments>
295
								<bootclasspath>${cdc-runtime}</bootclasspath>
296
							</compilerArguments>
297
						</configuration>
298
					</plugin>
299
				</plugins>
300
			</build>
301
			<repositories>
302
				<repository>
303
					<id>gvsig-public-http-repository</id>
304
					<name>gvSIG maven public HTTP repository</name>
305
					<url>http://downloads.gvsig.org/pub/gvSIG-mobile/maven-repository</url>
306
				</repository>
307
			</repositories>
308
			<distributionManagement>
309
				<repository>
310
					<id>gvsig-ftp-repository</id>
311
					<name>gvSIG Mobile maven FTP repository</name>
312
					<url>ftpes://downloads.gvsig.org/anon/pub/gvSIG-mobile/maven-repository</url>
313
				</repository>
314
				<snapshotRepository>
315
					<id>gvsig-ftp-repository</id>
316
					<name>gvSIG Mobile maven FTP repository</name>
317
					<url>ftpes://downloads.gvsig.org/anon/pub/gvSIG-mobile/maven-repository</url>
318
				</snapshotRepository>
319
			</distributionManagement>
320
		</profile>
321

  
322
	</profiles>
323
	<reporting>
324
		<plugins>
325
			<plugin>
326
				<groupId>org.apache.maven.plugins</groupId>
327
				<artifactId>maven-checkstyle-plugin</artifactId>
328
				<configuration>
329
					<configLocation>gvsig/checkstyle_gvsig.xml</configLocation>
330
					<headerLocation>gvsig/gvsig.header</headerLocation>
331
					<propertyExpansion>
332
						basedir=${basedir}
333
                    </propertyExpansion>
334
				</configuration>
335
			</plugin>
336
			<plugin>
337
				<groupId>org.apache.maven.plugins</groupId>
338
				<artifactId>maven-javadoc-plugin</artifactId>
339
				<configuration>
340
					<links>
341
						<link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
342
						<link>http://maven.apache.org/ref/current/apidocs</link>
343
					</links>
344
					<encoding>ISO-8859-1</encoding>
345
				</configuration>
346
			</plugin>
347
			<plugin>
348
				<groupId>org.apache.maven.plugins</groupId>
349
				<artifactId>maven-jxr-plugin</artifactId>
350
			</plugin>
351
			<plugin>
352
				<groupId>org.apache.maven.plugins</groupId>
353
				<artifactId>maven-pmd-plugin</artifactId>
354
			</plugin>
355
			<!-- CHANGES & CHANGELOG PLUGINS 
356
			<plugin>
357
				<groupId>org.apache.maven.plugins</groupId>
358
				<artifactId>maven-changelog-plugin</artifactId>
359
				<configuration>
360
					<type>range</type>
361
					<range>60</range>
362
				</configuration>
363
			</plugin>
364
			<plugin>
365
				<groupId>org.apache.maven.plugins</groupId>
366
				<artifactId>maven-changes-plugin</artifactId>
367
				<reportSets>
368
					<reportSet>
369
						<reports>
370
							<report>changes-report</report>
371
						</reports>
372
					</reportSet>
373
				</reportSets>
374
				<configuration>
375
					<issueLinkTemplate>
376
						https://gvsig.org/trac/gvSIG/ticket/%ISSUE% </issueLinkTemplate>
377
				</configuration> 
378
		    </plugin>
379
		     -->
380
			<plugin>
381
				<groupId>org.codehaus.mojo</groupId>
382
				<artifactId>javancss-maven-plugin</artifactId>
383
			</plugin>
384
			<plugin>
385
				<groupId>org.apache.maven.plugins</groupId>
386
				<artifactId>maven-surefire-report-plugin</artifactId>
387
			</plugin>
388
			<plugin>
389
				<groupId>org.codehaus.mojo</groupId>
390
				<artifactId>cobertura-maven-plugin</artifactId>
391
			</plugin>
392
			<plugin>
393
				<groupId>org.codehaus.mojo</groupId>
394
				<artifactId>taglist-maven-plugin</artifactId>
395
				<configuration>
396
					<tags>
397
						<tag>TODO</tag>
398
						<tag>FIXME</tag>
399
						<tag>@todo</tag>
400
						<tag>@deprecated</tag>
401
						<tag>DOCUMENT ME!</tag>
402
					</tags>
403
				</configuration>
404
			</plugin>
405
			<plugin>
406
				<groupId>org.codehaus.mojo</groupId>
407
				<artifactId>findbugs-maven-plugin</artifactId>
408
				<configuration>
409
					<threshold>Normal</threshold>
410
					<effort>Default</effort>
411
					<!-- 
412
					<threshold>High|Normal|Low|Exp|Ignore</threshold>
413
					<effort>Min|Default|Max</effort>
414
					<xmlOutput>true|false</xmlOutput>
415
					<xmlOutputDirectory>directory location of findbugs xdoc
416
						xml report</xmlOutputDirectory>
417
					<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
418
					<includeFilterFile>findbugs-include.xml</includeFilterFile>
419
					<visitors>FindDeadLocalStores,UnreadFields</visitors>
420
					<omitVisitors>FindDeadLocalStores,UnreadFields</omitVisitors>
421
					<onlyAnalyze>org.codehaus.mojo.findbugs.*</onlyAnalyze>
422
					<pluginList>/libs/fb-contrib/fb-contrib-2.8.0.jar</pluginList>
423
					<debug>true|false</debug>
424
					<relaxed>true|false</relaxed>
425
					<findbugsXmlOutput>true|false</findbugsXmlOutput>
426
					<findbugsXmlOutputDirectory>directory location of findbugs
427
						legact xml format report</findbugsXmlOutputDirectory>
428
					-->
429
				</configuration>
430
			</plugin>
431
		</plugins>
432
	</reporting>
433

  
434
	<modules>
435
		<module>build-tools</module>
436
		<module>libraries-pom</module>
437
		<module>extension-pom</module>
438
	</modules>
439
</project>
tags/v2_0_0_Build_2005/build/buildman/doc/depman.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<depman>
3
	<package>
4
		<group>es.upv.ai2</group><!-- requerido -->
5
		<artifact>buildman</artifact><!-- requerido -->
6
		<version>1.0-SNAPSHOT</version><!-- requerido -->
7
		<libraryType>dynamic</libraryType><!-- requerido -->
8
				<!-- upload no requerido si aparece entonces se configura el servidor donde subir el paquete -->
9
		<upload> <!-- Esta opción usaría los valores asignados abajo, no son requeridos y se puede sobreescribir solo algunos de ellos -->
10
			<sshserver>larry.ai2.upv.es</sshserver>
11
		 	<destdir>public_html/</destdir>
12
		 	<username>depman</username>
13
		</upload>
14
	</package>
15
	<package platform="linux,mac">
16
		<platform>all</platform><!-- no requerido pero se puede sobreescribir -->
17
		<compiler>gcc4</compiler><!-- idem -->
18
		<arch>all</arch><!-- idem -->
19
	</package>
20
	<package platform="win">
21
		<compiler>vs7</compiler><!-- idem -->
22
		<arch>i386</arch><!-- idem -->
23
	</package>
24
	<dependencies platform="win">
25
		<dependency>
26
			<group>org.openscenegraph</group>
27
			<artifact>openscenegraph</artifact>
28
			<version>2.2.0-SNAPSHOT</version>
29
			<type>dynamic</type>
30
		</dependency>
31
		<dependency>
32
			<group>org.gdal</group>
33
			<artifact>gdal</artifact>
34
			<version>1.2.6</version>
35
			<type>dynamic</type>
36
			<compiler>vs6</compiler>
37
		</dependency>
38
		<dependency>
39
			<group>jogl</group>
40
			<artifact>jogl</artifact>
41
			<version>1.1.0</version>
42
			<type>dynamic</type>
43
			<compiler>all</compiler>
44
		</dependency>
45

  
46
	</dependencies>
47
	<dependencies platform="linux">
48
		<!-- others platform same configuration -->
49
		<dependency>
50
			<group>org.openscenegraph</group>
51
			<artifact>openscenegraph</artifact>
52
			<version>2.2.0-SNAPSHOT</version>
53
			<type>dynamic</type>
54
		</dependency>
55
		<dependency>
56
			<group>jogl</group>
57
			<artifact>jogl</artifact>
58
			<version>1.1.0</version>
59
			<type>dynamic</type>
60
		</dependency>
61
		<dependency>
62
			<group>org.gdal</group>
63
			<artifact>gdal-gvsig</artifact>
64
			<version>1.10</version>
65
			<type>dynamic</type>
66
		</dependency>
67
		<dependency url="http://larry.ai2.upv.es:8080/~depman/" >
68
			<group>es.upv.ai2</group>
69
			<artifact>libjosg</artifact>
70
			<version>2.0-SNAPSHOT</version>
71
			<type>dynamic</type>
72
		</dependency>
73
	</dependencies>
74
	<dependencies platform="mac">
75
		<!-- others platform same configuration -->
76
		<dependency>
77
			<group>org.openscenegraph</group>
78
			<artifact>openscenegraph</artifact>
79
			<version>2.2.0-SNAPSHOT</version>
80
			<type>dynamic</type>
81
			<architecture>universal</architecture>
82
		</dependency>
83
		<dependency>
84
			<group>jogl</group>
85
			<artifact>jogl</artifact>
86
			<version>1.1.0</version>
87
			<type>dynamic</type>
88
			<compiler>all</compiler>
89
		</dependency>
90
		<!--dependency>
91
			<group>org.gdal</group>
92
			<artifact>gdal</artifact>
93
			<version>1.4.0</version>
94
			<type>framework</type>
95
			</dependency-->
96
		<dependency url="http://larry.ai2.upv.es:8080/~depman/" >
97
			<group>es.upv.ai2</group>
98
			<artifact>libjosg</artifact>
99
			<version>2.0-SNAPSHOT</version>
100
			<type>dynamic</type>
101
			<architecture>universal</architecture>
102
		</dependency>
103
	</dependencies>
104

  
105
</depman>
106

  
tags/v2_0_0_Build_2005/build/buildman/doc/buildman.xml
1
<buildman>
2
	<goals platform="linux,mac">
3
		<delete path="/tmp/osgVP" />
4
	</goals>
5
	<goals platform="win">
6
		<delete path="./osgVP" />
7
	</goals>
8
	<goals>
9
		<svn option="co" url="https://josgplanets.ai2.upv.es/svn/josgplanets/trunk/libjni-osgvp" project-path="/tmp/osgVP" />
10
		<clean all="False" />
11
		<update file="/tmp/osgVP/build-scripts/depman.xml" />
12
	</goals>
13
	<goals platform="linux,mac">
14
		<create-solution project-path="/tmp/osgVP" generator="unix" install="/tmp/osgVP-install" />
15
		<compile-solution project-path="/tmp/osgVP" project-name="libjosg" install="True" />
16
	</goals>
17
	<goals platform="win">
18
		<create-solution project-path="./osgVP" project-gen-path="./osgVP/CMake-VS7" generator="vs7" install="./osgVP-install" />
19
		<compile-solution project-path="./osgVP" project-name="libjosg" project-gen-path="./osgVP/CMake-VS7" install="True" />
20
	</goals> -->
21
	<goals platform="linux">
22
		<create from-xml="/tmp/osgVP/build-scripts/depman.xml" path="/tmp/binaries/linux32" />
23
	</goals>
24
	<goals platform="mac">
25
		<create from-xml="/tmp/osgVP/build-scripts/depman.xml" path="/tmp/binaries/mac"/>
26
	</goals>
27
	<goals platform="win">
28
		<create from-xml="./osgVP/build-scripts/depman.xml" path="./osgVP/binaries/win32" />
29
	</goals>
30
</buildman>
tags/v2_0_0_Build_2005/build/buildman/doc/depman-linux-gcc3.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<depman>
3
	<package>
4
		<group>es.upv.ai2</group><!-- requerido -->
5
		<artifact>buildman</artifact><!-- requerido -->
6
		<version>1.0-SNAPSHOT</version><!-- requerido -->
7
		<platform>all</platform><!-- no requerido pero se puede sobreescribir -->
8
		<compiler>all</compiler><!-- idem -->
9
		<arch>all</arch><!-- idem -->
10
		<libraryType>none</libraryType><!-- requerido -->
11

  
12
		<!-- upload no requerido si aparece entonces se debe de subir -->
13
		<!--<upload/> !--><!-- Esta opción usaría los valores por defecto -->
14
		<!--<upload> --><!-- Esta opción usaría los valores asignados abajo, no son requeridos y se puede sobreescribir solo algunos de ellos -->
15
		<!--	<sshserver>murray.ai2.upv.es</sshserver> -->
16
		<!-- 	<destdir>/projects/AI2/www-aliases/depman/</destdir> -->
17
		<!-- 	<username>depman</username> -->
18
		<!--</upload> -->
19
	</package>
20
	<dependencies platform="linux">
21
		<!-- others platform same configuration -->
22
		<dependency>
23
			<group>org.openscenegraph</group>
24
			<artifact>openscenegraph</artifact>
25
			<version>2.2.0-SNAPSHOT</version>
26
			<compiler>gcc3</compiler>
27
			<type>dynamic</type>
28
		</dependency>
29
		<dependency>
30
			<group>jogl</group>
31
			<artifact>jogl</artifact>
32
			<version>1.1.0</version>
33
			<type>dynamic</type>
34
		</dependency>
35
		<dependency>
36
			<group>org.gdal</group>
37
			<artifact>gdal-gvsig</artifact>
38
			<version>1.10</version>
39
			<type>dynamic</type>
40
		</dependency>
41
		<dependency url="http://larry.ai2.upv.es:8080/~depman/" >
42
			<group>es.upv.ai2</group>
43
			<artifact>libjosg</artifact>
44
			<version>2.0-SNAPSHOT</version>
45
			<compiler>gcc3</compiler>
46
			<type>dynamic</type>
47
		</dependency>
48
	</dependencies>
49
</depman>
50

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmbase/IPlugIn.py
1
from xml.dom import minidom
2
from PlugInManager import *
3
import sys
4

  
5
'''
6
	Defines a interface for plugins
7
'''
8
class IPlugIn:
9
	def __init__(self):
10
		self._errorMessages = []
11
		self._error = False
12
		self._id = ""
13
		self._goals = dict()
14
		self._preGoals = dict()
15
		self._arguments = None
16
		self._execute = False
17

  
18
	def initArguments(self,arguments):
19
		self._arguments = arguments
20

  
21
	def init(self):
22
		pass
23

  
24
	def initFromXML(self,node):
25
		pass
26
	
27
	def execute(self):
28
		pass
29
	
30
	def loadXMLFile(self,xmlfile):
31
		xmldoc=minidom.parse(xmlfile)
32
		self.initFromXML(xmldoc)
33
	
34
	def getExecute(self):
35
		return self._execute
36
	
37
	def setExecute(self,value):
38
		self._execute = value
39
		
40
	def run(self):
41
		#try:
42
			if self._execute:	
43
				self.executePreGoals()
44
				print "Executing Plugin:" + str(self.__class__)
45
				self.execute()
46
		#except:
47
		#	self.reportError(str(sys.exc_info()[0]))
48

  
49
	def reportError(self,s):
50
		self._errorMessages.append(str(self.__class__)+":"+s)
51
		self._error = True
52

  
53
	def error(self):
54
		return self._error
55

  
56
	def getErrorMessages(self):
57
		return self._errorMessages
58

  
59
	def setId(self,id):
60
		self._id = id
61

  
62
	def getId(self):
63
		return self._id
64

  
65
	def addGoal(self,goal,description):
66
		self._goals[goal] = []
67
		self._preGoals[goal] = []
68
		self._arguments.getApplicationUsage().addCommandLineGoal(goal,description)
69
	
70
	def addGoalOption(self,goal,option,description):
71
		self._goals[goal].append(option)
72
		self._arguments.getApplicationUsage().addCommandLineGoalOption(goal,option,description)
73

  
74
	def getGoals(self):
75
		return self._goals
76

  
77
	def addPreGoal(self, goal, preGoal):
78
		self._preGoals[goal].append(preGoal)
79

  
80
	def executePreGoals(self):
81
		for goal in self._preGoals.keys(): 
82
			goals = self._preGoals[goal]
83
			for g in goals:
84
				PlugInManager().getPlugInInstanceByGoal(g).executePreGoals()
85
				print "---- Executing Plugin:" + str(PlugInManager().getPlugInInstanceByGoal(g).__class__)
86
				PlugInManager().getPlugInInstanceByGoal(g).execute()
87

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmbase/PlugInManager.py
1
"""
2
	PlugInManager is a singleton class that manages
3
	plugininstances, and register methods. Each
4
	plugin should call to register itself
5
"""
6
class PlugInManager:
7
	_pluginInstances = {}
8

  
9
	def registerPlugIn(self, id, pluginInstance):
10
		PlugInManager._pluginInstances[id] = pluginInstance
11
		pluginInstance.setId(id)
12

  
13
	def getPlugInInstances(self):
14
		return PlugInManager._pluginInstances
15

  
16
	def getPlugInInstance(self,id):
17
		return PlugInManager._pluginInstances[id]
18

  
19
	def getPlugInInstanceByGoal(self,goal):
20
		for plugin in PlugInManager._pluginInstances.values():
21
			if goal in plugin.getGoals().keys():
22
				return plugin
23
		return None
24
	
25
	def supportedGoals(self):
26
		goals = []
27
		for plugin in PlugInManager._pluginInstances.values():
28
			for g in plugin.getGoals().keys():
29
				goals.append(g)
30
		return goals
31

  
32
#loading plugins
33
from bmplugins import *
34

  
35

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmbase/__init__.py
1
"""
2
	Bases classes to extend and create new plugins
3
"""
4

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmplugins/TestPlugIn.py_
1
from bmbase.IPlugIn import IPlugIn
2
from bmbase.PlugInManager import PlugInManager
3
import pprint
4

  
5

  
6
class TestPlugIn(IPlugIn):
7
	def __init__(self):
8
		IPlugIn.__init__(self)
9

  
10
	def init(self):
11
		self.addGoal("test", "Tests user buildman plugin path")
12
		while self._arguments.read("test"):
13
			self.setExecute(True)		
14

  
15
	def execute(self):
16
		print "Executing Plugin:" + str(self.__class__)
17
		l=[] 
18
		for id,plugin in PlugInManager().getPlugInInstances().items():
19
			l.append((id,plugin))	
20
		pp = pprint.PrettyPrinter(indent=4)
21
		pp.pprint(l) 
22
		return True
23

  
24
PlugInManager().registerPlugIn("TestPlugIn",TestPlugIn())
25

  
26

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmplugins/DepManExtractPlugIn.py
1
from bmbase.IPlugIn import IPlugIn
2
from bmbase.PlugInManager import PlugInManager
3
from bmcore.BMUtil import BMUtil
4
from xml.dom import minidom
5
import os
6

  
7
class DepManExtractPlugIn(IPlugIn):
8
    def __init__(self):
9
        IPlugIn.__init__(self)
10
        self._xmlFile = "depman.xml"
11
        self._destDir = "."
12
        self._filter = "*"
13
        self._isFromCache=False
14
        self._isInteractive=True
15
        self._depmanNode = None
16

  
17
    def init(self):
18
        self.addGoal("extract", "Extract the files of dependencies and package sections of a depman xml file.")
19
        self.addGoalOption("extract","--file", "Sets an alternate xml file. Default: depman.xml")
20
        self.addGoalOption("extract","--destdir", "Sets the destination directory of the extraction. Default: `.`")
21
        self.addGoalOption("extract","--filter", "Sets the the filter of the files to extract. Default: `*`")
22
        self.addGoalOption("extract","--cache", "Cache is preferred")
23
        self.addGoalOption("extract","--remote", "Remote repository is preferred")
24
    
25
        isExtract = False
26
        if self._arguments.read("extract"):
27
            self.setExecute(True)
28
            isExtract = True
29

  
30
        if not isExtract:
31
            return    
32
        
33
        args = [""]
34
        if self._arguments.read("--file", args):
35
            self._xmlFile = args[0]   
36
            
37
        args = [""]
38
        if self._arguments.read("--destdir", args):
39
            self._destDir = args[0]
40
            
41
        args = [""]
42
        if self._arguments.read("--filter", args):
43
            self._filter = args[0] 
44
            
45
        if self._arguments.read("--cache"):
46
            self._isFromCache = True
47
            self._isInteractive = False
48
        
49
        if self._arguments.read("--remote"):
50
            self._isFromCache = False
51
            self._isInteractive = False
52

  
53
    def initFromXML(self,node):
54
        if node.localName=="extract":
55
            if node.hasAttributes():
56
                if node.attributes.has_key("file"):
57
                    elf._xmlFile = node.attributes.get("file").value
58
                if node.attributes.has_key("destdir"):
59
                    elf._destDir = node.attributes.get("destdir").value                   
60
                if node.attributes.has_key("filter"):
61
                    elf._filter = node.attributes.get("filter").value    
62
                foundCache = False
63
                if node.attributes.has_key("cache"):
64
                    value = node.attributes.get("cache").value
65
                    if value == "True" or value == "true":
66
                        self._isFromCache = True
67
                        self._isInteractive = False
68
                if node.attributes.has_key("remote") and not foundCache:
69
                    value = node.attributes.get("remote").value
70
                    if value == "True" or value == "true":
71
                        self._isFromCache = False
72
                        self._isInteractive = False
73
        else:
74
            self._depmanNode = node
75
                    
76
    def execute(self):
77
        return self.extract()
78

  
79
    def extract(self):
80
        self._dmupdate = PlugInManager().getPlugInInstance("DepManUpdatePlugIn")
81
        if self._dmupdate == None:
82
            self.reportError("PlugIn `depman update` not found")
83
            return
84
        
85
        if self._depmanNode == None:
86
            self.loadXMLFile(self._xmlFile)
87
        
88
        if not self._isInteractive:
89
            if self._isFromCache:
90
                self._dmupdate.setForceCache()
91
            else:
92
                self._dmupdate.setForceRemote()
93
                
94
        dependency_filenamepaths = self._dmupdate.getDependencies(self._depmanNode)
95
        package_namepath = self.parsePackage(self._depmanNode)
96
        print dependency_filenamepaths, self._destDir, self._filter
97
        
98
        bmutil = BMUtil()
99
        for file in dependency_filenamepaths:
100
            bmutil.untargzFiltered(file, self._destDir, self._filter)
101
        
102
    
103
    def parsePackage(self,node):
104
        return ""
105

  
106

  
107
PlugInManager().registerPlugIn("DepManExtractPlugIn",DepManExtractPlugIn())
108

  
109

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmplugins/CreateSolutionPlugIn.py
1
from bmbase.IPlugIn import IPlugIn
2
from bmbase.PlugInManager import PlugInManager
3
from bmcore.BMUtil import BMUtil
4
import os
5

  
6
class CreateSolutionPlugIn(IPlugIn):
7
	def __init__(self):
8
		IPlugIn.__init__(self)
9
		self._buildType = "Release"
10
		self._supportedGenerators = dict()
11
		self._supportedGenerators["vs8"] = "Visual Studio 8 2005"
12
		self._supportedGenerators["vs7"] = "Visual Studio 7 .NET 2003"
13
		self._supportedGenerators["unix"] = "Unix Makefiles"
14
		self._supportedGenerators["xcode"] = "Xcode"
15
		self._cmakeGenerator = ""
16
		self._projectPath = ""
17
		self._projectGenerationPath = ""
18
		self._installPath = ""
19
		self._cmakeOtherOptions = ""
20
		
21

  
22
	def init(self):
23
		self.addGoal("create-solution", "Creates the solution Makefiles/VisualStudio for Win/Linux/Mac based on CMake")
24
		self.addGoalOption("create-solution","--build-type", "sets the build path (Release/Debug). default=Release.")
25
		self.addGoalOption("create-solution","--generator", "selects the generator (vs8,vs7,unix,xcode).")
26
		self.addGoalOption("create-solution","--project-path", "sets the path of the project.")
27
		self.addGoalOption("create-solution","--project-gen-path", "sets the path to generate project files. default=${project-path}/CMake")
28
		self.addGoalOption("create-solution","--install", "sets the path to generate the product installation. default=${project-path}/../install")
29
		self.addGoalOption("create-solution","--cmake-options", "Adds other cmake command line options.")
30
		execute = False		
31
		if self._arguments.read("create-solution"):
32
			execute = True
33
		if execute:
34
			args = [""]
35
			if self._arguments.read("--build-type",args):
36
				self._buildType = args[0]
37
		
38
			args = [""]
39
			if self._arguments.read("--generator",args):
40
				if args[0] in self._supportedGenerators:
41
					self._cmakeGenerator = self._supportedGenerators[args[0]]
42

  
43
			args = [""]
44
			if self._arguments.read("--project-path",args):
45
				self._projectPath=args[0]
46
		
47
			args = [""]
48
			if self._arguments.read("--project-gen-path",args):
49
				self._projectGenerationPath=args[0]
50
	
51
			args = [""]
52
			if self._arguments.read("--install",args):
53
				self._installPath=args[0]
54
				
55
			args = [""]
56
			if self._arguments.read("--cmake-options",args):
57
				self._cmakeOtherOptions=args[0]
58
				
59
			self.setExecute(True)
60
			
61
	def initFromXML(self,dom):
62
		node = dom.getElementsByTagName("create-solution")[0]
63
		if node != None:
64
			if node.hasAttributes():
65
				if node.attributes.has_key("build-type"):
66
					self._buildType = node.attributes.get("build-type").value
67
				if node.attributes.has_key("generator"):
68
					gen = node.attributes.get("generator").value
69
					if gen in self._supportedGenerators:
70
						self._cmakeGenerator = self._supportedGenerators[gen]
71
				if node.attributes.has_key("project-path"):
72
					self._projectPath = node.attributes.get("project-path").value
73
				if node.attributes.has_key("project-gen-path"):
74
					self._projectGenerationPath = os.path.abspath(node.attributes.get("project-gen-path").value)
75
				if node.attributes.has_key("install"):
76
					self._installPath = os.path.abspath(node.attributes.get("install").value)
77
				if node.attributes.has_key("cmake-options"):
78
					self._cmakeOtherOptions = node.attributes.get("cmake-options").value
79
										
80
	def execute(self):
81
		if self._cmakeGenerator=="":
82
			self.reportError("Missing valid generator option")
83
			return False
84
		if self._projectPath=="":
85
			self.reportError("Missing required project path option")
86
			return False
87
			
88
		if self._cmakeGenerator!="" and self._projectPath!="":
89
			self._projectPath = os.path.abspath(self._projectPath)
90
			projectName = os.path.basename(self._projectPath)
91
			if self._projectGenerationPath=="":
92
				self._projectGenerationPath=os.path.abspath(os.path.join(self._projectPath,"BMCMake"))
93
			if self._installPath=="":
94
				self._installPath=os.path.abspath(self._projectPath+os.path.sep+".."+os.path.sep+projectName+"-install")
95
			if self._buildType=="":
96
				self._buildType="Release"
97
				
98
		bmutil = BMUtil()
99
		print " * Creating Project Generation Path: "+self._projectGenerationPath
100
		bmutil.mkdir(self._projectGenerationPath)
101
		olddir = os.getcwd()
102
		os.chdir(self._projectGenerationPath)
103
		if os.path.exists("CMakeCache.txt"):
104
			os.remove("CMakeCache.txt")
105
		cmakeCommand = "cmake "+self._cmakeOtherOptions+" -G\""+self._cmakeGenerator+"\" -DCMAKE_BUILD_TYPE="+self._buildType+" -DCMAKE_INSTALL_PREFIX="+self._installPath+" "+self._projectPath 
106
		print " * Running CMAKE: " + cmakeCommand
107
		os.system(cmakeCommand)
108
		os.chdir(olddir)
109
		return True
110

  
111
PlugInManager().registerPlugIn("CreateSolutionPlugIn",CreateSolutionPlugIn())
112

  
113

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmplugins/__init__.py
1
"""
2
	Path where plugins reside
3
	Each plugin should implement IPlugIn interface
4
	from bmbase.
5
"""
6

  
7

  
8

  
9
import os
10
import sys
11
from bmcore.BMUtil import BMUtil
12
import imp
13

  
14
def bmimport(name, paths):
15
	# Fast path: see if the module has already been imported.
16
    try:
17
        return sys.modules[name]
18
    except KeyError:
19
        pass
20

  
21
    # If any of the following calls raises an exception,
22
    # there's a problem we can't handle -- let the caller handle it.
23

  
24
    fp, pathname, description = imp.find_module(name,paths)
25

  
26
    try:
27
        return imp.load_module(name, fp, pathname, description)
28
    finally:
29
        # Since we may exit via an exception, close fp explicitly.
30
        if fp:
31
            fp.close()
32

  
33
util = BMUtil()
34
searchPaths=[os.path.join(sys.path[0],'bmplugins'),util.buildmanPlugInPath(),os.path.join(sys.path[0],'../bmplugins')]
35

  
36
plugList = []
37
for dir in searchPaths:
38
	if not os.path.exists(dir):
39
		continue
40
	for f in os.listdir(dir):
41
		if f.endswith('.py') and not f.startswith('__init__'):
42
			plugList.append(f[0:-3])
43

  
44
print plugList
45
for m in plugList:
46
	bmimport(m,searchPaths)
47

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmplugins/DepManDeployPlugIn.py
1
#depman create plugin
2

  
3
from bmbase.IPlugIn import IPlugIn
4
from bmbase.PlugInManager import PlugInManager
5
from bmcore.BMUtil import *
6
from bmcore.ftpslib import *
7
from xml.dom import minidom
8
import string
9
import shutil
10
import os
11
import sys
12
import subprocess
13

  
14
from urlparse import urlparse
15

  
16
class Server:
17
    def __init__(self):
18
        self._repository_id = "gvsig-ftp-repository"
19
        self._repository_url = "downloads.gvsig.org"
20
        self._repository_proto = "ftp"
21
        self._repository_login = "maven"
22
        self._repository_path = "/anon/pub/gvSIG-desktop/buildman-repository"
23
        self._repository_passwd = ""
24

  
25
class DepManDeployPlugIn(IPlugIn):
26
	
27
    def __init__(self):
28
        IPlugIn.__init__(self)
29
		
30
        self._is_Interactive = False
31
        self._dependency = None
32
        self._server = Server()
33
        self._servers = []
34
        
35
        self._xmlConfigFile = "settings.xml"
36
		
37
    def setDependency(self, dependency):
38
		 self._dependency = dependency
39
		
40
    def init(self):
41
        self.addGoal("deploy", "deploys an artifact")
42
        self.addGoalOption("deploy", "--interactive", "ask for server or artifact deployment configuration")
43
        self.addPreGoal("deploy", "create")	
44
        self._dmplugin = PlugInManager().getPlugInInstance("DepManPlugIn")
45
        self._dmcreateplugin = PlugInManager().getPlugInInstance("DepManCreatePlugIn")
46

  
47
		
48
        if self._dmplugin == None:
49
			self.reportError("PlugIn `depman` not found")
50
			return False
51
		
52
        if self._arguments.read("deploy"):
53
			self.setExecute(True)
54

  
55
		
56
        if self._arguments.read("--interactive"):
57
            self._is_Interactive = True
58
            	
59
         
60
    def initFromXML(self, node):
61
        distrNodes = node.getElementsByTagName("distributionManagement")
62
        if distrNodes != None:
63
            for n in distrNodes:
64
                if n.localName == "distributionManagement":
65
    				for p in n.childNodes:
66
    					if p.localName == "repository":
67
    						repoName = None
68
    						repoUrl = None
69
    						for k in p.childNodes:
70
    							if k.localName == "id":
71
    								self.server._repository_id = k.childNodes[0].nodeValue
72
    							if k.localName == "name":
73
    								repoName = k.childNodes[0].nodeValue
74
    							if k.localName == "url":
75
    								repoUrl = urlparse(k.childNodes[0].nodeValue)
76
    									
77
    						self.server._repository_url = repo.netloc
78
    						self.server._repository_path = repoUrl.path
79
    						self.server._repository_proto = repoUrl.scheme
80
    						print self.server._repository_proto + "://" + self.server._repository_url + "/" + self.server._repository_path
81
        settingsNodes = node.getElementsByTagName("servers")
82
        if settingsNodes != None:
83
            for n in settingsNodes:
84
                if n.localName == "servers":
85
                    self._servers = []
86
                    for p in n.childNodes:
87
                        if p.localName == "server":
88
                            server = Server()
89
                            for k in p.childNodes:
90
                                if k.localName == "id":
91
                                    server._repository_id = k.childNodes[0].nodeValue
92
                                if k.localName == "username":
93
                                    server._repository_login = k.childNodes[0].nodeValue
94
                                if k.localName == "password":
95
                                    server._repository_passwd = k.childNodes[0].nodeValue
96
                            
97
                            self._servers.append(server) 
98
                    print self._servers               
99
    
100
    def uploadFTPFile(self, url, user, pwd, destdir, path, orig_file, filename):
101
        #print url, user, pwd, destdir, path, orig_file, filename
102
        ftp = FTP_TLS(url)
103
        #ftp.set_debuglevel( 1 )
104
        ftp.auth_tls();  ftp.prot_p()
105
        ftp.login(user, pwd)
106
        ftp.set_pasv(1)
107
        #ftp.retrlines('LIST')
108
        ftp.cwd(destdir)
109
        dirs = string.split(path, os.path.sep)
110
        for dir in dirs:
111
            #print dir
112
            try:
113
                ftp.mkd(dir)
114
            except:
115
                pass
116
            try:
117
                ftp.cwd(dir)
118
            except:
119
                pass
120
        f = open(orig_file, "rb")
121
        ftp.storbinary("STOR " + filename, f)
122
        f.close()
123
        ftp.quit()
124

  
125
		
126
    def execute(self):
127
        self.initFromXML(self._dmplugin.getNode())
128
        print self._dmplugin.getMavenPath() + os.path.sep + self._xmlConfigFile
129
        self.loadXMLFile(self._dmplugin.getMavenPath() + os.path.sep + self._xmlConfigFile)
130
        
131
        file_name = self._dependency.getDepManFileName()
132
        file_path = self._dependency.getDepManUrlPath()
133

  
134
        tarname = file_name + ".tar.gz"
135
        md5name = tarname + ".md5"
136
        dmfile = file_name + ".xml"
137
		
138
        dmutil = BMUtil()
139
        surl = self._server._repository_proto + "://" + self._server._repository_url + "/" + self._server._repository_path;
140
        url = self._server._repository_url
141
        destdir = self._server._repository_path
142
        login = self._server._repository_login
143
        pwd = self._server._repository_passwd
144

  
145
        if self._is_Interactive:
146
			tmstr = "URL [*]:"
147
			surl = raw_input(string.replace(tmstr, "*", url))
148
			if len(surl) == 0:
149
				surl = self._server._repository_url
150
			repoURL = urlparse(surl)
151
			self._server._repository_url = repo.netloc		
152
			self._server._repository_path = repoUrl.path
153
			self._server._repository_proto = repoUrl.scheme
154
			url = self._server._repository_url
155

  
156
			tmstr = "Login [*]:"
157
			login = raw_input(string.replace(tmstr, "*", login))
158
			if len(login) == 0:
159
				login = self._server._repository_login
160
			import getpass
161
			pwd = getpass.getpass()
162
        else:
163
            for s in self._servers:
164
                if s._repository_id == self._server._repository_id:
165
                    login = self._server._repository_login = s._repository_login
166
                    pwd = self._server._repository_passwd = s._repository_passwd
167
        
168
        tmpdir = self._dmplugin.getDepManPath() + os.path.sep + ".cache" + os.path.sep + file_path
169
		
170

  
171
        if self._server._repository_proto == "ssh":
172
			dmutil.rmdir(".dmn_tmp") # Prevent for uploading bad previous compilations!
173
			sshtmpdir = ".dmn_tmp" + os.path.sep + file_path
174
			dmutil.mkdir(sshtmpdir)
175
			shutil.copyfile(tmpdir + os.path.sep + tarname, sshtmpdir + os.path.sep + tarname)
176
			shutil.copyfile(tmpdir + os.path.sep + md5name, sshtmpdir + os.path.sep + md5name)
177
			if self._xmlfile != "":
178
				shutil.copyfile(tmpdir + os.path.sep + dmfile, sshtmpdir + os.path.sep + dmfile)	
179
			
180
			#scp
181
			base_ssh = destdir
182
			url_ssh = url
183
			scpcommand = "scp"
184
			pscppath = ""
185
			if sys.platform == "win32":
186
				scpcommand = self._dmplugin.getDepManDataPath() + os.path.sep + "win32" + os.path.sep + "pscp.exe"
187
				scpcommand = '"' + os.path.normpath(scpcommand) + '"'
188
			cmdstr = scpcommand + " -r " + ".dmn_tmp" + os.path.sep + "*" + " " + login + "@" + url_ssh + ":" + base_ssh
189
			
190
			print cmdstr
191
			os.system(cmdstr)
192
			dmutil.rmdir(".dmn_tmp")
193
			
194
        elif self._server._repository_proto == "ftp":			
195
			#ftp
196
			print "* Uploading ", tarname
197
			self.uploadFTPFile(url, login, pwd, destdir, os.path.sep + file_path, tmpdir + os.path.sep + tarname, tarname)
198
			print "* Uploading ", md5name
199
			self.uploadFTPFile(url, login, pwd, destdir, os.path.sep + file_path, tmpdir + os.path.sep + md5name, md5name)
200
			if not self._is_Interactive:
201
				print "* Uploading ", dmfile
202
				self.uploadFTPFile(url, login, pwd, destdir, os.path.sep + file_path, tmpdir + os.path.sep + dmfile, dmfile)
203

  
204
        return True
205

  
206
PlugInManager().registerPlugIn("DepManDeployPlugIn", DepManDeployPlugIn())		
tags/v2_0_0_Build_2005/build/buildman/bin/bmplugins/DeleteFilePlugIn.py
1
from bmbase.IPlugIn import IPlugIn
2
from bmbase.PlugInManager import PlugInManager
3
from bmcore.BMUtil import BMUtil
4
import os
5
import sys
6
import shutil
7

  
8
class DeleteFilePlugIn(IPlugIn):
9
	def __init__(self):
10
		IPlugIn.__init__(self)
11
		self._path = ""
12

  
13
	def init(self):
14
		self.addGoal("delete", "deletes a file or directory")
15
		self.addGoalOption("delete", "--path", "Sets the file/path to be deleted")
16
		execute = False
17
		while self._arguments.read("delete"):
18
			execute = True
19
			
20
		if execute:
21
			args = [""]
22
			while self._arguments.read("--path",args):
23
				self._path = args[0]
24
			
25
			self.setExecute(True)
26
			
27
	def initFromXML(self,dom):
28
		node = dom.getElementsByTagName("delete")[0]
29
		if node != None:
30
			if node.hasAttributes():
31
				if node.attributes.has_key("path"):
32
					self._path = node.attributes.get("path").value
33
						
34
	def execute(self):
35
		if self._path == "":
36
			self.reportError("Missing required path option")
37
			
38
		self._path = os.path.abspath(self._path)
39
		util = BMUtil()
40
		if not os.path.exists(self._path):
41
			return True
42
		if os.path.isdir(self._path):
43
			print "* Removing directory " + self._path
44
			util.rmdir(self._path)
45
		else:
46
			print "* Removing file " + self._path
47
			os.remove(self._path)
48
			
49
		return True
50

  
51
PlugInManager().registerPlugIn("DeleteFilePlugIn",DeleteFilePlugIn())
52

  
53

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmplugins/PrepareSystemPlugIn.py
1
from bmbase.IPlugIn import IPlugIn
2
from bmbase.PlugInManager import PlugInManager
3
from bmcore.BMUtil import BMUtil
4
import os
5
import sys
6
import shutil
7

  
8
class PrepareSystemPlugIn(IPlugIn):
9
	def __init__(self):
10
		IPlugIn.__init__(self)
11

  
12
	def init(self):
13
		self.addGoal("init", "Prepares the system with the buildman user directory with an example plugin")
14
		while self._arguments.read("init"):
15
			self.setExecute(True)			
16

  
17
	def execute(self):
18
		util = BMUtil()
19
		bmpath = util.buildmanPlugInPath()
20
		try:
21
			util.mkdir(bmpath)		
22
			#shutil.copy(sys.path[0]+os.path.sep+"bmplugins"+os.path.sep+"TestPlugIn.py_",util.buildmanPlugInPath()+os.path.sep+"TestPlugIn.py")
23
		except:
24
			self.reportError("Error creating buildman directory or copying test plugin")
25
			return False
26
		return True
27

  
28
PlugInManager().registerPlugIn("PrepareSystemPlugIn",PrepareSystemPlugIn())
29

  
30

  
tags/v2_0_0_Build_2005/build/buildman/bin/bmplugins/DepManGetPlugIn.py
1
from bmbase.IPlugIn import IPlugIn
2
from bmbase.PlugInManager import PlugInManager
3
from bmcore.BMUtil import *
4
from xml.dom import minidom
5
import os
6

  
7
class DepManGetPlugIn(IPlugIn):
8
	def __init__(self):
9
		IPlugIn.__init__(self)
10
		self._default_repository = ""
11
		self._dependency = None
12

  
13
		self._forceCache = False
14
		self._isInteractive = True
15

  
16

  
17
	def setDependency(self, dependency):
18
		self._dependency = dependency
19
		
20
	def setURL(self,url):
21
		self._url = url
22

  
23
	def setForceCache(self):
24
		self._forceCache = True
25
		self._isInteractive = False
26

  
27
	def setForceRemote(self):
28
		self._forceCache = False
29
		self._isInteractive = False
30
	
31
	def init(self):
32
		self.addGoal("get", "downloads an artifact if not in cache.")
33
		self.addGoalOption("get","--url", "URL base for the DepMan repository.")
34
		self.addGoalOption("get","--group", "Group namespace of the artifact.")
35
		self.addGoalOption("get","--artifact", "Name of the artifact to download.")
36
		self.addGoalOption("get","--version", "Version of the artifact.")
37
		self.addGoalOption("get","--platform", "Platform of the artifact.")
38
		self.addGoalOption("get","--distribution", "Distribution of the artifact.")
39
		self.addGoalOption("get","--compiler", "Selects the compiler version that was used to compile the artifact.")
40
		self.addGoalOption("get","--arch", "Selects the architecture of the artifact.")
41
		self.addGoalOption("get","--ltype", "Type of library of the artifact.")
42
		self.addGoalOption("get","--cache", "Forces the use of cache files without asking.")
43
		self.addGoalOption("get","--remote", "Forces the download of remote without the use of the cache and without asking.")
44

  
45
		self._dmplugin = PlugInManager().getPlugInInstance("DepManPlugIn")
46
		if self._dmplugin == None:
47
			self.reportError("PlugIn `depman` not found")
48
			return
49
		self._default_repository = self._dmplugin.getDepManPath()
50
	
51
		while self._arguments.read("get"):
52
			self._dependency = Dependency()
53
			self.setExecute(true)
54
		
55
		args=[""]
56
		if self._arguments.read("--url",args):
57
			self._dependency.url = args[0]
58

  
59
		args=[""]
60
		if self._arguments.read("--group",args):
61
			self._dependency.group = args[0]
62

  
63
		args=[""]
64
		if self._arguments.read("--artifact",args):
65
			self._dependency.artifact = args[0]
66

  
67
		args=[""]
68
		if self._arguments.read("--version",args):
69
			self._dependency.version = args[0]
70

  
71
		args=[""]
72
		if self._arguments.read("--platform",args):
73
			self._dependency.platform = args[0]
74

  
75
		args=[""]
76
		if self._arguments.read("--distribution",args):
77
			self._dependency.distribution = args[0]
78

  
79
		args=[""]
80
		if self._arguments.read("--compiler",args):
81
			self._dependency.compiler = args[0]
82

  
83
		args=[""]
84
		if self._arguments.read("--arch",args):
85
			self._dependency.arch = args[0]
86

  
87
		args=[""]
88
		if self._arguments.read("--ltype",args):
89
			self._dependency.libraryType = args[0]
90

  
91
		if self._arguments.read("--cache"):
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff