Skip to content

Commit e694f81

Browse files
authored
Merge pull request #15 from scijava/migrate-imagej-maven-plugin
Migrate imagej-maven-plugin
2 parents fcb14cf + ba75487 commit e694f81

File tree

93 files changed

+4360
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+4360
-103
lines changed

LICENSE.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
Copyright (c) 2014 - 2016, Board of Regents of the University of
2-
Wisconsin-Madison.
1+
Copyright (c) 2014 - 2018, Board of Regents of the University of
2+
Wisconsin-Madison, Broad Institute of MIT and Harvard, Max Planck
3+
Institute of Molecular Cell Biology and Genetics, and KNIME GmbH.
34
All rights reserved.
45

56
Redistribution and use in source and binary forms, with or without modification,

README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,21 @@ $ mvn scijava:help
1414
[INFO] SciJava plugin for Maven 0.5.0
1515
A plugin for managing SciJava-based projects.
1616

17-
This plugin has 5 goals:
17+
This plugin has 7 goals:
1818

1919
scijava:bump
2020
Bumps dependency and parent versions in SciJava projects.
2121

22+
scijava:copy-jars
23+
Copies .jar artifacts and their dependencies into a SciJava application
24+
directory structure. ImageJ 1.x plugins (identified by containing a
25+
plugins.config file) get copied to the plugins/ subdirectory and all other
26+
.jar files to jars/. However, you can override this decision by setting the
27+
scijava.app.subdirectory property to a specific subdirectory. It expects the
28+
location of the SciJava application directory to be specified in the
29+
scijava.app.directory property (which can be set on the Maven command-line).
30+
If said property is not set, the copy-jars goal is skipped.
31+
2232
scijava:eclipse-helper
2333
Runs the annotation processor of the scijava-common artifact even inside
2434
Eclipse.
@@ -28,6 +38,16 @@ scijava:help
2838
Call mvn scijava:help -Ddetail=true -Dgoal=<goal-name> to display parameter
2939
details.
3040

41+
scijava:install-artifact
42+
Downloads .jar artifacts and their dependencies into a SciJava application
43+
directory structure. ImageJ 1.x plugins (identified by containing a
44+
plugins.config file) get copied to the plugins/ subdirectory and all other
45+
.jar files to jars/. However, you can override this decision by setting the
46+
scijava.app.subdirectory property to a specific subdirectory. It expects the
47+
location of the SciJava application directory to be specified in the
48+
scijava.app.directory property (which can be set on the Maven command-line).
49+
If said property is not set, the install-artifact goal is skipped.
50+
3151
scijava:set-rootdir
3252
Sets the project.rootdir property to the top-level directory of the current
3353
Maven project structure.
@@ -47,8 +67,9 @@ scijava:verify-no-snapshots
4767
Usage
4868
-----
4969
50-
It is recommended to enable the set-rootdir goal by making the
51-
[SciJava POM](http://github.com/scijava/pom-scijava) the parent project:
70+
It is recommended to enable the _set-rootdir_ as well as the _copy-jars_
71+
goal by making the [SciJava POM](http://github.com/scijava/pom-scijava)
72+
the parent project:
5273
5374
```xml
5475
<project ...>
@@ -78,6 +99,13 @@ Alternatively, you can include the plugin explicitly in the life cycle:
7899
<goal>set-rootdir</goal>
79100
</goals>
80101
</execution>
102+
<execution>
103+
<id>copy-jars</id>
104+
<phase>install</phase>
105+
<goals>
106+
<goal>copy-jars</goal>
107+
</goals>
108+
</execution>
81109
</executions>
82110
</plugin>
83111
</plugins>

pom.xml

Lines changed: 140 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.scijava</groupId>
77
<artifactId>pom-scijava</artifactId>
8-
<version>9.0.0</version>
8+
<version>23.2.0</version>
99
<relativePath />
1010
</parent>
1111

@@ -15,7 +15,12 @@
1515

1616
<name>SciJava plugin for Maven</name>
1717
<description>A plugin for managing SciJava-based projects.</description>
18+
<url>https://github.com/scijava/scijava-maven-plugin</url>
1819
<inceptionYear>2014</inceptionYear>
20+
<organization>
21+
<name>SciJava</name>
22+
<url>http://www.scijava.org/</url>
23+
</organization>
1924
<licenses>
2025
<license>
2126
<name>Simplified BSD License</name>
@@ -37,6 +42,18 @@
3742
<role>maintainer</role>
3843
</roles>
3944
</developer>
45+
<developer>
46+
<id>stelfrich</id>
47+
<name>Stefan Helfrich</name>
48+
<url>http://imagej.net/User:Stelfrich</url>
49+
<roles>
50+
<role>developer</role>
51+
<role>debugger</role>
52+
<role>reviewer</role>
53+
<role>support</role>
54+
<role>maintainer</role>
55+
</roles>
56+
</developer>
4057
</developers>
4158
<contributors>
4259
<contributor>
@@ -52,18 +69,42 @@
5269
</contributor>
5370
</contributors>
5471

72+
<mailingLists>
73+
<mailingList>
74+
<name>ImageJ Forum</name>
75+
<archive>http://forum.imagej.net/</archive>
76+
</mailingList>
77+
</mailingLists>
78+
5579
<scm>
5680
<connection>scm:git:git://github.com/scijava/scijava-maven-plugin</connection>
5781
<developerConnection>scm:git:git@github.com:scijava/scijava-maven-plugin</developerConnection>
5882
<tag>HEAD</tag>
5983
<url>https://github.com/scijava/scijava-maven-plugin</url>
6084
</scm>
85+
<issueManagement>
86+
<system>GitHub Issues</system>
87+
<url>https://github.com/scijava/scijava-maven-plugin/issues</url>
88+
</issueManagement>
89+
<ciManagement>
90+
<system>Travis CI</system>
91+
<url>https://travis-ci.org/scijava/scijava-maven-plugin</url>
92+
</ciManagement>
6193

6294
<properties>
6395
<enforcer.version>1.3.1</enforcer.version>
96+
<license.licenseName>bsd_2</license.licenseName>
97+
<license.copyrightOwners>Board of Regents of the University of
98+
Wisconsin-Madison, Broad Institute of MIT and Harvard, Max Planck
99+
Institute of Molecular Cell Biology and Genetics, and KNIME GmbH.</license.copyrightOwners>
100+
<license.projectName>A plugin for managing SciJava-based projects.</license.projectName>
101+
<maven.compiler.source>1.8</maven.compiler.source>
102+
<maven.compiler.target>1.6</maven.compiler.target>
64103
<maven.version>3.0</maven.version>
65104
<maven2.version>2.2.1</maven2.version>
66105
<maven-tree.version>2.2</maven-tree.version>
106+
<package-name>org.scijava.maven</package-name>
107+
<scijava-common.version>2.66.0</scijava-common.version>
67108
</properties>
68109

69110
<dependencies>
@@ -90,48 +131,6 @@
90131
</exclusion>
91132
</exclusions>
92133
</dependency>
93-
<dependency>
94-
<groupId>org.apache.maven</groupId>
95-
<artifactId>maven-artifact</artifactId>
96-
<version>${maven2.version}</version>
97-
<exclusions>
98-
<exclusion>
99-
<groupId>org.codehaus.plexus</groupId>
100-
<artifactId>plexus-utils</artifactId>
101-
</exclusion>
102-
</exclusions>
103-
</dependency>
104-
<dependency>
105-
<groupId>org.apache.maven</groupId>
106-
<artifactId>maven-project</artifactId>
107-
<version>${maven2.version}</version>
108-
<exclusions>
109-
<exclusion>
110-
<groupId>org.codehaus.plexus</groupId>
111-
<artifactId>plexus-interpolation</artifactId>
112-
</exclusion>
113-
<exclusion>
114-
<groupId>org.codehaus.plexus</groupId>
115-
<artifactId>plexus-utils</artifactId>
116-
</exclusion>
117-
<exclusion>
118-
<groupId>org.apache.maven</groupId>
119-
<artifactId>maven-artifact-manager</artifactId>
120-
</exclusion>
121-
<exclusion>
122-
<groupId>org.apache.maven</groupId>
123-
<artifactId>maven-model</artifactId>
124-
</exclusion>
125-
<exclusion>
126-
<groupId>org.apache.maven</groupId>
127-
<artifactId>maven-settings</artifactId>
128-
</exclusion>
129-
<exclusion>
130-
<groupId>classworlds</groupId>
131-
<artifactId>classworlds</artifactId>
132-
</exclusion>
133-
</exclusions>
134-
</dependency>
135134
<dependency>
136135
<groupId>org.apache.maven</groupId>
137136
<artifactId>maven-plugin-api</artifactId>
@@ -166,13 +165,57 @@
166165
<dependency>
167166
<groupId>org.apache.maven.plugin-tools</groupId>
168167
<artifactId>maven-plugin-annotations</artifactId>
169-
<version>3.3</version>
168+
<version>3.5</version>
170169
</dependency>
171170
<dependency>
172171
<groupId>junit</groupId>
173172
<artifactId>junit</artifactId>
174173
<scope>test</scope>
175174
</dependency>
175+
176+
<dependency>
177+
<groupId>org.apache.maven</groupId>
178+
<artifactId>maven-artifact</artifactId>
179+
<version>${maven.version}</version>
180+
</dependency>
181+
<dependency>
182+
<groupId>org.apache.maven</groupId>
183+
<artifactId>maven-compat</artifactId>
184+
<version>${maven.version}</version>
185+
</dependency>
186+
<dependency>
187+
<groupId>org.apache.maven</groupId>
188+
<artifactId>maven-model</artifactId>
189+
<version>${maven.version}</version>
190+
</dependency>
191+
192+
<dependency>
193+
<groupId>org.apache.maven.shared</groupId>
194+
<artifactId>maven-artifact-transfer</artifactId>
195+
<version>0.9.1</version>
196+
</dependency>
197+
<dependency>
198+
<groupId>org.apache.maven.shared</groupId>
199+
<artifactId>maven-common-artifact-filters</artifactId>
200+
<version>3.0.1</version>
201+
</dependency>
202+
203+
<dependency>
204+
<groupId>org.codehaus.plexus</groupId>
205+
<artifactId>plexus-interpolation</artifactId>
206+
<version>1.24</version>
207+
</dependency>
208+
<dependency>
209+
<groupId>org.codehaus.plexus</groupId>
210+
<artifactId>plexus-utils</artifactId>
211+
<version>3.1.0</version>
212+
</dependency>
213+
214+
<dependency>
215+
<groupId>org.scijava</groupId>
216+
<artifactId>scijava-common</artifactId>
217+
<version>${scijava-common.version}</version>
218+
</dependency>
176219
</dependencies>
177220

178221
<build>
@@ -205,33 +248,38 @@
205248
</lifecycleMappingMetadata>
206249
</configuration>
207250
</plugin>
251+
<plugin>
252+
<groupId>org.apache.maven.plugins</groupId>
253+
<artifactId>maven-enforcer-plugin</artifactId>
254+
<version>1.0</version>
255+
<dependencies>
256+
<dependency>
257+
<groupId>org.codehaus.mojo</groupId>
258+
<artifactId>extra-enforcer-rules</artifactId>
259+
<version>1.0-beta-9</version>
260+
</dependency>
261+
</dependencies>
262+
</plugin>
208263
</plugins>
209264
</pluginManagement>
210265
<plugins>
211266
<plugin>
212267
<artifactId>maven-enforcer-plugin</artifactId>
213268
<configuration>
214269
<rules>
215-
<banClasses>
270+
<banDuplicateClasses>
216271
<!--
217272
NB: maven-artifact and maven-project are 2.0 artifacts
218273
that clash with maven-core 3.0.
219274
-->
220-
<dependencies>
221-
<dependency>
222-
<artifactId>maven-artifact</artifactId>
223-
<ignoreClasses>
224-
<ignoreClass>org/apache/maven/artifact/*</ignoreClass>
225-
</ignoreClasses>
226-
</dependency>
227-
<dependency>
228-
<artifactId>maven-project</artifactId>
229-
<ignoreClasses>
230-
<ignoreClass>org/apache/maven/project/*</ignoreClass>
231-
</ignoreClasses>
232-
</dependency>
233-
</dependencies>
234-
</banClasses>
275+
<ignoreClasses>
276+
<ignoreClass>org/apache/maven/artifact/*</ignoreClass>
277+
278+
<ignoreClass>org/apache/maven/project/*</ignoreClass>
279+
</ignoreClasses>
280+
<findAllDuplicates>true</findAllDuplicates>
281+
<ignoreWhenIdentical>true</ignoreWhenIdentical>
282+
</banDuplicateClasses>
235283
</rules>
236284
</configuration>
237285
</plugin>
@@ -253,13 +301,40 @@
253301
</executions>
254302
</plugin>
255303
<plugin>
256-
<groupId>org.codehaus.mojo</groupId>
257-
<artifactId>license-maven-plugin</artifactId>
304+
<artifactId>maven-invoker-plugin</artifactId>
305+
<version>1.8</version>
258306
<configuration>
259-
<licenseName>bsd_2</licenseName>
260-
<organizationName>Board of Regents of the University of
261-
Wisconsin-Madison.</organizationName>
307+
<!-- <debug>true</debug> -->
308+
<showErrors>true</showErrors>
309+
<streamLogs>true</streamLogs>
310+
<properties>
311+
<scijava-maven.version>${project.version}</scijava-maven.version>
312+
</properties>
313+
<projectsDirectory>src/it</projectsDirectory>
314+
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
315+
<pomIncludes>
316+
<pomInclude>*/pom.xml</pomInclude>
317+
</pomIncludes>
318+
<settingsFile>src/it/settings.xml</settingsFile>
319+
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
320+
<preBuildHookScript>setup.bsh</preBuildHookScript>
321+
<postBuildHookScript>verify.bsh</postBuildHookScript>
322+
<goals>
323+
<goal>install</goal>
324+
</goals>
262325
</configuration>
326+
<executions>
327+
<execution>
328+
<id>integration-test</id>
329+
<goals>
330+
<goal>install</goal>
331+
<goal>run</goal>
332+
</goals>
333+
</execution>
334+
</executions>
335+
</plugin>
336+
<plugin>
337+
<artifactId>maven-release-plugin</artifactId>
263338
</plugin>
264339
</plugins>
265340
</build>

0 commit comments

Comments
 (0)