diff --git a/license_sh/runners/maven/__init__.py b/license_sh/runners/maven/__init__.py
index e8a8219..623ce43 100644
--- a/license_sh/runners/maven/__init__.py
+++ b/license_sh/runners/maven/__init__.py
@@ -17,18 +17,12 @@
from license_sh.runners.abstract_runner import AbstractRunner
from license_sh.runners.runners_shared import check_maven
-DEPENDENCY_JAR = path.join(
- Path(__file__).parent,
- "..",
- "..",
- "..",
- "jar",
- "maven-dependency-plugin-3.1.1-Licensesh.jar",
-)
+DEPENDENCY_JAR = "maven-dependency-plugin-3.1.3-Licensesh.jar"
GROUP_ID = "org.apache.maven.plugins"
ARTIFACT_ID = "maven-dependency-plugin"
-VERSION = "3.1.1-Licensesh"
+VERSION = "3.1.3-Licensesh"
MULTI_LICENSE_JOIN = " AND "
+SKIP_TEST_SCOPE = True
def get_dependency_tree_xml(directory: str, debug=False):
@@ -42,9 +36,9 @@ def get_dependency_tree_xml(directory: str, debug=False):
"""
with resources.path(maven, "pom.xml") as maven_path:
- subprocess.run(["mvn", "install", f"-f={maven_path}"], capture_output=not debug)
+ subprocess.run(["mvn", "install", f"-f={maven_path}", "-Drat.skip=true"], capture_output=not debug)
- with resources.path(maven, "maven-dependency-plugin-3.1.1-Licensesh.jar") as maven_path:
+ with resources.path(maven, DEPENDENCY_JAR) as maven_path:
subprocess.run(
[
"mvn",
@@ -186,6 +180,8 @@ def parse_dependency_xml(xml, parent: AnyNode = None) -> AnyNode:
if xml is None:
return None
+ if xml.get('scope', '') == 'test' and SKIP_TEST_SCOPE:
+ return None
root = AnyNode(name=xml.tag, version=xml.get("version"), parent=parent)
for dependency in xml:
parse_dependency_xml(dependency, root)
diff --git a/license_sh/runners/maven/maven-dependency-plugin-3.1.1-Licensesh.jar b/license_sh/runners/maven/maven-dependency-plugin-3.1.1-Licensesh.jar
deleted file mode 100644
index 0109d3c..0000000
Binary files a/license_sh/runners/maven/maven-dependency-plugin-3.1.1-Licensesh.jar and /dev/null differ
diff --git a/license_sh/runners/maven/maven-dependency-plugin-3.1.3-Licensesh.jar b/license_sh/runners/maven/maven-dependency-plugin-3.1.3-Licensesh.jar
new file mode 100644
index 0000000..da74403
Binary files /dev/null and b/license_sh/runners/maven/maven-dependency-plugin-3.1.3-Licensesh.jar differ
diff --git a/license_sh/runners/maven/pom.xml b/license_sh/runners/maven/pom.xml
index 54fcae9..159a987 100644
--- a/license_sh/runners/maven/pom.xml
+++ b/license_sh/runners/maven/pom.xml
@@ -1,4 +1,4 @@
-
+
-
- org.apache.maven
- maven-compat
- ${mavenVersion}
- test
-
-
+
org.apache.maven
maven-artifact
@@ -130,7 +126,17 @@ under the License.
maven-repository-metadata
${mavenVersion}
-
+
+ org.apache.maven
+ maven-settings
+ ${mavenVersion}
+
+
+ org.apache.maven
+ maven-aether-provider
+ ${mavenVersion}
+
+
org.apache.maven.reporting
@@ -140,7 +146,7 @@ under the License.
org.apache.maven.reporting
maven-reporting-impl
- 2.3
+ 3.0.0
maven-artifact-manager
@@ -163,7 +169,7 @@ under the License.
commons-io
commons-io
- 2.5
+ 2.6
@@ -174,43 +180,37 @@ under the License.
org.apache.maven.doxia
- doxia-site-renderer
+ doxia-core
${doxiaVersion}
+
+ org.apache.maven.doxia
+ doxia-site-renderer
+ ${doxiaSiteVersion}
+
org.codehaus.plexus
plexus-archiver
- 4.1.0
+ 4.2.2
org.codehaus.plexus
plexus-utils
- 3.2.0
-
-
- org.apache.maven.shared
- file-management
- 3.0.0
-
-
- maven-artifact-manager
- org.apache.maven
-
-
+ 3.3.0
org.codehaus.plexus
plexus-io
- 3.1.0
+ 3.2.0
org.apache.maven.shared
maven-dependency-analyzer
- 1.11.1
+ 1.11.3
maven-project
@@ -236,19 +236,19 @@ under the License.
org.apache.maven.shared
maven-shared-utils
- 3.2.1
+ 3.3.3
- commons-lang
- commons-lang
- 2.6
+ org.apache.commons
+ commons-lang3
+ 3.8.1
- commons-collections
- commons-collections
- 3.2.2
+ org.apache.commons
+ commons-collections4
+ 4.2
@@ -262,199 +262,29 @@ under the License.
org.apache.maven.plugin-tools
maven-plugin-annotations
-
-
+
- junit
- junit
- 4.11
- test
+ org.eclipse.aether
+ aether-api
+ 0.9.0.M2
- org.apache.maven.plugin-testing
- maven-plugin-testing-tools
- ${pluginTestingVersion}
- test
+ org.eclipse.aether
+ aether-util
+ 0.9.0.M2
- org.apache.maven.plugin-testing
- maven-plugin-testing-harness
- ${pluginTestingVersion}
- test
-
-
- org.mockito
- mockito-core
- 2.28.2
- test
-
-
-
- org.codehaus.plexus
- plexus-interpolation
- 1.24
- test
-
-
-
- org.sonatype.aether
+ org.eclipse.aether
aether-connector-wagon
- 1.7
+ 0.9.0.M2
provided
+
org.apache.maven.wagon
wagon-http-lightweight
- 1.0-beta-6
+ 3.4.0
provided
-
-
-
-
-
-
- org.apache.rat
- apache-rat-plugin
-
-
-
- __init__.py
- src/it/projects/tree/expected.txt
- src/it/projects/tree-includes/expected.txt
- src/it/projects/tree-multimodule/expected.txt
- src/it/projects/tree-multimodule/module-a/expected.txt
- src/it/projects/tree-multimodule/module-b/expected.txt
- src/it/projects/tree-verbose/expected.txt
-
-
-
-
- org.apache.maven.plugins
- maven-plugin-plugin
- 3.5
-
-
-
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
-
-
- enforce-bytecode-version
-
- enforce
-
-
-
-
- ${maven.compiler.target}
-
- module-info
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- -Xmx384m
-
- ${maven.home}
-
-
-
-
-
-
-
-
- run-its
-
-
-
- org.apache.maven.plugins
- maven-invoker-plugin
-
-
- clean
- process-sources
-
- src/it/projects
-
- purge-local-repository-bad-pom/pom.xml
-
- tree-verbose/pom.xml
-
-
- */pom.xml
- purge-local-repository-without-pom
-
-
- src/it/mrm/settings.xml
-
- ${repository.proxy.url}
-
-
-
-
- org.codehaus.mojo
- mrm-maven-plugin
- 1.2.0
-
-
-
- start
- stop
-
-
-
-
- repository.proxy.url
-
-
- src/it/mrm/repository
-
-
-
-
-
-
-
-
-
-
- reporting
-
-
-
- org.codehaus.mojo
- l10n-maven-plugin
- 1.0-alpha-2
-
-
- de
- pt_BR
- sv
-
-
-
-
-
-
-
-
\ No newline at end of file
+