Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #629 from hohwille/feature-template
Browse files Browse the repository at this point in the history
Reworked archetype/template
  • Loading branch information
AbhayChandel authored May 17, 2018
2 parents ea4a0c5 + c5483cc commit 3742e2d
Show file tree
Hide file tree
Showing 109 changed files with 4,187 additions and 777 deletions.
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<cxf.version>3.1.8</cxf.version>
<cxf.version>3.1.9</cxf.version>
<mmm.util.version>7.5.1</mmm.util.version>
<oasp.flatten.mode>bom</oasp.flatten.mode>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public Throwable fromResponse(Response response) {
Map<String, Object> jsonMap = objectMapper.readValue(json, Map.class);
return createException(jsonMap);
} catch (IOException e) {
return new IllegalStateException("Invocation of service", e);
return new ServiceInvocationFailedTechnicalException(e, e.getMessage(), e.getClass().getSimpleName(), null,
this.serviceName);
}
}
}
Expand All @@ -72,4 +73,33 @@ private Throwable createException(String code, String message, UUID uuid) {
return new ServiceInvocationFailedException(message, code, uuid, this.serviceName);
}

/**
* Extends {@link ServiceInvocationFailedException} as {@link #isTechnical() technical} exception.
*/
private static final class ServiceInvocationFailedTechnicalException extends ServiceInvocationFailedException {

private static final long serialVersionUID = 1L;

/**
* The constructor.
*
* @param cause the {@link #getCause() cause} of this exception.
* @param message the {@link #getMessage() message}.
* @param code the {@link #getCode() code}.
* @param uuid {@link UUID} the {@link #getUuid() UUID}.
* @param service the name (e.g. {@link Class#getName() qualified name}) of the service that failed.
*/
private ServiceInvocationFailedTechnicalException(Throwable cause, String message, String code, UUID uuid,
String service) {

super(cause, message, code, uuid, service);
}

@Override
public boolean isForUser() {

return false;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
Expand Down Expand Up @@ -39,6 +40,7 @@ public class AdvancedRevisionEntity implements PersistenceEntity<Long> {

/** @see #getTimestamp() */
@RevisionTimestamp
@Column(name = "\"timestamp\"")
private long timestamp;

/** @see #getDate() */
Expand Down
154 changes: 122 additions & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<!-- oasp4j-sample should actually be restaurant -->
<servicedoc.basePath>oasp4j-sample/services/rest</servicedoc.basePath>
<servicedocgen.version>1.0.0-beta-3</servicedocgen.version>
<javadoc.params></javadoc.params>
<javadoc.option.doclint></javadoc.option.doclint>
<maven.archetype.version>3.0.1</maven.archetype.version>
</properties>

<build>
Expand Down Expand Up @@ -137,18 +138,38 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
</plugin>

<!-- JaCoCo for test coverage -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<version>3.0.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<version>3.7.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -163,27 +184,27 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6</version>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<version>3.0.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
<version>3.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.9.1</version>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -193,17 +214,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
<version>2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>3.0.0</version>
<configuration>
<additionalDependencies>
<additionalDependency>
Expand All @@ -212,14 +233,15 @@
<version>1.2</version>
</additionalDependency>
</additionalDependencies>
<!-- http://jira.codehaus.org/browse/MJAVADOC-308 -->
<!--<maxmemory>5048m</maxmemory> -->
<notree>true</notree>
<!-- https://issues.apache.org/jira/browse/MJAVADOC-308 -->
<!-- <notree>true</notree> -->
<show>private</show>
<encoding>${project.reporting.outputEncoding}</encoding>
<charset>${project.build.sourceEncoding}</charset>
<docfilessubdirs>true</docfilessubdirs>
<additionalparam>${javadoc.params}</additionalparam>
<additionalOptions>
<additionalOption>${javadoc.option.doclint}</additionalOption>
</additionalOptions>
<links>
<link>http://docs.oracle.com/javase/7/docs/api/</link>
<link>http://m-m-m.sourceforge.net/apidocs/</link>
Expand All @@ -231,7 +253,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<version>2.20.1</version>
<configuration>
<!-- force locale to en_EN or tests will fail in other locales -->
<argLine>-Duser.language=en -Duser.region=EN</argLine>
Expand All @@ -242,45 +264,50 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.9</version>
<version>2.20.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.2</version>
<version>3.9.0</version>
<configuration>
<targetJdk>${java.version}</targetJdk>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.5</version>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>1.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>${maven.archetype.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.4</version>
<version>3.4.0.905</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.0.5</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -290,17 +317,42 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>servicedocgen-maven-plugin</artifactId>
<version>${servicedocgen.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.14</version>
<configuration>
<outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
<sortArtifactByName>true</sortArtifactByName>
<includeTransitiveDependencies>true</includeTransitiveDependencies>
<useMissingFile>true</useMissingFile>
<!--<failOnMissing>true</failOnMissing>-->
<licenseMerges>
<licenseMerge>Apache Software License, Version 2.0|The Apache Software License, Version 2.0|Apache 2.0|Apache License, Version 2.0</licenseMerge>
</licenseMerges>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.0</version>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>1.3.6</version>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.7.RELEASE</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -336,7 +388,9 @@
<charset>${project.build.sourceEncoding}</charset>
<docfilessubdirs>true</docfilessubdirs>
<stylesheetfile>${user.dir}/src/main/javadoc/stylesheet.css</stylesheetfile>
<additionalparam>${javadoc.params}</additionalparam>
<additionalOptions>
<additionalOption>${javadoc.option.doclint}</additionalOption>
</additionalOptions>
<links>
<link>http://docs.oracle.com/javase/7/docs/api/</link>
<!--<link>http://oasp.github.io/oasp4j/maven/apidocs/</link> -->
Expand Down Expand Up @@ -364,8 +418,7 @@
<reportSets>
<reportSet>
<reports>
<!-- https://github.com/jeremylong/DependencyCheck/issues/386 -->
<!-- <report>aggregate</report> -->
<report>aggregate</report>
<report>check</report>
</reports>
</reportSet>
Expand All @@ -387,13 +440,22 @@
<scheme>http</scheme>
</schemes>
<javadocs>
<javadoc>
<url>https://seu.sdm.de/pu/lfuadamas/build/maven/site/apidocs</url>
</javadoc>
</javadocs>
</descriptor>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>third-party-report</report>
<report>aggregate-third-party-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>

Expand All @@ -404,7 +466,7 @@
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.params>-Xdoclint:none</javadoc.params>
<javadoc.option.doclint>-Xdoclint:none</javadoc.option.doclint>
</properties>
</profile>
<profile>
Expand Down Expand Up @@ -495,6 +557,34 @@
</repository>
</distributionManagement>
</profile>
<profile>
<id>licenses</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<executions>
<execution>
<id>aggregate-download-licenses</id>
<phase>generate-resources</phase>
<goals>
<goal>aggregate-download-licenses</goal>
</goals>
</execution>

<execution>
<id>aggregate-add-third-party</id>
<phase>process-resources</phase>
<goals>
<goal>aggregate-add-third-party</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- separate eclipse build from command-line... -->
<id>eclipse</id>
Expand Down
Loading

0 comments on commit 3742e2d

Please sign in to comment.