forked from mbtaylor/jsamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.maven2
258 lines (227 loc) · 9.27 KB
/
README.maven2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
JSAMP builds using maven 1. I attempted a maven 2 conversion
(with considerable help from Paul Harrison), but I couldn't
get it working as well as the maven 1 build. Problems included:
- I couldn't get the xdoc documents to include automatically generated
documentation fragments, because entity inclusion doesn't seem to
work (see http://jira.codehaus.org/browse/DOXIA-250)
- The build took much longer than it used to (Paul believes this is
down to the dependencies report checking on repositories which time
out, could be avoided by running mvn -o).
- Ant file generation doesn't work which means it's hard for third
parties to do the build from the source distribution (see http://jira.codehaus.org/browse/MANT-52).
Additionally, JSAMP has very few dependencies and so doesn't really
benefit from Maven 2's improved dependency management.
Apart from that the build did actually work.
The changes are recorded here, in case another attempt at mvn2ising
JSAMP is made (this might well be worth it at the next release of maven 2 if the fixes to the bugs above are made). Changes are:
- New file pom.xml included at top level (text below)
- Replace src/site/xdoc/navigation.xml with src/site/site.xml (text below)
- New file src/resources/org/astrogrid/samp/jsamp.version - one line
file containing the text "${pom.version}".
- Some changes in file src/site/xdoc/commands.xml; entity locations
changed from "../../../target/docs/org.astrogrid.samp.foo"
to "${builddocdir}/org.astrogrid.samp.foo"
However, this didn't actually work, as noted above. If the Doxia
fix is ever made to maven, it might to though.
Mark Taylor 7 July 2009.
Text of files required for maven 2 build:
========================================================================
pom.xml
========================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>jsamp</artifactId>
<version>0.3-1</version>
<name>JSAMP</name>
<parent>
<artifactId>astrogrid-base</artifactId>
<groupId>org.astrogrid</groupId>
<version>2009.1-SNAPSHOT</version>
</parent>
<description>Various components used for developing and deploying
Simple Applications Messaging Protocol-compliant
applications and middleware.</description>
<inceptionYear>2008</inceptionYear>
<developers>
<developer>
<id>mbt</id>
<name>Mark Taylor</name>
<email>[email protected]</email>
<url>http://www.star.bristol.ac.uk/~mbt/</url>
<organization>Bristol University</organization>
</developer>
</developers>
<properties>
<builddocdir>${project.build.directory}/docs</builddocdir>
</properties>
<build>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<resources>
<resource>
<directory>src/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-ea</argLine>
<testFailureIgnore>true</testFailureIgnore>
<useFile>false;</useFile>
<includes>
<include>org/astrogrid/samp/**/*Test.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>org.astrogrid.samp.JSamp</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Write command usage for command-line tools to files. -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>pre-site</phase>
<configuration>
<tasks>
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpathref="maven.plugin.classpath"/>
<mkdir dir="${project.build.directory}/docs"/>
<echo>Generating command usage strings</echo>
<for param="command" trim="true"
list="org.astrogrid.samp.JSamp,
org.astrogrid.samp.xmlrpc.HubRunner,
org.astrogrid.samp.gui.HubMonitor,
org.astrogrid.samp.test.Snooper,
org.astrogrid.samp.test.CalcStorm,
org.astrogrid.samp.test.HubTester">
<sequential>
<echo> @{command}</echo>
<java classname="@{command}"
output="${project.build.directory}/docs/@{command}.usage"
fork="true" failonerror="true" logerror="true">
<classpath>
<pathelement
location="${project.build.outputDirectory}"/>
</classpath>
<arg value="-help"/>
</java>
<replace file="${project.build.directory}/docs/@{command}.usage">
<replaceFilter token="&" value="&amp;"/>
<replaceFilter token="<" value="&lt;"/>
<replaceFilter token=">" value="&gt;"/>
</replace>
</sequential>
</for>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b2</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
<link>http://java.sun.com/j2se/1.4.2/docs/api/</link>
<link>http://ws.apache.org/xmlrpc/xmlrpc2/apidocs/</link>
</links>
<offlineLinks>
<offlineLink>
<url>http://java.sun.com/j2se/1.4.2/docs/api/</url>
<location>${project.build.sourceDirectory}/../docs/packagelists/j2se</location>
</offlineLink>
<offlineLink>
<url>http://ws.apache.org/xmlrpc/xmlrpc2/apidocs/</url>
<location>${project.build.sourceDirectory}/../docs/packagelists/xmlrpc</location>
</offlineLink>
</offlineLinks>
<source>1.4</source>
</configuration>
</plugin>
</plugins>
</reporting>
<dependencies>
<dependency>
<groupId>xmlrpc</groupId>
<artifactId>xmlrpc</artifactId>
<version>1.2-b1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8</version>
</dependency>
</dependencies>
<url>${astrogrid_doc_URL_root}/p/samp/${project.version}/</url>
<distributionManagement>
<site>
<id>agsite</id> <!-- this is the desired layout of the site and - will have to be repeated in the projects unfortunately until fixes to http://jira.codehaus.org/browse/MNG-2915 are available -->
<name>Default Site</name>
<url>${astrogrid_doc_server_root}/p/samp/${project.version}/</url>
<!-- terror.star.le.ac.uk/ -->
</site>
</distributionManagement>
</project>
========================================================================
src/site/site.xml
========================================================================
<?xml version="1.0"?>
<project name="SAMP" xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
<body>
<links>
<item name="SAMP Information"
href="http://www.ivoa.net/samp/"/>
<item name="SAMP Standard"
href="http://www.ivoa.net/Documents/latest/SAMP.html"/>
</links>
<menu name="Documentation">
<item name="Introduction" href="index.html"/>
<item name="Command-line tools" href="commands.html"/>
<item name="API Overview" href="api.html"/>
<item name="GUI Features" href="gui.html"/>
<item name="Deployment" href="deployment.html"/>
<item name="Javadocs" href="apidocs/index.html"/>
<item name="Downloads" href="downloads.html"/>
<item name="Change Log" href="history.html"/>
<item name="Project Info" href="project-info.html"/>
</menu>
</body>
</project>