From 425211b66ab3fe026c7daba746eb3cf2abb9d049 Mon Sep 17 00:00:00 2001 From: Florent Biville Date: Mon, 19 Feb 2024 17:52:34 +0100 Subject: [PATCH] Give a way to skip license checks for people outside Neo4j --- README.md | 28 +++++++++++++++ pom.xml | 100 +++++++++++++++++++++++++++++++----------------------- 2 files changed, 86 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 13f75d8..48f11a2 100644 --- a/README.md +++ b/README.md @@ -68,3 +68,31 @@ class GettingStarted { - Maven - JDK 21 (21 is used for tests, 11 for production sources) + +## Contributing + +If you do not have access to the `build-resources` dependency of the licensing plugin, the build will fail as follows: + +```shell +Execution check-licenses of goal com.mycila:license-maven-plugin:4.3:check failed: Plugin com.mycila:license-maven-plugin:4.3 or one of its dependencies could not be resolved: Failed to collect dependencies at com.mycila:license-maven-plugin:jar:4.3 -> org.neo4j.connectors:build-resources:jar:1.0.0: Failed to read artifact descriptor for org.neo4j.connectors:build-resources:jar:1.0.0: The following artifacts could not be resolved: org.neo4j.connectors:build-resources:pom:1.0.0 (absent): Could not transfer artifact org.neo4j.connectors:build-resources:pom:1.0.0 from/to github (https://maven.pkg.github.com/neo4j/connectors-build-resources): status code: 401, reason phrase: Unauthorized (401) +``` + +### Working for Neo4j +Make sure to add the right server entry to your own `~/.m2/settings.xml`: + +```xml + + + github + USERNAME + PASSWORD_OR_TOKEN + + +``` + +### Working outside Neo4j +You will have to build the project by disabling the licensing profile with `-P'!licensing'`, as in the following example: + +```shell +mvn verify -P'!licensing' +``` diff --git a/pom.xml b/pom.xml index 2053557..df465d1 100644 --- a/pom.xml +++ b/pom.xml @@ -109,12 +109,6 @@ test - - - github - https://maven.pkg.github.com/neo4j/connectors-build-resources - - @@ -219,42 +213,64 @@ - - com.mycila - license-maven-plugin - 4.3 - - true - - -
/headers/ASL-2-header.txt
- - src/**/*.kt - src/**/*.java - -
-
- - SLASHSTAR_STYLE - -
- - - org.neo4j.connectors - build-resources - 1.0.0 - - - - - check-licenses - - check - - compile - - -
+ + + + licensing + + true + + + + github + https://maven.pkg.github.com/neo4j/connectors-build-resources + + + + + + com.mycila + license-maven-plugin + 4.3 + + true + + +
/headers/ASL-2-header.txt
+ + src/**/*.kt + src/**/*.java + +
+
+ + SLASHSTAR_STYLE + +
+ + + org.neo4j.connectors + build-resources + 1.0.0 + + + + + check-licenses + + check + + compile + + +
+
+
+
+ + external + +