Comments (7)
Hi Victor,
sorry to hear about your problem. Can you give me a bit more information:
- run the maven build with -X and put the output on a gist (can be a private gist if necessary, send me the link by mail (on my github profile)).
- is petals-enforcer-rules the project you are trying to build? Or is that a dependency? I noticed that it is in SNAPSHOT, did you build that locally or did you download it (e.g. from oss snapshots)?
- do you have additional repos in your pom?
from duplicate-finder-maven-plugin.
Hi, I created a test project for it that exhibit the problem!
The only difference with my case is that the nothing is deployed to an online repository but that shouldn't be a problem to me normally since everything is available from the reactor build or in the local m2 repository.
It is here: https://wwwsecu.irit.fr/FILEX/get?k=53nVEl2KJYh57vj1bPl
The bug appears when calling mvn clean install in the root of the multi-modules project.
You can also directly install test-plugin-dep with mvn clean install and then try again at the root to do a mvn clean install.
In both case it fails with this error:
[INFO] --- duplicate-finder-maven-plugin:1.1.0:check (default) @ test-failing-project ---
[DEBUG] Configuring mojo org.basepom.maven:duplicate-finder-maven-plugin:1.1.0:check from plugin realm ClassRealm[plugin>org.basepom.maven:duplicate-finder-maven-plugin:1.1.0, parent: sun.misc.Launcher$AppClassLoader@626287d3]
[DEBUG] Configuring mojo 'org.basepom.maven:duplicate-finder-maven-plugin:1.1.0:check' with basic configurator -->
[DEBUG] (f) checkCompileClasspath = true
[DEBUG] (f) checkRuntimeClasspath = true
[DEBUG] (f) checkTestClasspath = true
[DEBUG] (f) conflictingDependencies = []
[DEBUG] (f) failBuildInCaseOfConflict = false
[DEBUG] (f) failBuildInCaseOfDifferentContentConflict = true
[DEBUG] (f) failBuildInCaseOfEqualContentConflict = false
[DEBUG] (s) ignoredDependencies = []
[DEBUG] (f) preferLocal = true
[DEBUG] (f) printEqualFiles = false
[DEBUG] (f) quiet = false
[DEBUG] (f) resultFile = /home/victor/code/test-rootbuilder/test-failing-project/target/duplicate-finder-result.xml
[DEBUG] (f) resultFileMinClasspathCount = 2
[DEBUG] (f) skip = false
[DEBUG] (f) useDefaultResourceIgnoreList = true
[DEBUG] (f) useResultFile = true
[DEBUG] (f) project = MavenProject: test:test-failing-project:0.0.1-SNAPSHOT @ /home/victor/code/test-rootbuilder/test-failing-project/pom.xml
[DEBUG] -- end configuration --
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] test-plugin-dep .................................... SUCCESS [ 1.583 s]
[INFO] test-parent ........................................ SUCCESS [ 0.215 s]
[INFO] test-failing-project ............................... FAILURE [ 0.163 s]
[INFO] test-rootbuilder ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.166 s
[INFO] Finished at: 2015-01-10T14:11:00+01:00
[INFO] Final Memory: 12M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.basepom.maven:duplicate-finder-maven-plugin:1.1.0:check (default) on project test-failing-project: Execution default of goal org.basepom.maven:duplicate-finder-maven-plugin:1.1.0:check failed: Found project reference to test:test-plugin-dep:jar:0.0.1-SNAPSHOT but no repo reference! -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.basepom.maven:duplicate-finder-maven-plugin:1.1.0:check (default) on project test-failing-project: Execution default of goal org.basepom.maven:duplicate-finder-maven-plugin:1.1.0:check failed: Found project reference to test:test-plugin-dep:jar:0.0.1-SNAPSHOT but no repo reference!
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.basepom.maven:duplicate-finder-maven-plugin:1.1.0:check failed: Found project reference to test:test-plugin-dep:jar:0.0.1-SNAPSHOT but no repo reference!
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.IllegalStateException: Found project reference to test:test-plugin-dep:jar:0.0.1-SNAPSHOT but no repo reference!
at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
at org.basepom.mojo.duplicatefinder.artifact.ArtifactFileResolver.<init>(ArtifactFileResolver.java:87)
at org.basepom.mojo.duplicatefinder.DuplicateFinderMojo.execute(DuplicateFinderMojo.java:300)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :test-failing-project
I have no extra repositories in my settings.xml neither.
from duplicate-finder-maven-plugin.
thanks, I will take a look
from duplicate-finder-maven-plugin.
Ok, I see what is going on. The failing dependency is not a project dependency but hides inside a plugin (in this case, the compiler plugin). Not sure what do to here. The plugin must either ignore the dependency (bad, because you may end up compiling against something that is duplicate) or find the location.
from duplicate-finder-maven-plugin.
Normally the various classpaths (compile, runtime, etc...) of the project,
against which the user classes are compiled, does not include the plugins'
classpaths, so you can ignore safely this dependency I think!
But it is true that the plugin will see both this dependency and the
compile dependency of the project... But that's another concern.
Le 18 janv. 2015 04:49, "Henning Schmiedehausen" [email protected]
a Γ©crit :
Ok, I see what is going on. The failing dependency is not a project
dependency but hides inside a plugin (in this case, the compiler plugin).
Not sure what do to here. The plugin must either ignore the dependency
(bad, because you may end up compiling against something that is duplicate)
or find the location.β
Reply to this email directly or view it on GitHub
#9 (comment)
.
from duplicate-finder-maven-plugin.
Yes, that is the problem. :-) A project referenced from a plugin classpath is added to the project.getProjectReferences()
map even though it is not actually on the project classpath.
from duplicate-finder-maven-plugin.
Fixed in 943ecef, will be released in 1.1.1.
from duplicate-finder-maven-plugin.
Related Issues (20)
- Exception thrown for classes where package name directory contains '.' HOT 4
- Ignore Java 9's module-info classes by default HOT 4
- SonarQube integration HOT 1
- Ignore /META-INF/versions/9/module-info.class by default HOT 6
- java.lang.IllegalArgumentException: value already present HOT 4
- Potential security vulnerability with a dependency: CVE-2018-10237.
- Potential security vulnerability with a dependency: CVE-2017-1000487.
- Display dependency paths of conflicting artifacts HOT 1
- post JDK 8 work
- Provide reporting target HOT 1
- Does the plugin work with Kotlin? HOT 3
- Allow specifying only groupId for conflictingDependencies
- Find modules/classpath duplicates for JDK11
- doesn't seem to work with mvnd
- Replace/remove slf4j-log4j12 HOT 2
- Can I check classes with the same class name in one project? HOT 1
- externalize exceptions
- Unable to find dependency for this plugin HOT 1
- conflictState="content-different"
- Update guava version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duplicate-finder-maven-plugin.