-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from mslowiak/develop
AnnouncementsProcessor 1.0
- Loading branch information
Showing
145 changed files
with
14,095 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
version: 2 | ||
jobs: | ||
parser-test: | ||
docker: | ||
- image: circleci/openjdk:8-jdk-browsers | ||
|
||
steps: | ||
- checkout | ||
|
||
- restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed | ||
key: circleci-announcement-processor-parser-{{ checksum "announcement-processor-parser/pom.xml" }} | ||
|
||
- run: cd announcement-processor-parser && mvn dependency:go-offline # gets the project dependencies | ||
|
||
- save_cache: # saves the project dependencies | ||
paths: | ||
- ~/.m2 | ||
key: circleci-announcement-processor-parser-{{ checksum "announcement-processor-parser/pom.xml" }} | ||
|
||
- run: cd announcement-processor-parser && mvn package # run the actual tests | ||
|
||
- store_test_results: # uploads the test metadata from the `target/surefire-reports` directory so that it can show up in the CircleCI dashboard. | ||
path: announcement-processor-parser/target/surefire-reports | ||
|
||
- store_artifacts: | ||
path: announcement-processor-parser/target/parser-service.jar | ||
|
||
api-test: | ||
docker: | ||
- image: circleci/openjdk:8-jdk-browsers | ||
|
||
steps: | ||
- checkout | ||
|
||
- restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed | ||
key: circleci-announcement-processor-api-{{ checksum "announcement-processor-api/pom.xml" }} | ||
|
||
- run: cd announcement-processor-api && mvn dependency:go-offline # gets the project dependencies | ||
|
||
- save_cache: # saves the project dependencies | ||
paths: | ||
- ~/.m2 | ||
key: circleci-announcement-processor-api-{{ checksum "announcement-processor-api/pom.xml" }} | ||
|
||
- run: cd announcement-processor-api && mvn package # run the actual tests | ||
|
||
- store_test_results: # uploads the test metadata from the `target/surefire-reports` directory so that it can show up in the CircleCI dashboard. | ||
path: announcement-processor-api/target/surefire-reports | ||
|
||
- store_artifacts: | ||
path: announcement-processor-api/target/api-service.jar | ||
|
||
extractor-test: | ||
docker: | ||
- image: circleci/openjdk:8-jdk-browsers | ||
|
||
steps: | ||
- checkout | ||
|
||
- restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed | ||
key: circleci-announcement-processor-extractor-{{ checksum "announcement-processor-extractor/pom.xml" }} | ||
|
||
- run: cd announcement-processor-extractor && mvn dependency:go-offline # gets the project dependencies | ||
|
||
- save_cache: # saves the project dependencies | ||
paths: | ||
- ~/.m2 | ||
key: circleci-announcement-processor-extractor-{{ checksum "announcement-processor-extractor/pom.xml" }} | ||
|
||
- run: cd announcement-processor-extractor && mvn package # run the actual tests | ||
|
||
- store_test_results: # uploads the test metadata from the `target/surefire-reports` directory so that it can show up in the CircleCI dashboard. | ||
path: announcement-processor-extractor/target/surefire-reports | ||
|
||
- store_artifacts: | ||
path: announcement-processor-extractor/target/extractor-service.jar | ||
|
||
workflows: | ||
version: 2 | ||
announcement_processor: | ||
jobs: | ||
- parser-test | ||
- api-test | ||
- extractor-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/target/ | ||
.mvn | ||
mvnw | ||
mvnw.cmd | ||
|
||
src/main/resources/application-prod.properties | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/build/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/target/ | ||
.mvn | ||
mvnw | ||
mvnw.cmd | ||
|
||
src/main/resources/application-prod.properties | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/build/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM openjdk:8-jdk-alpine | ||
|
||
RUN apk update | ||
RUN apk add maven | ||
|
||
RUN mkdir -p /srv/announcement-processor/api | ||
WORKDIR /srv/announcement-processor/api | ||
|
||
ADD pom.xml /srv/announcement-processor/api | ||
COPY src /srv/announcement-processor/api/src | ||
|
||
RUN ["mvn", "clean", "install", "-DskipTests"] | ||
|
||
EXPOSE 8080 | ||
|
||
CMD java -jar -Dspring.profiles.active=dev /srv/announcement-processor/api/target/api-service.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>announcement-processor</groupId> | ||
<artifactId>api</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>Announcement processor api</name> | ||
|
||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>2.1.0.RELEASE</version> | ||
<relativePath/> | ||
</parent> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<java.version>1.8</java.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-devtools</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<!--LESS CODE MORE ANNOTATIONS--> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
|
||
<!--TEST--> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<version>2.0.2-beta</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
<version>0.8.2</version> | ||
</dependency> | ||
|
||
<!--DB--> | ||
<dependency> | ||
<groupId>org.springframework.data</groupId> | ||
<artifactId>spring-data-jpa</artifactId> | ||
<version>2.1.2.RELEASE</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.h2database</groupId> | ||
<artifactId>h2</artifactId> | ||
<version>1.4.197</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
|
||
<!--ModelMapper--> | ||
<dependency> | ||
<groupId>org.modelmapper</groupId> | ||
<artifactId>modelmapper</artifactId> | ||
<version>2.3.2</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<finalName> | ||
api-service | ||
</finalName> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<useSystemClassLoader>false</useSystemClassLoader> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
<version>0.8.2</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>prepare-agent</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>report</id> | ||
<phase>test</phase> | ||
<goals> | ||
<goal>report</goal> | ||
</goals> | ||
<configuration> | ||
<excludes> | ||
<exclude> | ||
api/AnnouncementProcessorApiApplication.class | ||
</exclude> | ||
</excludes> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
||
</project> |
12 changes: 12 additions & 0 deletions
12
announcement-processor-api/src/main/java/api/AnnouncementProcessorApiApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package api; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class AnnouncementProcessorApiApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(AnnouncementProcessorApiApplication.class, args); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
announcement-processor-api/src/main/java/api/configuration/ModelMapperConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package api.configuration; | ||
|
||
import api.converter.AnnouncementDtoEntityConverter; | ||
import org.modelmapper.ModelMapper; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class ModelMapperConfig { | ||
|
||
@Bean | ||
public ModelMapper modelMapper() { | ||
ModelMapper mapper = new ModelMapper(); | ||
mapper.addConverter(new AnnouncementDtoEntityConverter()); | ||
return mapper; | ||
} | ||
} |
Oops, something went wrong.