Skip to content

Commit

Permalink
Merge pull request #389 from finos/stanford-nlp-scope
Browse files Browse the repository at this point in the history
Stanford nlp scope
  • Loading branch information
robmoffat committed Apr 19, 2023
2 parents f026737 + a22c517 commit d6de9c9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/acceptable-licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@
<name>Universal Permissive License, Version 1.0</name>
<name>W3C license</name>
<name>jQuery license</name>
<name>MIT</name>
<name>MIT</name>
<name>MIT-0</name>
5 changes: 3 additions & 2 deletions .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ jobs:
- name: Build
run: mvn install -DskipTests
- name: License XML report
run: mvn org.codehaus.mojo:license-maven-plugin:2.0.0:download-licenses
run: |
mvn org.codehaus.mojo:license-maven-plugin:2.0.0:download-licenses -Dlicense.excludedScopes=system,provided -DlicensesConfigFile=.github/workflows/licenses-config-file.xml
- name: Validate XML report
run: |
ALLOW_LICENSES=`cat .github/workflows/acceptable-licenses.txt | sed "s|<name>|name='|" | sed "s|</name>|' |" | tr -s '\n' '~' | sed 's/\~/or /g' `
find . -name licenses.xml -exec xq "//dependency[count(licenses/license[${ALLOW_LICENSES}])=0]" {} \; > target/license-issues.xml
find . -name licenses.xml -exec xq "//dependency[count(licenses/license[${ALLOW_LICENSES}])=0]" {} \; > target/license-issues.xml
LINES_FOUND=`cat target/license-issues.xml | grep "<result>" | wc -l`
if [ $LINES_FOUND -gt 0 ]; then cat target/license-issues.xml ; exit -1; fi
- name: Upload license XML Issues
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/licenses-config-file.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- Checkout docs on https://www.mojohaus.org/license-maven-plugin/download-licenses-mojo.html#licensesConfigFile -->
<licenseSummary>
<dependencies>
<dependency>
<groupId>\Qorg.openapitool\E</groupId>
<artifactId>\Qjackson-databind-nullable\E</artifactId>
<matchLicenses>
<!-- Match an empty list of licenses -->
</matchLicenses>
<licenses>
<license>
<name>Apache 2.0</name>
<url>https://github.com/OpenAPITools/jackson-databind-nullable/blob/master/LICENSE</url>
</license>
</licenses>
</dependency>
</dependencies>
</licenseSummary>
3 changes: 3 additions & 0 deletions tools/reminder-bot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,21 @@
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>${corenlp.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>${corenlp.version}</version>
<classifier>models</classifier>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>edu.washington.cs.knowitall.stanford-corenlp</groupId>
<artifactId>stanford-sutime-models</artifactId>
<version>${sutime-models.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down

0 comments on commit d6de9c9

Please sign in to comment.