Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #312 from boschresearch/feature/aggregate-attribution
Browse files Browse the repository at this point in the history
Feature/aggregate attribution
  • Loading branch information
etschelp authored Feb 4, 2021
2 parents 8da3312 + eac1ab6 commit 8718a80
Show file tree
Hide file tree
Showing 17 changed files with 116 additions and 1,863 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ formatter-maven-cache.properties
# Build
**/target/**

# Ignore dynamically added frontend files
# Generated frontend files
backend/*/src/main/resources/public/**
# Generated license report
backend/*/src/main/resources/3rdPartyLicenses/**
!backend/*/src/main/resources/3rdPartyLicenses/spotbugs**.txt

# --------------------------------------
# Frontend
Expand All @@ -66,8 +69,7 @@ frontend/node/**
frontend/node_modules/**
frontend/dist/**

frontend/licenses/attribution.txt
frontend/licenses/third-party-report.xml
frontend/licenses/**

**/application-dev-*.yml
node_modules
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RUN mvn clean install -P build-frontend -DskipTests=true -Dspotbugs.skip=true -D
# Runtime Container
FROM amazoncorretto:15-alpine
COPY --from=0 /home/maven/backend/business-partner-agent/target/business-partner-agent*SNAPSHOT.jar business-partner-agent.jar
COPY --from=0 /home/maven/backend/business-partner-agent/src/main/resources/3rdPartyLicenses ./3rdPartyLicenses

EXPOSE 8080
CMD java -XX:+UnlockExperimentalVMOptions -Dcom.sun.management.jmxremote -noverify ${JAVA_OPTS} -jar business-partner-agent.jar
14 changes: 2 additions & 12 deletions backend/business-partner-agent/licenses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,9 @@
</names>
</license>
<license>
<name>Eclipse Public License v. 2.0</name>
<name>GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1</name>
<names>
<name>Eclipse Public License v. 2.0</name>
<name>EPL 2.0</name>
</names>
</license>
<license>
<name>GPL2 w/ CPE</name>
<names>
<name>GPL2 w/ CPE</name>
<name>GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1</name>
</names>
</license>
<license>
Expand All @@ -52,9 +45,6 @@
<names>
<name>GNU General Public License version 2</name>
</names>
<urls>
<url>https://opensource.org/licenses/gpl-2.0.php</url>
</urls>
</license>
</forbidden>
</licenses>
113 changes: 58 additions & 55 deletions backend/business-partner-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,24 @@
<groupId>io.micronaut.sql</groupId>
<artifactId>micronaut-jdbc-hikari</artifactId>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>2.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<scope>provided</scope><!-- Prevent shipping -->
</dependency>
<!-- Micronaut license overwrites -->
<!-- Drop in for javax.annotation-api -->
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>1.3.5</version>
</dependency>
<!-- Prevent shipping -->
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<scope>provided</scope>
<optional>true</optional>
<groupId>org.apache.tomcat</groupId>
<artifactId>annotations-api</artifactId>
<version>6.0.53</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand Down Expand Up @@ -300,63 +294,58 @@
<build>
<plugins>
<!-- mvn license:third-party-report -->
<!-- mvn license:aggregate-download-licenses -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.0.1-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>third-party-report</goal>
<goal>aggregate-download-licenses</goal>
</goals>
</execution>
</executions>
<configuration>
<executeOnlyOnRootModule>false</executeOnlyOnRootModule>
<licensesOutputDirectory>${project.basedir}/src/main/resources/3rdPartyLicenses/licenses</licensesOutputDirectory>
<licensesOutputFile>${project.basedir}/src/main/resources/3rdPartyLicenses/backend-licenses.xml</licensesOutputFile>
<extendedInfo>true</extendedInfo>
<writeExcelFile>true</writeExcelFile>
<excludedScopes>test,provided</excludedScopes>
<licenseMerges>
<licenseMerge>The Apache Software License, Version 2.0|The Apache License, Version 2.0|Apache License, Version 2.0|Apache License 2.0|Apache 2.0</licenseMerge>
<licenseMerge>The MIT License|MIT License</licenseMerge>
</licenseMerges>
</configuration>
</plugin>
<!-- mvn xml:transform -->
<!-- LGPL requirement, copy spotbugs sources jar -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0.2</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>copy</id>
<phase>generate-resources</phase>
<goals>
<goal>transform</goal>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<forceCreation>true</forceCreation>
<catalogs>
<catalog>src/test/resources/xml/catalog.xml</catalog>
</catalogs>
<transformationSets>
<transformationSet>
<dir>${project.build.directory}/site</dir>
<stylesheet>src/test/resources/xml/stylesheet.xsl</stylesheet>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
<targetExtension>.xml</targetExtension>
</fileMapper>
</fileMappers>
</transformationSet>
</transformationSets>
<artifactItems>
<artifactItem>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<type>jar</type>
<overWrite>false</overWrite>
<classifier>sources</classifier>
<outputDirectory>${project.basedir}/src/main/resources/3rdPartyLicenses</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
<dependencies>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>10.3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
Expand All @@ -368,7 +357,7 @@
<executions>
<execution>
<id>install node and npm</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>install-node-and-npm</goal>
</goals>
Expand All @@ -380,7 +369,7 @@
</execution>
<execution>
<id>npm install</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>npm</goal>
</goals>
Expand All @@ -390,7 +379,7 @@
</execution>
<execution>
<id>npm run license-check</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>npm</goal>
</goals>
Expand All @@ -400,7 +389,7 @@
</execution>
<execution>
<id>npm run license</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>npm</goal>
</goals>
Expand All @@ -410,7 +399,7 @@
</execution>
<execution>
<id>npm run build</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>npm</goal>
</goals>
Expand All @@ -433,17 +422,20 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>../../frontend/licenses</outputDirectory>
<outputDirectory>${project.basedir}/src/main/resources/3rdPartyLicenses</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/generated-resources/xml/xslt</directory>
<directory>../../frontend/licenses</directory>
<excludes>
<exclude>attribution.*</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-frontend-resources</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
Expand All @@ -457,12 +449,23 @@
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>copy-all-resources</id>
<phase>process-resources</phase>
<id>rename-file</id>
<phase>generate-resources</phase>
<goals>
<goal>resources</goal>
<goal>rename</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/main/resources/3rdPartyLicenses/licenseInfos.json</sourceFile>
<destinationFile>${project.basedir}/src/main/resources/3rdPartyLicenses/frontend-licenses.json</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8718a80

Please sign in to comment.