Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven plugin (0.15.3) fails when applied to the first version of a given artifact, ignoreNonResolvableArtifacts not honoured #288

Closed
juanpablo-santos opened this issue May 20, 2021 · 4 comments

Comments

@juanpablo-santos
Copy link

Kind of follow-up of #283, when the plugin is applied to the first version of a given artifact, it fails, no matter if the ignoreNonResolvableArtifacts plugin parameter is set to true, with the following stack trace (included relevant provided parameters in case they help to pinpoint the issue):

[DEBUG] Configuring mojo com.github.siom79.japicmp:japicmp-maven-plugin:0.15.3:cmp from plugin realm ClassRealm[plugin>com.github.siom79.japicmp:japicmp-maven-plugin:0.15.3, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@443b7951]
[DEBUG] Configuring mojo 'com.github.siom79.japicmp:japicmp-maven-plugin:0.15.3:cmp' with basic configurator -->
[...]
[DEBUG]   (f) mojoExecution = com.github.siom79.japicmp:japicmp-maven-plugin:0.15.3:cmp {execution: api-cmp}
[DEBUG]   (s) breakBuildBasedOnSemanticVersioning = true
[DEBUG]   (s) ignoreMissingClasses = true
[DEBUG]   (s) ignoreMissingOldVersion = true
[DEBUG]   (s) ignoreNonResolvableArtifacts = true
[DEBUG]   (s) binaryCompatible = false
[DEBUG]   (s) sourceCompatible = false
[DEBUG]   (s) semanticVersionLevel = PATCH
[DEBUG]   (s) skipPomModules = true
[DEBUG]   (s) skipXmlReport = true
[...]
[DEBUG]   (f) versionRangeWithProjectVersion = (,1.0.0-SNAPSHOT)
[DEBUG] -- end configuration --
[...]
[ERROR] Failed to execute goal com.github.siom79.japicmp:japicmp-maven-plugin:0.15.3:cmp (api-cmp) on project test: Could not find previous version for artifact: test:test -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.siom79.japicmp:japicmp-maven-plugin:0.15.3:cmp (api-cmp) on project test: Could not find previous version for artifact: test:test
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoFailureException: Could not find previous version for artifact: test:test
    at japicmp.maven.JApiCmpMojo.getComparisonArtifact (JApiCmpMojo.java:231)
    at japicmp.maven.JApiCmpMojo.populateArchivesListsFromParameters (JApiCmpMojo.java:297)
    at japicmp.maven.JApiCmpMojo.getOptions (JApiCmpMojo.java:417)
    at japicmp.maven.JApiCmpMojo.executeWithParameters (JApiCmpMojo.java:135)
    at japicmp.maven.JApiCmpMojo.execute (JApiCmpMojo.java:120)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
[...]

@alexbudgh
Copy link
Contributor

Regression is present even in 15.1 (was trying some older versions to see if I could work around it).

@paulthvt
Copy link

It seems that the regression has been introduced in 0.15.0. Version 0.14.4 is working well.

@davidnewcomb
Copy link

We have this problem too. I tried to fix it (before I found this issue) and came up with pretty much the same as @alexbudgh. 0.14.4 works so I've switched us down to that. I hope the report isn't too different!

@siom79 siom79 closed this as completed in 651576d Oct 6, 2021
siom79 added a commit that referenced this issue Oct 6, 2021
Fix #288: ignoreNonResolvableArtifacts not honored
@siom79
Copy link
Owner

siom79 commented Oct 6, 2021

Fixed: 0.15.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants