Fixes for classpath handling for scala script. #146
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When constructing class:
classpath before this patch:
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.jar
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/org/apache/maven/maven-artifact/2.0.8/maven-artifact-2.0.8.jar
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/org/apache/maven/maven-artifact/2.2.1/maven-artifact-2.2.1.jar
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/org/apache/maven/maven-artifact/3.0.4/maven-artifact-3.0.4.jar
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.jar
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/org/apache/maven/maven-core/3.0.4/maven-core-3.0.4.jar
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/classworlds/classworlds/1.1/classworlds-1.1.jar
......
classpath after this patch:
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/org/apache/maven/maven-artifact/2.2.1/maven-artifact-2.2.1.jar
[DEBUG] classpath entry for running and compiling scripts: /home/akshaal/.m2/repository/org/apache/maven/maven-core/3.0.4/maven-core-3.0.4.jar
[DEBUG] classpath entry for running and compiling scripts: /home/et1055/.m2/repository/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar
.....
Also fixes:
Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.1.6:script (default-cli) on project blahblahblah:
wrap: java.lang.Exception: A LinkageError exception was thrown: loader constraint violation: when resolving interface
method "org.apache.maven.shared.invoker.InvocationResult.getExecutionException()Lorg/codehaus/plexus/util/cli/CommandLineException;"
the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm) of the current class, CommonMavenHelper,
and the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm) for resolved class,
org/apache/maven/shared/invoker/InvocationResult, have different Class objects for the type
org/codehaus/plexus/util/cli/CommandLineException used in the signature -> [Help 1]