Skip to content

Commit 4fa3d22

Browse files
Merge pull request #21 from arcticicestudio/task/gh-17-maven-pom-refactoring
Maven POM refactoring
2 parents 66b39bf + 13e1fe0 commit 4fa3d22

File tree

4 files changed

+44
-100
lines changed

4 files changed

+44
-100
lines changed

.travis.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,22 @@
88
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
99
#
1010
# [References]
11-
# Travis CI Documentation
12-
# (https://docs.travis-ci.com)
11+
# Travis CI
12+
# https://docs.travis-ci.com
1313
language: java
14+
dist: trusty
15+
sudo: false
1416
jdk:
17+
- openjdk8
1518
- oraclejdk8
16-
sudo: false
1719
cache:
1820
directories:
1921
- $HOME/.m2
22+
notifications:
23+
email:
24+
on_success: never
25+
on_failure: change
26+
before_script: mvn --version
27+
script: mvn -B clean verify -P code-coverage
2028
after_success:
2129
- bash <(curl -s https://codecov.io/bash)
22-
script: mvn -B clean verify -P code-coverage

circle.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# [References]
1111
# Circle CI
12-
# (https://circleci.com/docs)
12+
# https://circleci.com/docs
1313
machine:
1414
java:
1515
version: oraclejdk8
@@ -18,10 +18,14 @@ general:
1818
artifacts:
1919
- ./target/*.jar
2020

21+
dependencies:
22+
post:
23+
- mvn --version
24+
2125
test:
2226
post:
2327
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
2428
- find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
2529
override:
26-
- mvn clean verify assembly:single -P code-coverage,assemble
27-
- find . -type f -regextype posix-egrep -regex ".*/target/(.*asc|.*jar|.*md5|.*pom|.*sha1|.*tar.gz|.*zip)" -exec cp {} $CIRCLE_ARTIFACTS \;
30+
- mvn clean verify -P code-coverage
31+
- find . -type f -regextype posix-egrep -regex ".*/target/(.*asc|.*jar|.*md5|.*pom|.*sha1)" -exec cp {} $CIRCLE_ARTIFACTS \;

icecore-hashids.iml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@
1414
<orderEntry type="sourceFolder" forTests="false" />
1515
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
1616
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
17-
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
1817
</component>
1918
</module>

pom.xml

Lines changed: 26 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4-
title POM +
5-
project icecore-hashids +
6-
repository https://github.com/arcticicestudio/icecore-hashids +
7-
author Arctic Ice Studio +
8-
9-
copyright Copyright (C) 2017 +
10-
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11-
12-
[References]
13-
Apache Maven
14-
(https://maven.apache.org/guides)
15-
(https://maven.apache.org/pom.html)
16-
(https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html)
17-
Sonatype
18-
(http://books.sonatype.com/mvnref-book/reference)
19-
JFrog Bintray
20-
(https://bintray.com/docs/usermanual)
21-
-->
222
<project
233
xmlns="http://maven.apache.org/POM/4.0.0"
244
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -90,7 +70,11 @@ JFrog Bintray
9070
<assembly.descriptor.bin>${basedir}/src/main/assets/assembly-bin.xml</assembly.descriptor.bin>
9171
<java.version>1.8</java.version>
9272
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
73+
<maven.version.min>3.0.4</maven.version.min>
74+
9375
<checkstyle.version>8.0</checkstyle.version>
76+
<junit.version>4.12</junit.version>
77+
<hamcrest.version>1.3</hamcrest.version>
9478
</properties>
9579

9680
<scm>
@@ -109,21 +93,14 @@ JFrog Bintray
10993
<dependency>
11094
<groupId>junit</groupId>
11195
<artifactId>junit</artifactId>
112-
<version>4.12</version>
96+
<version>${junit.version}</version>
11397
<scope>test</scope>
11498
</dependency>
11599

116100
<dependency>
117101
<groupId>org.hamcrest</groupId>
118102
<artifactId>hamcrest-core</artifactId>
119-
<version>1.3</version>
120-
<scope>test</scope>
121-
</dependency>
122-
123-
<dependency>
124-
<groupId>org.hamcrest</groupId>
125-
<artifactId>hamcrest-library</artifactId>
126-
<version>1.3</version>
103+
<version>${hamcrest.version}</version>
127104
<scope>test</scope>
128105
</dependency>
129106
</dependencies>
@@ -134,7 +111,7 @@ JFrog Bintray
134111
<plugin>
135112
<groupId>org.apache.maven.plugins</groupId>
136113
<artifactId>maven-compiler-plugin</artifactId>
137-
<version>3.5.1</version>
114+
<version>3.6.1</version>
138115
<configuration>
139116
<source>${java.version}</source>
140117
<target>${java.version}</target>
@@ -183,7 +160,7 @@ JFrog Bintray
183160
<plugin>
184161
<groupId>org.apache.maven.plugins</groupId>
185162
<artifactId>maven-javadoc-plugin</artifactId>
186-
<version>2.10.4</version>
163+
<version>3.0.0-M1</version>
187164
<executions>
188165
<execution>
189166
<id>attach-javadocs</id>
@@ -197,7 +174,7 @@ JFrog Bintray
197174
<classifier>javadoc</classifier>
198175
<encoding>${project.build.sourceEncoding}</encoding>
199176
<author>true</author>
200-
<bottom>Copyright &#169; ${project.inceptionYear} {organizationName}</bottom>
177+
<bottom>Copyright &#169; 2017 {organizationName}</bottom>
201178
<doctitle>${project.name} ${project.version} API</doctitle>
202179
<windowtitle>${project.name} ${project.version} API</windowtitle>
203180
<tags>
@@ -223,6 +200,7 @@ JFrog Bintray
223200
<plugin>
224201
<groupId>org.apache.maven.plugins</groupId>
225202
<artifactId>maven-checkstyle-plugin</artifactId>
203+
<version>2.17</version>
226204
<dependencies>
227205
<dependency>
228206
<groupId>com.puppycrawl.tools</groupId>
@@ -247,43 +225,28 @@ JFrog Bintray
247225
</executions>
248226
</plugin>
249227

250-
<plugin>
251-
<groupId>net.ju-n.maven.plugins</groupId>
252-
<artifactId>checksum-maven-plugin</artifactId>
253-
<version>1.3</version>
254-
<executions>
255-
<execution>
256-
<id>checksum-artifacts</id>
257-
<phase>verify</phase>
258-
<goals>
259-
<goal>artifacts</goal>
260-
</goals>
261-
</execution>
262-
</executions>
263-
<configuration>
264-
<algorithms>
265-
<algorithm>SHA-1</algorithm>
266-
<algorithm>MD5</algorithm>
267-
</algorithms>
268-
<csvSummary>false</csvSummary>
269-
</configuration>
270-
</plugin>
271-
272228
<plugin>
273229
<groupId>org.apache.maven.plugins</groupId>
274-
<artifactId>maven-install-plugin</artifactId>
275-
<version>2.5.2</version>
230+
<artifactId>maven-enforcer-plugin</artifactId>
231+
<version>1.4.1</version>
276232
<executions>
277233
<execution>
278-
<phase>install</phase>
234+
<id>enforce-versions</id>
279235
<goals>
280-
<goal>install</goal>
236+
<goal>enforce</goal>
281237
</goals>
238+
<configuration>
239+
<rules>
240+
<requireMavenVersion>
241+
<version>(${maven.version.min},)</version>
242+
</requireMavenVersion>
243+
<requireJavaVersion>
244+
<version>${java.version}</version>
245+
</requireJavaVersion>
246+
</rules>
247+
</configuration>
282248
</execution>
283249
</executions>
284-
<configuration>
285-
<createChecksum>true</createChecksum>
286-
</configuration>
287250
</plugin>
288251
</plugins>
289252
</build>
@@ -323,43 +286,14 @@ JFrog Bintray
323286
</pluginRepositories>
324287

325288
<profiles>
326-
<profile>
327-
<id>assemble</id>
328-
<build>
329-
<plugins>
330-
<plugin>
331-
<groupId>org.apache.maven.plugins</groupId>
332-
<artifactId>maven-assembly-plugin</artifactId>
333-
<version>2.6</version>
334-
<executions>
335-
<execution>
336-
<id>assemble</id>
337-
<phase>none</phase>
338-
<goals>
339-
<goal>single</goal>
340-
</goals>
341-
</execution>
342-
</executions>
343-
<configuration>
344-
<appendAssemblyId>true</appendAssemblyId>
345-
<recompressZippedFiles>false</recompressZippedFiles>
346-
<descriptors>
347-
<descriptor>${assembly.descriptor.bin}</descriptor>
348-
</descriptors>
349-
</configuration>
350-
</plugin>
351-
</plugins>
352-
</build>
353-
</profile>
354-
355289
<profile>
356290
<id>code-coverage</id>
357291
<build>
358292
<plugins>
359293
<plugin>
360294
<groupId>org.jacoco</groupId>
361295
<artifactId>jacoco-maven-plugin</artifactId>
362-
<version>0.7.7.201606060606</version>
296+
<version>0.7.9</version>
363297
<executions>
364298
<execution>
365299
<goals>
@@ -418,7 +352,7 @@ JFrog Bintray
418352
<plugin>
419353
<groupId>org.sonatype.plugins</groupId>
420354
<artifactId>nexus-staging-maven-plugin</artifactId>
421-
<version>1.6.7</version>
355+
<version>1.6.8</version>
422356
<extensions>true</extensions>
423357
<configuration>
424358
<serverId>ossrh</serverId>

0 commit comments

Comments
 (0)