Skip to content

Commit b0d6644

Browse files
authored
Merge pull request #70 from FAIRDataTeam/release/1.1.0
Release 1.1.0
2 parents 93e1177 + 2c920c6 commit b0d6644

File tree

108 files changed

+670
-354
lines changed

Some content is hidden

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

108 files changed

+670
-354
lines changed

.mvn/maven.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-Drevision=1.1.0
2+
-Dchangelist=.develop

.travis.yml

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,77 +14,66 @@ stages:
1414
- tag
1515

1616
env:
17-
- IMAGE="fairdata/fairdatapoint" \
18-
IMAGE_TAG="$IMAGE:$TRAVIS_COMMIT" \
19-
IMAGE_TAG_BRANCH="$IMAGE:"`echo $TRAVIS_BRANCH | sed 's#/#-#g'` \
17+
- PRIVATE_IMAGE="$PRIVATE_DOCKER_REGISTRY/fairdatapoint" \
18+
IMAGE="fairdata/fairdatapoint" \
19+
IMAGE_TAG="$PRIVATE_IMAGE:$TRAVIS_COMMIT" \
20+
IMAGE_TAG_BRANCH="$PRIVATE_IMAGE:"`echo $TRAVIS_BRANCH | sed 's#/#-#g'` \
2021
IMAGE_TAG_DEVELOP="$IMAGE:develop" \
2122
IMAGE_TAG_LATEST="$IMAGE:latest"
2223

2324
before_install:
24-
# 1. Log to public Docker Hub
25+
# 1. Log in to public Docker Hub
2526
- docker login -u "$PUBLIC_DOCKER_USER" -p "$PUBLIC_DOCKER_PASSWORD"
27+
# 2. Log in to private Docker Registry
28+
- docker login -u "$PRIVATE_DOCKER_USER" -p "$PRIVATE_DOCKER_PASSWORD" "$PRIVATE_DOCKER_REGISTRY"
2629

2730
jobs:
2831
include:
2932
- stage: build
3033
install:
31-
# 1. Install fairmetadata4j
32-
- git clone --depth 1 -b $TRAVIS_BRANCH https://github.com/DTL-FAIRData/fairmetadata4j ./fairmetadata4j || git clone --depth 1 -b develop https://github.com/DTL-FAIRData/fairmetadata4j ./fairmetadata4j
33-
- cd ./fairmetadata4j
34-
- mvn --quiet --fail-fast install
35-
- cd ..
36-
# 2. Install Spring Rdf Migration
37-
- git clone https://github.com/FAIRDataTeam/spring-rdf-migration.git
38-
- cd spring-rdf-migration
39-
- mvn --quiet --fail-fast -DskipTests install
40-
- cd ..
41-
# 3. Install Spring Security ACL Mongo
42-
- git clone https://github.com/FAIRDataTeam/spring-security-acl-mongodb
43-
- cd spring-security-acl-mongodb
44-
- mvn --quiet --fail-fast -DskipTests install
45-
- cd ..
46-
# 4. Init and check testing Mongo Database
34+
# 1. Init and check testing Mongo Database
4735
- mongo fdp-test --eval 'db.collection.find()'
4836
script:
49-
# 5. Build FAIR Data Point
50-
- mvn org.jacoco:jacoco-maven-plugin:prepare-agent test
37+
# 2. Build FAIR Data Point
38+
- mvn --quiet org.jacoco:jacoco-maven-plugin:prepare-agent test
5139
- mvn --quiet --fail-fast -DskipTests package
5240
- docker pull $IMAGE_TAG_DEVELOP
5341
- docker build --cache-from $IMAGE_TAG_DEVELOP -t $IMAGE_TAG .
5442
- docker push $IMAGE_TAG
5543
after_success:
56-
- mvn org.jacoco:jacoco-maven-plugin:report coveralls:report
44+
- mvn --quiet org.jacoco:jacoco-maven-plugin:report coveralls:report
5745

5846
- stage: tag
5947
if: (branch = develop) AND (NOT (type IN (pull_request)))
60-
install: false
48+
install: skip
6149
script:
6250
- docker pull $IMAGE_TAG
6351
- docker image tag $IMAGE_TAG $IMAGE_TAG_DEVELOP
6452
- docker push $IMAGE_TAG_DEVELOP
6553

6654
- stage: tag
6755
if: (branch = master) AND (NOT (type IN (pull_request)))
68-
install: false
56+
install: skip
6957
script:
7058
- docker pull $IMAGE_TAG
7159
- docker image tag $IMAGE_TAG $IMAGE_TAG_LATEST
7260
- docker push $IMAGE_TAG_LATEST
7361

7462
- stage: tag
7563
if: (type = push) AND (NOT ((branch =~ ^release) OR (branch =~ ^v\d+\.\d+\.\d+)))
76-
install: false
64+
install: skip
7765
script:
7866
- docker pull $IMAGE_TAG
7967
- docker image tag $IMAGE_TAG $IMAGE_TAG_BRANCH
8068
- docker push $IMAGE_TAG_BRANCH
8169

8270
- stage: tag
8371
if: (tag =~ ^v\d+\.\d+\.\d+$)
84-
install: false
72+
install: skip
8573
env:
74+
- PRIVATE_IMAGE="$PRIVATE_DOCKER_REGISTRY/fairdatapoint"
8675
- IMAGE="fairdata/fairdatapoint"
87-
- IMAGE_TAG="$IMAGE:$TRAVIS_COMMIT"
76+
- IMAGE_TAG="$PRIVATE_IMAGE:$TRAVIS_COMMIT"
8877
- IMAGE_TAG_MAJOR="$IMAGE:"`echo $TRAVIS_TAG | sed -E "s/v(.*)\..*\..*/\1/g"`
8978
- IMAGE_TAG_MINOR="$IMAGE:"`echo $TRAVIS_TAG | sed -E "s/v(.*)\..*/\1/g"`
9079
- IMAGE_TAG_PATCH="$IMAGE:"`echo $TRAVIS_TAG | sed -E "s/v//g"`
@@ -99,10 +88,11 @@ jobs:
9988

10089
- stage: tag
10190
if: (tag =~ ^v\d+\.\d+\.\d+-rc\.\d+$)
102-
install: false
91+
install: skip
10392
env:
93+
- PRIVATE_IMAGE="$PRIVATE_DOCKER_REGISTRY/fairdatapoint"
10494
- IMAGE="fairdata/fairdatapoint"
105-
- IMAGE_TAG="$IMAGE:$TRAVIS_COMMIT"
95+
- IMAGE_TAG="$PRIVATE_IMAGE:$TRAVIS_COMMIT"
10696
- IMAGE_TAG_RC="$IMAGE:"`echo $TRAVIS_TAG | sed -E "s/v//g"`
10797
script:
10898
- docker pull $IMAGE_TAG

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ FROM openjdk:11-jdk-slim
2626
WORKDIR /fdp
2727

2828
ADD target/fdp-spring-boot.jar /fdp/app.jar
29-
ADD target/classes/application-production.yml /fdp/application-production.yml
29+
ADD target/classes/application-production.yml /fdp/application.yml
3030

31-
ENTRYPOINT java -jar app.jar --spring.profiles.active=production --spring.config.location=classpath:/application.yml,file:/fdp/application-production.yml
31+
ENTRYPOINT java -jar app.jar --spring.profiles.active=production --spring.config.location=classpath:/application.yml,classpath:/application-production.yml,file:/fdp/application.yml

pom.xml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111
<groupId>nl.dtls</groupId>
1212
<artifactId>fairdatapoint</artifactId>
13-
<version>1.0.0</version>
13+
<version>${revision}${changelist}</version>
1414
<packaging>jar</packaging>
1515

1616
<name>FairDataPoint</name>
@@ -51,12 +51,12 @@
5151
<maven.compiler.target>11</maven.compiler.target>
5252

5353
<!-- Project related -->
54-
<fairmetadata.version>1.0.0</fairmetadata.version>
55-
<spring.rdf.migration.version>1.0.0</spring.rdf.migration.version>
54+
<fairmetadata.version>${revision}${changelist}</fairmetadata.version>
55+
<spring.rdf.migration.version>1.0.0.RELEASE</spring.rdf.migration.version>
56+
<spring.security.acl.mongo.version>5.1.5.RELEASE</spring.security.acl.mongo.version>
5657

5758
<!-- Spring -->
5859
<spring.boot.handlebars.version>0.3.0</spring.boot.handlebars.version>
59-
<spring.security.acl.mongo.version>5.1.5-SNAPSHOT</spring.security.acl.mongo.version>
6060

6161
<!-- Core -->
6262
<mongobee.version>0.13</mongobee.version>
@@ -79,15 +79,24 @@
7979
<plugin.jacoco.version>0.7.6.201602180812</plugin.jacoco.version>
8080
<plugin.coveralls.version>4.3.0</plugin.coveralls.version>
8181
<plugin.javax_xml_bind.version>2.3.1</plugin.javax_xml_bind.version>
82+
<plugin.git_commit_id.version>2.2.4</plugin.git_commit_id.version>
8283
</properties>
8384

85+
<repositories>
86+
<repository>
87+
<id>nexus-releases</id>
88+
<name>Nexus Releases</name>
89+
<url>https://toolshed.fair-dtls.surf-hosted.nl/repository/maven-releases/</url>
90+
</repository>
91+
</repositories>
92+
8493
<dependencies>
8594

8695
<!-- ////////////////// -->
8796
<!-- Project related -->
8897
<!-- ////////////////// -->
8998
<dependency>
90-
<groupId>nl.dtl</groupId>
99+
<groupId>nl.dtls</groupId>
91100
<artifactId>fairmetadata4j</artifactId>
92101
<version>${fairmetadata.version}</version>
93102
</dependency>
@@ -130,6 +139,10 @@
130139
<groupId>org.springframework.security</groupId>
131140
<artifactId>spring-security-acl</artifactId>
132141
</dependency>
142+
<dependency>
143+
<groupId>org.springframework.boot</groupId>
144+
<artifactId>spring-boot-starter-actuator</artifactId>
145+
</dependency>
133146
<dependency>
134147
<groupId>org.springframework.security</groupId>
135148
<artifactId>spring-security-acl-mongodb</artifactId>
@@ -322,8 +335,30 @@
322335
<mainClass>nl.dtls.fairdatapoint.Application</mainClass>
323336
</configuration>
324337
</execution>
338+
<execution>
339+
<id>build-info</id>
340+
<goals>
341+
<goal>build-info</goal>
342+
</goals>
343+
</execution>
325344
</executions>
326345
</plugin>
346+
<plugin>
347+
<groupId>pl.project13.maven</groupId>
348+
<artifactId>git-commit-id-plugin</artifactId>
349+
<version>${plugin.git_commit_id.version}</version>
350+
<executions>
351+
<execution>
352+
<id>get-the-git-infos</id>
353+
<goals>
354+
<goal>revision</goal>
355+
</goals>
356+
</execution>
357+
</executions>
358+
<configuration>
359+
<verbose>false</verbose>
360+
</configuration>
361+
</plugin>
327362
</plugins>
328363
</build>
329364

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* The MIT License
3+
* Copyright © 2017 DTL
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
* THE SOFTWARE.
22+
*/
23+
package nl.dtls.fairdatapoint.api.controller.configuration;
24+
25+
import nl.dtls.fairdatapoint.api.dto.configuration.ConfigurationDTO;
26+
import nl.dtls.fairdatapoint.service.configuration.ConfigurationService;
27+
import org.springframework.beans.factory.annotation.Autowired;
28+
import org.springframework.http.HttpStatus;
29+
import org.springframework.http.ResponseEntity;
30+
import org.springframework.web.bind.annotation.RequestMapping;
31+
import org.springframework.web.bind.annotation.RequestMethod;
32+
import org.springframework.web.bind.annotation.RestController;
33+
34+
@RestController
35+
@RequestMapping("/configuration")
36+
public class ConfigurationController {
37+
38+
@Autowired
39+
private ConfigurationService configurationService;
40+
41+
@RequestMapping(method = RequestMethod.GET)
42+
public ResponseEntity<ConfigurationDTO> getDashboard() {
43+
ConfigurationDTO dto = configurationService.getConfiguration();
44+
return new ResponseEntity<>(dto, HttpStatus.OK);
45+
}
46+
47+
}

src/main/java/nl/dtls/fairdatapoint/api/controller/dashboard/DashboardController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
package nl.dtls.fairdatapoint.api.controller.dashboard;
2424

25-
import nl.dtl.fairmetadata4j.model.FDPMetadata;
25+
import nl.dtls.fairmetadata4j.model.FDPMetadata;
2626
import nl.dtls.fairdatapoint.api.controller.metadata.MetadataController;
2727
import nl.dtls.fairdatapoint.api.dto.dashboard.DashboardCatalogDTO;
2828
import nl.dtls.fairdatapoint.service.dashboard.DashboardService;

src/main/java/nl/dtls/fairdatapoint/api/controller/exception/ExceptionControllerAdvice.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
*/
2828
package nl.dtls.fairdatapoint.api.controller.exception;
2929

30-
import nl.dtl.fairmetadata4j.io.MetadataException;
31-
import nl.dtl.fairmetadata4j.io.MetadataParserException;
30+
import nl.dtls.fairmetadata4j.io.MetadataException;
31+
import nl.dtls.fairmetadata4j.io.MetadataParserException;
3232
import nl.dtls.fairdatapoint.api.dto.error.ErrorDTO;
3333
import nl.dtls.fairdatapoint.entity.exception.ForbiddenException;
3434
import nl.dtls.fairdatapoint.entity.exception.ResourceNotFoundException;

src/main/java/nl/dtls/fairdatapoint/api/controller/metadata/MetadataController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
package nl.dtls.fairdatapoint.api.controller.metadata;
2929

30-
import nl.dtl.fairmetadata4j.model.*;
30+
import nl.dtls.fairmetadata4j.model.*;
3131
import nl.dtls.fairdatapoint.api.dto.metadata.*;
3232
import nl.dtls.fairdatapoint.service.metadata.common.MetadataService;
3333
import org.eclipse.rdf4j.model.IRI;

src/main/java/nl/dtls/fairdatapoint/api/controller/metadata/catalog/CatalogController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
package nl.dtls.fairdatapoint.api.controller.metadata.catalog;
2424

2525
import com.fasterxml.jackson.databind.ObjectMapper;
26-
import nl.dtl.fairmetadata4j.model.CatalogMetadata;
27-
import nl.dtl.fairmetadata4j.model.DatasetMetadata;
28-
import nl.dtl.fairmetadata4j.model.FDPMetadata;
26+
import nl.dtls.fairmetadata4j.model.CatalogMetadata;
27+
import nl.dtls.fairmetadata4j.model.DatasetMetadata;
28+
import nl.dtls.fairmetadata4j.model.FDPMetadata;
2929
import nl.dtls.fairdatapoint.api.controller.metadata.MetadataController;
3030
import nl.dtls.fairdatapoint.api.dto.member.MemberDTO;
3131
import nl.dtls.fairdatapoint.api.dto.metadata.CatalogMetadataChangeDTO;

src/main/java/nl/dtls/fairdatapoint/api/controller/metadata/catalog/CatalogMemberController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
package nl.dtls.fairdatapoint.api.controller.metadata.catalog;
2424

25-
import nl.dtl.fairmetadata4j.model.CatalogMetadata;
25+
import nl.dtls.fairmetadata4j.model.CatalogMetadata;
2626
import nl.dtls.fairdatapoint.api.controller.metadata.MetadataController;
2727
import nl.dtls.fairdatapoint.api.dto.member.MemberCreateDTO;
2828
import nl.dtls.fairdatapoint.api.dto.member.MemberDTO;

0 commit comments

Comments
 (0)