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 #311 from boschresearch/feature/build-license-check
Browse files Browse the repository at this point in the history
build license check
  • Loading branch information
etschelp authored Jan 12, 2021
2 parents c08c58b + 905bc0e commit a8e9b77
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 9 deletions.
60 changes: 60 additions & 0 deletions backend/business-partner-agent/licenses.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0"?>
<licenses>
<valid>
<license>
<name>The Apache Software License, Version 2.0</name>
<names>
<name>The Apache Software License, Version 2.0</name>
<name>Apache License, Version 2.0</name>
<name>Apache License 2.0</name>
<name>Apache 2.0</name>
</names>
<urls>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</urls>
</license>
<license>
<name>The MIT License</name>
<names>
<name>The MIT License</name>
<name>MIT License</name>
</names>
</license>
<license>
<name>Creative Commons</name>
<names>
<name>CC0</name>
</names>
</license>
<license>
<name>Eclipse Public License v. 2.0</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>
</names>
</license>
<license>
<name>BSD-2-Clause</name>
<names>
<name>BSD-2-Clause</name>
</names>
</license>
</valid>
<forbidden>
<license>
<name>GNU General Public License version 2</name>
<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>
60 changes: 52 additions & 8 deletions backend/business-partner-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<artifactId>micronaut-inject</artifactId>
<exclusions>
<exclusion>
<!-- incompatible license! -->
<!-- Incompatible license! -->
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
Expand Down Expand Up @@ -85,15 +85,25 @@
<version>2.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</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>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
Expand Down Expand Up @@ -141,7 +151,7 @@
<version>5.4.2</version>
</dependency>

<!-- database -->
<!-- Database -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
Expand Down Expand Up @@ -252,6 +262,31 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<!-- mvn se.ayoy.maven-plugins:ayoy-license-verifier-maven-plugin:verify -->
<plugin>
<groupId>se.ayoy.maven-plugins</groupId>
<artifactId>ayoy-license-verifier-maven-plugin</artifactId>
<version>1.2.0</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<licenseFile>${project.basedir}/licenses.xml</licenseFile>
<failOnForbidden>true</failOnForbidden>
<failOnMissing>true</failOnMissing>
<failOnUnknown>true</failOnUnknown>
<excludedScopes>
<!-- Ignore all scopes that do not distribute artifacts -->
<scope>test</scope>
<scope>provided</scope>
</excludedScopes>
</configuration>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -279,7 +314,6 @@
</executions>
<configuration>
<excludedScopes>test,provided</excludedScopes>
<excludedArtifacts>spotbugs-annotations</excludedArtifacts><!-- Not shipped -->
<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>
Expand Down Expand Up @@ -354,6 +388,16 @@
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run license-check</id>
<phase>process-resources</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run license-check</arguments>
</configuration>
</execution>
<execution>
<id>npm run license</id>
<phase>process-resources</phase>
Expand Down
4 changes: 3 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"test:unit": "vue-cli-service test:unit",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"license-check": "license-checker --production --json --onlyAllow 'MIT;Python-2.0;Apache-2.0;BSD-2-Clause;BSD-3-Clause' --excludePackages '[email protected]'",
"license": "xml-js ./licenses/third-party-report.xml --spaces 2 --compact --text-key 'text' --trim --out ./licenses/attribution.json && generate-attribution -o ./licenses"
},
"dependencies": {
Expand Down Expand Up @@ -44,7 +45,8 @@
"vue-cli-plugin-vuetify": "^2.0.7",
"vue-jest": "^3.0.7",
"vue-template-compiler": "^2.6.12",
"xml-js": "^1.6.11"
"xml-js": "^1.6.11",
"license-checker": "25.0.1"
},
"husky": {
"hooks": {
Expand Down

0 comments on commit a8e9b77

Please sign in to comment.