Skip to content

Commit 8be9bc3

Browse files
committed
Make module POMs extend pom-scijava directly
And make the toplevel POM into solely an aggregator.
1 parent 5562646 commit 8be9bc3

File tree

25 files changed

+2511
-392
lines changed

25 files changed

+2511
-392
lines changed

pom.xml

Lines changed: 4 additions & 257 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<relativePath />
1010
</parent>
1111

12-
<artifactId>scijava-parent</artifactId>
12+
<artifactId>scijava-aggregator</artifactId>
1313
<version>0-SNAPSHOT</version>
1414
<packaging>pom</packaging>
1515

@@ -98,261 +98,8 @@
9898
<license.licenseName>N/A</license.licenseName>
9999
<license.copyrightOwners>N/A</license.copyrightOwners>
100100

101-
<!--
102-
NB: Older versions of OpenJDK 11 have a bug in the javadoc tool,
103-
which causes errors like:
104-
105-
[ERROR] javadoc: error - The code being documented uses packages
106-
in the unnamed module, but the packages defined in
107-
https://github.com/scijava/scijava/apidocs/ are in named modules.
108-
109-
The most recent version of OpenJDK 11 known to have this problem
110-
is 11.0.8; the oldest version known to have fixed it is 11.0.17.
111-
Therefore, we set the minimum build JDK version to 11.0.17 here.
112-
-->
113-
<scijava.jvm.build.version>[11.0.17,)</scijava.jvm.build.version>
114-
<scijava.jvm.version>11</scijava.jvm.version>
115-
<scijava.javadoc.url.java>https://javadoc.scijava.org/Java11/</scijava.javadoc.url.java>
116-
<scijava.javadoc.url.javafx>https://javadoc.scijava.org/JavaFX11/</scijava.javadoc.url.javafx>
117-
118-
<!-- TEMP: Until pom-scijava 38.0.0 is released. -->
119-
<scijava-maven-plugin.version>3.0.0</scijava-maven-plugin.version>
120-
121-
<script-maven-plugin.version>1.0.0</script-maven-plugin.version>
122-
<jruby.version>9.2.11.1</jruby.version>
123-
124-
<scijava.parse.ops>true</scijava.parse.ops>
101+
<!-- NB: Do not install/deploy this aggregator POM. -->
102+
<maven.deploy.skip>true</maven.deploy.skip>
103+
<maven.install.skip>true</maven.install.skip>
125104
</properties>
126-
127-
<build>
128-
<pluginManagement>
129-
<plugins>
130-
<plugin>
131-
<artifactId>maven-javadoc-plugin</artifactId>
132-
<configuration>
133-
<links>
134-
<!-- Core Java. -->
135-
<link>${scijava.javadoc.url.java}</link>
136-
<!-- SciJava and related projects and forks. -->
137-
<link>https://javadoc.scijava.org/ImgLib2/</link>
138-
<link>https://javadoc.scijava.org/SCIFIO/</link>
139-
<!-- Third party projects. -->
140-
<link>https://javadoc.scijava.org/Apache-Commons-Math/</link>
141-
<link>https://javadoc.scijava.org/Guava/</link>
142-
<link>https://javadoc.scijava.org/JAMA/</link>
143-
<link>https://javadoc.scijava.org/JOML/</link>
144-
<link>https://javadoc.scijava.org/Javassist/</link>
145-
<link>https://javadoc.scijava.org/ojAlgo/</link>
146-
</links>
147-
</configuration>
148-
</plugin>
149-
<plugin>
150-
<groupId>com.alexecollins.maven.plugin</groupId>
151-
<artifactId>script-maven-plugin</artifactId>
152-
<version>${script-maven-plugin.version}</version>
153-
<executions>
154-
<execution>
155-
<id>union-metadata-indices</id>
156-
<phase>process-test-classes</phase>
157-
<goals>
158-
<goal>execute</goal>
159-
</goals>
160-
<configuration>
161-
<language>ruby</language>
162-
<script>
163-
# Append the source plugin annotations to the test plugin annotations
164-
require 'set'
165-
166-
# Handle windows paths
167-
basedir = '${project.basedir}'.gsub /\\+/, '\\\\'
168-
169-
# Reads plugin metadata into a set of strings, one per plugin declaration.
170-
def read_plugins(path)
171-
delim = 'UNIQUE-SEQUENCE-THAT-NO-PLUGIN-WILL-EVER-USE'
172-
return File.exist?(path) ? File.read(path).sub('}{', '}' + delim + '{').split(delim).to_set : Set.new()
173-
end
174-
175-
# Read in main and test scope plugin annotations.
176-
['ops.yaml'].each do |pluginsPath|
177-
mainPluginsPath = "#{basedir}/target/classes/#{pluginsPath}"
178-
testPluginsPath = "#{basedir}/target/test-classes/#{pluginsPath}"
179-
mainPlugins = read_plugins(mainPluginsPath)
180-
testPlugins = read_plugins(testPluginsPath)
181-
182-
# Write out unioned plugin annotations to test scope plugin annotations.
183-
# Without this, the test scope code does not know of the main scope plugins.
184-
allPlugins = mainPlugins.union(testPlugins)
185-
unless allPlugins.empty?()
186-
require 'fileutils'
187-
FileUtils.mkdir_p File.dirname(testPluginsPath)
188-
File.write(testPluginsPath, allPlugins.to_a.join(''))
189-
end
190-
end
191-
</script>
192-
</configuration>
193-
</execution>
194-
</executions>
195-
<dependencies>
196-
<dependency>
197-
<groupId>org.jruby</groupId>
198-
<artifactId>jruby-complete</artifactId>
199-
<version>${jruby.version}</version>
200-
<scope>runtime</scope>
201-
</dependency>
202-
</dependencies>
203-
</plugin>
204-
</plugins>
205-
</pluginManagement>
206-
<plugins>
207-
<plugin>
208-
<artifactId>maven-compiler-plugin</artifactId>
209-
<configuration>
210-
<annotationProcessorPaths>
211-
<path>
212-
<groupId>org.scijava</groupId>
213-
<artifactId>scijava-ops-indexer</artifactId>
214-
<version>${project.version}</version>
215-
</path>
216-
</annotationProcessorPaths>
217-
<fork>true</fork>
218-
<showWarnings>true</showWarnings>
219-
<compilerArgs>
220-
<arg>-Aparse.ops="${scijava.parse.ops}"</arg>
221-
<arg>-Aop.version="${project.version}"</arg>
222-
</compilerArgs>
223-
</configuration>
224-
</plugin>
225-
<plugin>
226-
<artifactId>maven-javadoc-plugin</artifactId>
227-
<configuration>
228-
<tagletArtifacts>
229-
<tagletArtifact>
230-
<groupId>org.scijava</groupId>
231-
<artifactId>scijava-taglets</artifactId>
232-
<version>${project.version}</version>
233-
</tagletArtifact>
234-
</tagletArtifacts>
235-
<tags>
236-
<tag>
237-
<name>implNote</name>
238-
<placement>a</placement>
239-
<head>Implementation Note:</head>
240-
</tag>
241-
</tags>
242-
</configuration>
243-
</plugin>
244-
<plugin>
245-
<artifactId>maven-enforcer-plugin</artifactId>
246-
<dependencies>
247-
<dependency>
248-
<groupId>org.scijava</groupId>
249-
<artifactId>scijava-maven-plugin</artifactId>
250-
<version>2.2.0</version>
251-
</dependency>
252-
</dependencies>
253-
<executions>
254-
<execution>
255-
<id>enforce-no-package-cycles</id>
256-
<goals>
257-
<goal>enforce</goal>
258-
</goals>
259-
<phase>test</phase>
260-
<configuration>
261-
<rules>
262-
<NoPackageCyclesRule
263-
implementation="org.scijava.maven.plugin.enforcer.NoPackageCyclesRule" />
264-
</rules>
265-
</configuration>
266-
</execution>
267-
<execution>
268-
<id>enforce-no-subpackage-dependence</id>
269-
<goals>
270-
<goal>enforce</goal>
271-
</goals>
272-
<phase>test</phase>
273-
<configuration>
274-
<rules>
275-
<NoSubpackageDependenceRule
276-
implementation="org.scijava.maven.plugin.enforcer.NoSubpackageDependenceRule" />
277-
</rules>
278-
</configuration>
279-
</execution>
280-
</executions>
281-
</plugin>
282-
<plugin>
283-
<groupId>com.alexecollins.maven.plugin</groupId>
284-
<artifactId>script-maven-plugin</artifactId>
285-
<version>${script-maven-plugin.version}</version>
286-
</plugin>
287-
</plugins>
288-
</build>
289-
290-
<profiles>
291-
<profile>
292-
<id>benchmarks</id>
293-
<modules>
294-
<module>scijava-ops-benchmarks</module>
295-
</modules>
296-
</profile>
297-
<profile>
298-
<id>only-eclipse-scijava</id>
299-
<activation>
300-
<property>
301-
<name>m2e.version</name>
302-
</property>
303-
</activation>
304-
<build>
305-
<pluginManagement>
306-
<plugins>
307-
<!--
308-
Configure the Eclipse m2e plugin to support needed plugins.
309-
-->
310-
<plugin>
311-
<groupId>org.eclipse.m2e</groupId>
312-
<artifactId>lifecycle-mapping</artifactId>
313-
<!--
314-
NB: Eclipse cannot handle an overridden version property here!
315-
The version needs to stay hardcoded at 1.0.0.
316-
-->
317-
<version>1.0.0</version>
318-
<configuration>
319-
<lifecycleMappingMetadata>
320-
<pluginExecutions combine.children="append">
321-
<!--
322-
NB: Make Eclipse union the metadata indices on every build; see:
323-
https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html
324-
-->
325-
<pluginExecution>
326-
<pluginExecutionFilter>
327-
<groupId>com.alexecollins.maven.plugin</groupId>
328-
<artifactId>script-maven-plugin</artifactId>
329-
<versionRange>${script-maven-plugin.version}</versionRange>
330-
<goals>
331-
<goal>execute</goal>
332-
</goals>
333-
</pluginExecutionFilter>
334-
<action>
335-
<execute>
336-
<runOnConfiguration>true</runOnConfiguration>
337-
<!--
338-
NB: You might think we could run the annotations
339-
union script once only, at configuration time.
340-
Unfortunately, when configuration happens in Eclipse,
341-
the plugin annotations have not yet been generated.
342-
So let's redo the union on every incremental build.
343-
That'll show 'em!
344-
-->
345-
<runOnIncremental>true</runOnIncremental>
346-
</execute>
347-
</action>
348-
</pluginExecution>
349-
</pluginExecutions>
350-
</lifecycleMappingMetadata>
351-
</configuration>
352-
</plugin>
353-
</plugins>
354-
</pluginManagement>
355-
</build>
356-
</profile>
357-
</profiles>
358105
</project>

scijava-collections/pom.xml

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44

55
<parent>
66
<groupId>org.scijava</groupId>
7-
<artifactId>scijava-parent</artifactId>
8-
<version>0-SNAPSHOT</version>
9-
<relativePath>..</relativePath>
7+
<artifactId>pom-scijava</artifactId>
8+
<version>37.0.0</version>
9+
<relativePath />
1010
</parent>
1111

1212
<artifactId>scijava-collections</artifactId>
13+
<version>0-SNAPSHOT</version>
1314

1415
<name>SciJava Collections</name>
1516
<description>Java collections for efficient primitive storage.</description>
@@ -84,6 +85,24 @@
8485

8586
<license.licenseName>bsd_2</license.licenseName>
8687
<license.copyrightOwners>SciJava developers.</license.copyrightOwners>
88+
89+
<!--
90+
NB: Older versions of OpenJDK 11 have a bug in the javadoc tool,
91+
which causes errors like:
92+
93+
[ERROR] javadoc: error - The code being documented uses packages
94+
in the unnamed module, but the packages defined in
95+
https://github.com/scijava/scijava/apidocs/ are in named modules.
96+
97+
The most recent version of OpenJDK 11 known to have this problem
98+
is 11.0.8; the oldest version known to have fixed it is 11.0.17.
99+
Therefore, we set the minimum build JDK version to 11.0.17 here.
100+
-->
101+
<scijava.jvm.build.version>[11.0.17,)</scijava.jvm.build.version>
102+
<scijava.jvm.version>11</scijava.jvm.version>
103+
104+
<!-- TEMP: Until pom-scijava 38.0.0 is released. -->
105+
<scijava-maven-plugin.version>3.0.0</scijava-maven-plugin.version>
87106
</properties>
88107

89108
<dependencies>
@@ -94,4 +113,37 @@
94113
<scope>test</scope>
95114
</dependency>
96115
</dependencies>
116+
117+
<build>
118+
<plugins>
119+
<plugin>
120+
<artifactId>maven-enforcer-plugin</artifactId>
121+
<executions>
122+
<execution>
123+
<id>enforce-package-rules</id>
124+
<goals>
125+
<goal>enforce</goal>
126+
</goals>
127+
<phase>test</phase>
128+
<configuration>
129+
<rules>
130+
<NoPackageCyclesRule
131+
implementation="org.scijava.maven.plugin.enforcer.NoPackageCyclesRule" />
132+
<NoSubpackageDependenceRule
133+
implementation="org.scijava.maven.plugin.enforcer.NoSubpackageDependenceRule" />
134+
</rules>
135+
</configuration>
136+
</execution>
137+
</executions>
138+
</plugin>
139+
<plugin>
140+
<artifactId>maven-javadoc-plugin</artifactId>
141+
<configuration>
142+
<links>
143+
<link>https://javadoc.scijava.org/Java11/</link>
144+
</links>
145+
</configuration>
146+
</plugin>
147+
</plugins>
148+
</build>
97149
</project>

0 commit comments

Comments
 (0)