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

Any pom in dependencyManagement will lead to 403 in maven company mirrors #1819

Open
bmarwell opened this issue Jul 15, 2024 · 9 comments · Fixed by #1824
Open

Any pom in dependencyManagement will lead to 403 in maven company mirrors #1819

bmarwell opened this issue Jul 15, 2024 · 9 comments · Fixed by #1824

Comments

@bmarwell
Copy link
Contributor

Hi,

I just stumbled over this odd behaviour:

  1. Liberty searches for any type=pom in dependencyManagement
  2. Any artifact found, liberty-maven-plugin will replace the artifactId with "features"
  3. It will try to download it

Source:

protected List<String> getAdditionalJsonList() {
//note in this method we use the BOM coordinate but replace the BOM artifactId
//with the features JSON artifactId which by prepare-feature convention is "features"
List<String> result = new ArrayList<String>();
org.apache.maven.model.DependencyManagement dependencyManagement = project.getDependencyManagement();
if(dependencyManagement == null) {
getLog().debug("Feature-bom is not provided by the user");
return null;
}
List<org.apache.maven.model.Dependency> dependencyManagementArtifacts = dependencyManagement.getDependencies();
for (org.apache.maven.model.Dependency dependencyArtifact: dependencyManagementArtifacts){
if (("pom").equals(dependencyArtifact.getType())) {
String coordinate = String.format("%s:%s:%s",
dependencyArtifact.getGroupId(), FEATURES_JSON_ARTIFACT_ID, dependencyArtifact.getVersion());
result.add(coordinate);
getLog().info("Additional user feature json coordinate: " + coordinate);
}
}
return result;
}

However, in a lot of company environments, this might lead to the following behaviour:

  1. The first of the known mirros/repositories might be a central mirror (probably is).
  2. liberty-m-p now tries to resolve my.company.app:features:1.0.0-SNAPSHOT from our company's mirror
  3. since my.company is not expected groupId from central, the mirror will send a 403 (because we do not want to send requests to sonar beginning with my.company, so block early)
  4. liberty-m-p will not even try to query the other repos, it seems
  5. Build will fail as the never-specified artifact my.company.app:features was not found

This is not an unlikely situation.
I like to specify all my project's modules in <dependencyManagement> and I consider it surprising behaviour for a plugin to "make up an artifact" and to fail the build if a 403 of a made-up artifact is being encountered.

I do not even see a documentation which says "for every pom we encounter in dependencyManagement, the articfactId is replaced with "features" and then reseolved". Is this really an undocumented feature?

@bmarwell
Copy link
Contributor Author

Here is an example:

[INFO] --- liberty:3.10.3:install-feature (test-start) @ app-integrationtests-openliberty ---
[INFO] Additional user feature json coordinate: my.company.app:features:4.2.4-SNAPSHOT
[INFO] Feature signature verify option: enforce
[INFO] Downloading from maven-repo-central-mirror: https://maven-repo.local/repository/maven-central/my/company/app/features/4.2.4-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata my.company.app:features:4.2.4-SNAPSHOT/maven-metadata.xml from/to maven-repo-central-mirror (https://maven-repo.local/repository/maven-central/): status code: 403, reason phrase: Routing rules block the requested item from this repository (403)
[INFO] Downloading from maven-repo-central-mirror: https://maven-repo.local/repository/maven-central/my/company/app/features/4.2.4-SNAPSHOT/features-4.2.4-SNAPSHOT.json
[INFO] --------------------------------------------------------------------------------------------------------------------------
[...]
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  12.867 s (Wall Clock)
[INFO] Finished at: 2024-07-15T10:56:53+02:00
[INFO] --------------------------------------------------------------------------------------------------------------------------
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.10.3:install-feature (test-start) on project app-integrationtests-openliberty: Execution test-start of goal io.openliberty.tools:liberty-maven-plugin:3.10.3:install-feature failed: Cannot invoke "org.eclipse.aether.resolution.ArtifactResult.getArtifact()" because "artifactResult" is null -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.10.3:install-feature (test-start) on project app-integrationtests-openliberty: Execution test-start of goal io.openliberty.tools:liberty-maven-plugin:3.10.3:install-feature failed: Cannot invoke "org.eclipse.aether.resolution.ArtifactResult.getArtifact()" because "artifactResult" is null
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:336)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:318)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:214)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:74)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
    at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute (BuildCacheMojosExecutionStrategy.java:130)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:111)
    at io.takari.maven.builder.smart.SmartBuilderImpl.buildProject (SmartBuilderImpl.java:209)
    at io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run (SmartBuilderImpl.java:81)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1595)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution test-start of goal io.openliberty.tools:liberty-maven-plugin:3.10.3:install-feature failed: Cannot invoke "org.eclipse.aether.resolution.ArtifactResult.getArtifact()" because "artifactResult" is null
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:149)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:330)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:318)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:214)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:74)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
    at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute (BuildCacheMojosExecutionStrategy.java:130)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:111)
    at io.takari.maven.builder.smart.SmartBuilderImpl.buildProject (SmartBuilderImpl.java:209)
    at io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run (SmartBuilderImpl.java:81)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1595)
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.aether.resolution.ArtifactResult.getArtifact()" because "artifactResult" is null
    at org.eclipse.aether.internal.impl.resolution.TrustedChecksumsArtifactResolverPostProcessor.doPostProcess (TrustedChecksumsArtifactResolverPostProcessor.java:123)
    at org.eclipse.aether.internal.impl.resolution.ArtifactResolverPostProcessorSupport.postProcess (ArtifactResolverPostProcessorSupport.java:50)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:454)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:261)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:243)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:278)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactFile (AbstractLibertySupport.java:602)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactItem (AbstractLibertySupport.java:570)
    at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact (AbstractLibertySupport.java:522)
    at io.openliberty.tools.maven.AbstractLibertySupport.getResolvedArtifact (AbstractLibertySupport.java:202)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:174)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:277)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:247)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact (InstallFeatureSupport.java:116)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.getAdditionalJsons (InstallFeatureUtil.java:225)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.<init> (InstallFeatureUtil.java:176)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.<init> (InstallFeatureSupport.java:69)
    at io.openliberty.tools.maven.InstallFeatureSupport.createNewInstallFeatureUtil (InstallFeatureSupport.java:244)
    at io.openliberty.tools.maven.InstallFeatureSupport.getInstallFeatureUtil (InstallFeatureSupport.java:294)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.installFeatures (InstallFeatureMojo.java:105)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.doInstallFeatures (InstallFeatureMojo.java:77)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.execute (InstallFeatureMojo.java:68)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:143)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:330)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:318)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:214)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:74)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
    at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute (BuildCacheMojosExecutionStrategy.java:130)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:111)
    at io.takari.maven.builder.smart.SmartBuilderImpl.buildProject (SmartBuilderImpl.java:209)
    at io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run (SmartBuilderImpl.java:81)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1595)
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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] 

After removing the reactor root itself from the reactor root's <dependencyManagement>, it works as expected.

@cherylking
Copy link
Member

@bmarwell Thank you for reporting this.

@jjiwooLim Sara, can you please look into this?

@bmarwell
Copy link
Contributor Author

As a workaround, we disabled the 403 on internal groupIDs in nexus. A 404 works with this plugin.

However, a blocked route is a common setup for company repositories/mirrors.

@jjiwooLim
Copy link
Contributor

Hi @bmarwell
That is not the expected behaviour. In case there's a dependency under dependencyManagement which is not a user feature, it should print a warning message :

Unable to find the following additional features JSON in the connected repositories: test.user.test.hello:features:1.0. Please ignore this warning if this is not a user feature.

and continue with the installation.

I tried setting up the Nexus repo with the routing rule and also with the access control to force return code 403. However, instead of throwing NPE, it threw a warning like expected and the build was successful.

Full stacktrace:

[WARNING] Unable to find the following additional features JSON in the connected repositories: test.user.test.hello:features:1.0. Please ignore this warning if this is not a user feature.
[DEBUG] Unable to find additional features JSON: 
io.openliberty.tools.common.plugins.util.PluginExecutionException: org.apache.maven.plugin.MojoExecutionException: Unable to resolve artifact: test.user.test.hello:features:1.0
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact (InstallFeatureSupport.java:118)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.getAdditionalJsons (InstallFeatureUtil.java:225)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.<init> (InstallFeatureUtil.java:176)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.<init> (InstallFeatureSupport.java:69)
    at io.openliberty.tools.maven.InstallFeatureSupport.createNewInstallFeatureUtil (InstallFeatureSupport.java:244)
    at io.openliberty.tools.maven.InstallFeatureSupport.getInstallFeatureUtil (InstallFeatureSupport.java:294)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.installFeatures (InstallFeatureMojo.java:105)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.doInstallFeatures (InstallFeatureMojo.java:77)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.execute (InstallFeatureMojo.java:68)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:574)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to resolve artifact: test.user.test.hello:features:1.0
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactFile (AbstractLibertySupport.java:609)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactItem (AbstractLibertySupport.java:570)
    at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact (AbstractLibertySupport.java:522)
    at io.openliberty.tools.maven.AbstractLibertySupport.getResolvedArtifact (AbstractLibertySupport.java:202)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:174)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:277)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:247)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact (InstallFeatureSupport.java:116)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.getAdditionalJsons (InstallFeatureUtil.java:225)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.<init> (InstallFeatureUtil.java:176)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.<init> (InstallFeatureSupport.java:69)
    at io.openliberty.tools.maven.InstallFeatureSupport.createNewInstallFeatureUtil (InstallFeatureSupport.java:244)
    at io.openliberty.tools.maven.InstallFeatureSupport.getInstallFeatureUtil (InstallFeatureSupport.java:294)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.installFeatures (InstallFeatureMojo.java:105)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.doInstallFeatures (InstallFeatureMojo.java:77)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.execute (InstallFeatureMojo.java:68)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:574)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: test.user.test.hello:features:json:1.0 (absent): Could not transfer artifact test.user.test.hello:features:json:1.0 from/to testRepo (http://localhost:8081/repository/maven-central/): status code: 403, reason phrase: Routing rules block the requested item from this repository (403)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:473)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:261)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:243)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:278)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactFile (AbstractLibertySupport.java:602)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactItem (AbstractLibertySupport.java:570)
    at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact (AbstractLibertySupport.java:522)
    at io.openliberty.tools.maven.AbstractLibertySupport.getResolvedArtifact (AbstractLibertySupport.java:202)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:174)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:277)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:247)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact (InstallFeatureSupport.java:116)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.getAdditionalJsons (InstallFeatureUtil.java:225)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.<init> (InstallFeatureUtil.java:176)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.<init> (InstallFeatureSupport.java:69)
    at io.openliberty.tools.maven.InstallFeatureSupport.createNewInstallFeatureUtil (InstallFeatureSupport.java:244)
    at io.openliberty.tools.maven.InstallFeatureSupport.getInstallFeatureUtil (InstallFeatureSupport.java:294)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.installFeatures (InstallFeatureMojo.java:105)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.doInstallFeatures (InstallFeatureMojo.java:77)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.execute (InstallFeatureMojo.java:68)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:574)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact test.user.test.hello:features:json:1.0 from/to testRepo (http://localhost:8081/repository/maven-central/): status code: 403, reason phrase: Routing rules block the requested item from this repository (403)
    at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed (ArtifactTransportListener.java:44)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:417)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:260)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:537)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:449)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:261)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:243)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:278)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactFile (AbstractLibertySupport.java:602)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactItem (AbstractLibertySupport.java:570)
    at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact (AbstractLibertySupport.java:522)
    at io.openliberty.tools.maven.AbstractLibertySupport.getResolvedArtifact (AbstractLibertySupport.java:202)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:174)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:277)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:247)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact (InstallFeatureSupport.java:116)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.getAdditionalJsons (InstallFeatureUtil.java:225)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.<init> (InstallFeatureUtil.java:176)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.<init> (InstallFeatureSupport.java:69)
    at io.openliberty.tools.maven.InstallFeatureSupport.createNewInstallFeatureUtil (InstallFeatureSupport.java:244)
    at io.openliberty.tools.maven.InstallFeatureSupport.getInstallFeatureUtil (InstallFeatureSupport.java:294)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.installFeatures (InstallFeatureMojo.java:105)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.doInstallFeatures (InstallFeatureMojo.java:77)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.execute (InstallFeatureMojo.java:68)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:574)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.apache.http.client.HttpResponseException: status code: 403, reason phrase: Routing rules block the requested item from this repository (403)
    at org.eclipse.aether.transport.http.HttpTransporter.handleStatus (HttpTransporter.java:619)
    at org.eclipse.aether.transport.http.HttpTransporter.execute (HttpTransporter.java:488)
    at org.eclipse.aether.transport.http.HttpTransporter.implGet (HttpTransporter.java:435)
    at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get (AbstractTransporter.java:64)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask (BasicRepositoryConnector.java:482)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:414)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:260)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:537)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:449)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:261)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:243)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:278)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactFile (AbstractLibertySupport.java:602)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactItem (AbstractLibertySupport.java:570)
    at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact (AbstractLibertySupport.java:522)
    at io.openliberty.tools.maven.AbstractLibertySupport.getResolvedArtifact (AbstractLibertySupport.java:202)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:174)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:277)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:247)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact (InstallFeatureSupport.java:116)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.getAdditionalJsons (InstallFeatureUtil.java:225)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.<init> (InstallFeatureUtil.java:176)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.<init> (InstallFeatureSupport.java:69)
    at io.openliberty.tools.maven.InstallFeatureSupport.createNewInstallFeatureUtil (InstallFeatureSupport.java:244)
    at io.openliberty.tools.maven.InstallFeatureSupport.getInstallFeatureUtil (InstallFeatureSupport.java:294)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.installFeatures (InstallFeatureMojo.java:105)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.doInstallFeatures (InstallFeatureMojo.java:77)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.execute (InstallFeatureMojo.java:68)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:574)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)

I see that our stack traces look slightly different but I am not sure where the difference comes from.

    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:414)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:260)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:537)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:449)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:261)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:243)

@bmarwell
Copy link
Contributor Author

Hi,

maybe because I do have splitRepo enabled?

    $ mvn ... -Daether.enhancedLocalRepository.split \
                 -Daether.lrm.enhanced.splitLocal \
                 -Daether.enhancedLocalRepository.splitRemoteRepository

All configuration options are here:
https://maven.apache.org/resolver/configuration.html

Intro: https://maven.apache.org/resolver/local-repository.html

Please also note I am adding a my reactor's root pom there, maybe that is a difference, too?

I am using both Maven 3.9.8 and Maven 4.0.0-beta, that might be yet another difference.

@cherylking
Copy link
Member

@jjiwooLim Is there any code change we can do to help here? I see you have not been able to recreate, right?

@rslemos
Copy link

rslemos commented Nov 14, 2024

I don't quite grasp the use case for this "additional user feature" magic (dependencyManagement -> dependency[type=pom] -> mangle artifactId to "features").

Here in my installation, for this fabricated artifact coordinates, nexus server returns HTTP 200 with an entity describing an error (go figure) and liberty-m-p doesn't have a chance to ignore it before it blows up the install-feature command.

As a workaroung I'm downgrading liberty-m-p to 3.4 (before introduction of this "additional user feature") since I don't have enough power to change the nexus server, nor the dependencyManagement at project's pom.xml.

It would be nice to have some switch to turn off this magic.

@cherylking
Copy link
Member

@jjiwooLim Please see the latest update from an external user where they are forced to down level their LMP version to avoid a "blow up" error. We need to fix this somehow.

@cherylking cherylking reopened this Nov 14, 2024
@rslemos
Copy link

rslemos commented Nov 14, 2024

Here are some excerpts from full mvn liberty:run output.

Features declared nowhere, introduced by magic

(in itself already problematic since it took me a long time to track down what those features were and where were they even mentioned, before realizing they were invented by LMP)

[INFO] Additional user feature json coordinate: net.corp.my.bridge:features:1.7.0
[INFO] Additional user feature json coordinate: net.corp.my.base:features:4.10.8
Download and validation and failure to validate (here just once for "net.corp.my.bridge:features:1.7.0")
Downloading from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/bridge/features/1.7.0/features-1.7.0.json
[WARNING] Checksum validation failed, expected '<!DOCTYPE' (REMOTE_EXTERNAL) but is actually 'f76ee75906d5ad67650add9a4d88d0a4d02f7d80' from mvnrepo for http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/bridge/features/1.7.0/features-1.7.0.json
[WARNING] Could not validate integrity of download from http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/bridge/features/1.7.0/features-1.7.0.json
org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed, expected '<!DOCTYPE' (REMOTE_EXTERNAL) but is actually 'f76ee75906d5ad67650add9a4d88d0a4d02f7d80'
    at org.eclipse.aether.connector.basic.ChecksumValidator.validateExternalChecksums (ChecksumValidator.java:179)

Earlier I said that nexus returned HTTP 200 along with an entity describing an error. Actually I cannot be 100% sure it is an HTTP 200; all I can say for sure is that the contents of ~/.m2/repository/net/corp/my/bridge/features/1.7.0/features-1.7.0.json is an HTML (starting with <!DOCTYPE html><html lang=en>) whose sha1sum is f76ee75906d5ad67650add9a4d88d0a4d02f7d80.

Wrap up and final blow up
[INFO] Resolving features...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  34.048 s
[INFO] Finished at: 2024-11-14T13:34:20-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.10.1:run (default-cli) on project myproject_service: Error installing features for server myproject_service: Unexpected char 60 at (line no=1, column no=1, offset=0) -> [Help 1]
[ERROR]
Full log
[INFO] Scanning for projects...
[INFO]
[INFO] -------< net.corp.my.sys.myproject:myproject_service >-------
[INFO] Building myproject_service 1.13.81-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ war ]---------------------------------
Downloading from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/sys/myproject/myproject_integration/1.13.81-SNAPSHOT/maven-metadata.xml
Downloaded from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/sys/myproject/myproject_integration/1.13.81-SNAPSHOT/maven-metadata.xml (813 B at 4.6 kB/s)
Downloading from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/sys/myproject/myproject_parent/1.13.81-SNAPSHOT/maven-metadata.xml
Downloaded from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/sys/myproject/myproject_parent/1.13.81-SNAPSHOT/maven-metadata.xml (633 B at 13 kB/s)
Downloading from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/view/n02/n02_empresa_view/maven-metadata.xml
Downloaded from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/view/n02/n02_empresa_view/maven-metadata.xml (670 B at 139 B/s)
[INFO]
[INFO] --- liberty:3.10.1:run (default-cli) @ myproject_service ---
[INFO] Running maven-resources-plugin:resources
[INFO] Copying 1 resource from src\main\filtered-resources to target\classes
[INFO] Copying 92 resources from src\main\resources to target\classes
[INFO] Copying 1 resource from src\main\liberty\local to target\liberty
[INFO] Copying 4 resources from infra\liberty\local to target\liberty\configDropins\overrides
[INFO] Copying 0 resource from infra\liberty\local to target\liberty
[INFO] Copying 1 resource from src\main\liberty\local to target\liberty\lib\global
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html
[INFO] Running maven-compiler-plugin:compile
[INFO] Nothing to compile - all classes are up to date
[INFO] Running liberty:create
[INFO] CWWKM2102I: Usando pre-installed assembly : C:\dev-env\wlp-runtime-24.0.0.6.
[INFO] CWWKM2102I: Usando serverName : myproject_service.
[INFO] CWWKM2102I: Usando serverDirectory : c:\dev-env\wlp-usr\servers\myproject_service.
[INFO] CWWKM2107I: O tipo de instalaþÒo Ú prÚ-existente; ignorando instalaþÒo.
[INFO] Copying 6 files to c:\dev-env\wlp-usr\servers\myproject_service
[INFO] Copying 1 file to c:\dev-env\wlp-usr\servers\myproject_service
[INFO] CWWKM2144I: Arquivo de configuraþÒo do servidor de atualizaþÒo server.xml de C:\Users\rlemo\sist-n06\myproject\fontes\myproject_service\src\main\liberty\server.xml.
[INFO] CWWKM2144I: Arquivo de configuraþÒo do servidor de atualizaþÒo bootstrap.properties de C:\Users\rlemo\sist-n06\myproject\fontes\myproject_service\target\liberty\bootstrap.properties.
[INFO] CWWKM2185I: The liberty-maven-plugin configuration parameter "appsDirectory" value defaults to "apps".
[INFO] Running liberty:install-feature
[INFO] Additional user feature json coordinate: net.corp.my.bridge:features:1.7.0
[INFO] Additional user feature json coordinate: net.corp.my.base:features:4.10.8
[INFO] Feature signature verify option: enforce
Downloading from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/io/openliberty/features/install-map/maven-metadata.xml
Downloaded from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/io/openliberty/features/install-map/maven-metadata.xml (401 B at 150 B/s)
Downloading from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/bridge/features/1.7.0/features-1.7.0.json
[WARNING] Checksum validation failed, expected '<!DOCTYPE' (REMOTE_EXTERNAL) but is actually 'f76ee75906d5ad67650add9a4d88d0a4d02f7d80' from mvnrepo for http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/bridge/features/1.7.0/features-1.7.0.json
[WARNING] Could not validate integrity of download from http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/bridge/features/1.7.0/features-1.7.0.json
org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed, expected '<!DOCTYPE' (REMOTE_EXTERNAL) but is actually 'f76ee75906d5ad67650add9a4d88d0a4d02f7d80'
    at org.eclipse.aether.connector.basic.ChecksumValidator.validateExternalChecksums (ChecksumValidator.java:179)
    at org.eclipse.aether.connector.basic.ChecksumValidator.validate (ChecksumValidator.java:109)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask (BasicRepositoryConnector.java:484)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:414)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:260)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:537)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:449)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:261)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:243)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:278)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactFile (AbstractLibertySupport.java:602)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactItem (AbstractLibertySupport.java:570)
    at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact (AbstractLibertySupport.java:522)
    at io.openliberty.tools.maven.AbstractLibertySupport.getResolvedArtifact (AbstractLibertySupport.java:202)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:174)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:277)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:247)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact (InstallFeatureSupport.java:116)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.getAdditionalJsons (InstallFeatureUtil.java:225)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.<init> (InstallFeatureUtil.java:176)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.<init> (InstallFeatureSupport.java:69)
    at io.openliberty.tools.maven.InstallFeatureSupport.createNewInstallFeatureUtil (InstallFeatureSupport.java:244)
    at io.openliberty.tools.maven.InstallFeatureSupport.getInstallFeatureUtil (InstallFeatureSupport.java:294)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.installFeatures (InstallFeatureMojo.java:105)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.doInstallFeatures (InstallFeatureMojo.java:77)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.execute (InstallFeatureMojo.java:68)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
    at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo (StartDebugMojoSupport.java:381)
    at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoInstallFeature (StartDebugMojoSupport.java:363)
    at io.openliberty.tools.maven.server.RunServerMojo.doRunServer (RunServerMojo.java:132)
    at io.openliberty.tools.maven.server.RunServerMojo.execute (RunServerMojo.java:57)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke (Method.java:508)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
[WARNING] Checksum validation failed, expected '<!DOCTYPE' (REMOTE_EXTERNAL) but is actually 'f76ee75906d5ad67650add9a4d88d0a4d02f7d80' from mvnrepo for http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/bridge/features/1.7.0/features-1.7.0.json
Downloaded from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/bridge/features/1.7.0/features-1.7.0.json (3.5 kB at 2.8 kB/s)
Downloading from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/base/features/4.10.8/features-4.10.8.json
[WARNING] Checksum validation failed, expected '<!DOCTYPE' (REMOTE_EXTERNAL) but is actually 'f76ee75906d5ad67650add9a4d88d0a4d02f7d80' from mvnrepo for http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/base/features/4.10.8/features-4.10.8.json
[WARNING] Could not validate integrity of download from http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/base/features/4.10.8/features-4.10.8.json
org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed, expected '<!DOCTYPE' (REMOTE_EXTERNAL) but is actually 'f76ee75906d5ad67650add9a4d88d0a4d02f7d80'
    at org.eclipse.aether.connector.basic.ChecksumValidator.validateExternalChecksums (ChecksumValidator.java:179)
    at org.eclipse.aether.connector.basic.ChecksumValidator.validate (ChecksumValidator.java:109)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask (BasicRepositoryConnector.java:484)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:414)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:260)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:537)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:449)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:261)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:243)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:278)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactFile (AbstractLibertySupport.java:602)
    at io.openliberty.tools.maven.AbstractLibertySupport.resolveArtifactItem (AbstractLibertySupport.java:570)
    at io.openliberty.tools.maven.AbstractLibertySupport.createArtifact (AbstractLibertySupport.java:522)
    at io.openliberty.tools.maven.AbstractLibertySupport.getResolvedArtifact (AbstractLibertySupport.java:202)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:174)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:277)
    at io.openliberty.tools.maven.AbstractLibertySupport.getArtifact (AbstractLibertySupport.java:247)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.downloadArtifact (InstallFeatureSupport.java:116)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.getAdditionalJsons (InstallFeatureUtil.java:225)
    at io.openliberty.tools.common.plugins.util.InstallFeatureUtil.<init> (InstallFeatureUtil.java:176)
    at io.openliberty.tools.maven.InstallFeatureSupport$InstallFeatureMojoUtil.<init> (InstallFeatureSupport.java:69)
    at io.openliberty.tools.maven.InstallFeatureSupport.createNewInstallFeatureUtil (InstallFeatureSupport.java:244)
    at io.openliberty.tools.maven.InstallFeatureSupport.getInstallFeatureUtil (InstallFeatureSupport.java:294)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.installFeatures (InstallFeatureMojo.java:105)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.doInstallFeatures (InstallFeatureMojo.java:77)
    at io.openliberty.tools.maven.server.InstallFeatureMojo.execute (InstallFeatureMojo.java:68)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:120)
    at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojo (StartDebugMojoSupport.java:381)
    at io.openliberty.tools.maven.server.StartDebugMojoSupport.runLibertyMojoInstallFeature (StartDebugMojoSupport.java:363)
    at io.openliberty.tools.maven.server.RunServerMojo.doRunServer (RunServerMojo.java:132)
    at io.openliberty.tools.maven.server.RunServerMojo.execute (RunServerMojo.java:57)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke (Method.java:508)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
[WARNING] Checksum validation failed, expected '<!DOCTYPE' (REMOTE_EXTERNAL) but is actually 'f76ee75906d5ad67650add9a4d88d0a4d02f7d80' from mvnrepo for http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/base/features/4.10.8/features-4.10.8.json
Downloaded from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/net/corp/my/base/features/4.10.8/features-4.10.8.json (3.5 kB at 3.0 kB/s)
[INFO] Parsing the server file for features and includes: myproject_service\configDropins/defaults/keystore.xml
[INFO] Parsing the server file for features and includes: myproject_service\/c:/dev-env/wlp-usr/servers/myproject_service/server.xml
[INFO] Parsing the server file for features and includes: myproject_service\/C:/dev-env/wlp-usr/shared/config/jdbc/ojdbc7-12.1.0.2.xml
[INFO] Parsing the server file for features and includes: myproject_service\/C:/dev-env/wlp-usr/shared/config/ltpa/ltpa.xml
[INFO] Parsing the server file for features and includes: myproject_service\/C:/dev-env/wlp-usr/shared/config/ldap/ldap.xml
[INFO] Features were included for file C:\dev-env\wlp-usr\shared\config\ldap\ldap.xml
[INFO] Parsing the server file for features and includes: myproject_service\/C:/dev-env/wlp-usr/shared/config/resenv/mycorp-resenv-2.1.0.xml
[INFO] Parsing the server file for features and includes: myproject_service\/C:/dev-env/wlp-usr/shared/config/security/keystore.xml
[INFO] Parsing the server file for features and includes: myproject_service\configDropins/overrides/httpEndpoint.xml
[INFO] plugin listed esa: []
Downloading from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/io/openliberty/features/repository-resolver/maven-metadata.xml
Downloaded from mvnrepo: http://nexus.my.corp.net:8180/nexus/repository/public/io/openliberty/features/repository-resolver/maven-metadata.xml (409 B at 581 B/s)

[INFO] Resolving features...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  34.048 s
[INFO] Finished at: 2024-11-14T13:34:20-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.10.1:run (default-cli) on project myproject_service: Error installing features for server myproject_service: Unexpected char 60 at (line no=1, column no=1, offset=0) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/MojoExecutionException

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

Successfully merging a pull request may close this issue.

4 participants