Uploaded image for project: 'Maven Remote Resources Plugin'
  1. Maven Remote Resources Plugin
  2. MRRESOURCES-123

Maven Remote Resources Plugin cannot load resource bundle from remote repository

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.1.0
    • None

    Description

      After upgrading from 1.7.0 to 3.0.0, the application is unable to download the resourceBundle from a custom remote repository which is defined in `pom.xml`. We got the following error:

       

      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-remote-resources-plugin:3.0.0:process' with basic configurator -->
      [DEBUG]   (f) appendedResourcesDirectory = /Users/myuser/workdir/projects/myservice/src/main/appended-resources
      [DEBUG]   (f) attachToMain = false
      [DEBUG]   (f) attachToTest = false
      [DEBUG]   (f) basedir = /Users/myuser/workdir/projects/myservice
      [DEBUG]   (f) encoding = UTF-8
      [DEBUG]   (f) excludeTransitive = false
      [DEBUG]   (f) includeProjectProperties = false
      [DEBUG]   (f) includeScope = runtime
      [DEBUG]   (f) localRepository =       id: local
            url: file:///Users/myuser/.m2/repository/
         layout: default
      snapshots: [enabled => true, update => always]
       releases: [enabled => true, update => always]
         blocked: false
      [DEBUG]   (f) mavenSession = org.apache.maven.execution.MavenSession@5f780a86
      [DEBUG]   (f) outputDirectory = /Users/myuser/workdir/projects/myservice/target/docker
      [DEBUG]   (f) project = MavenProject: com.mycompany.services:myservice:0.0.1-SNAPSHOT @ /Users/myuser/workdir/projects/myservice/pom.xml
      [DEBUG]   (f) remoteArtifactRepositories = [      id: artifactory
            url: https://artifactory.mycompany.com/artifactory/maven-repo/
         layout: default
      snapshots: [enabled => true, update => daily]
       releases: [enabled => true, update => daily]
         blocked: false
      ,       id: central
            url: https://repo.maven.apache.org/maven2
         layout: default
      snapshots: [enabled => false, update => daily]
       releases: [enabled => true, update => daily]
         blocked: false
      ]
      [DEBUG]   (f) resourceBundles = [com.mycompany.services:remote-template:1.0.6]
      [DEBUG]   (f) resources = [Resource {targetPath: null, filtering: false, FileSet {directory: /Users/myuser/workdir/projects/myservice/src/main/resources, PatternSet [includes: {}, excludes: {}]}}]
      [DEBUG]   (f) runOnlyAtExecutionRoot = false
      [DEBUG]   (f) skip = false
      [DEBUG]   (f) useDefaultFilterDelimiters = true
      [DEBUG]   (f) velocityFilterInMemoryThreshold = 5242880
      [DEBUG] -- end configuration --
      

       

      [INFO] Preparing remote bundle com.mycompany.services:remote-template:1.0.6
      [DEBUG] Verifying availability of /Users/myuser/.m2/repository/com/mycompany/services/remote-template/1.0.6/remote-template-1.0.6.pom from [central (https://repo.maven.apache.org/maven2, default, releases)]
      [DEBUG] Resolving artifact com.mycompany.services:remote-template:1.0.62 from [central (https://repo.maven.apache.org/maven2, default, releases)]
      [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
      [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
      Downloading from central: https://repo.maven.apache.org/maven2/com/mycompany/services/remote-template/1.0.6/remote-template-1.0.6.pom
      [DEBUG] Writing tracking file /Users/myuser/.m2/repository/com/mycompany/services/remote-template/1.0.6/remote-template-1.0.6.pom.lastUpdated
      [WARNING] The POM for com.mycompany.services:remote-template:jar:1.0.6 is missing, no dependency information available
      [DEBUG] Resolving artifact com.mycompany.services:remote-template:jar:1.0.6 from [central (https://repo.maven.apache.org/maven2, default, releases)]
      [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
      [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
      Downloading from central: https://repo.maven.apache.org/maven2/com/mycompany/services/remote-template/1.0.6/remote-template-1.0.6.jar
      [DEBUG] Writing tracking file /Users/myuser/.m2/repository/com/mycompany/services/remote-template/1.0.6/remote-template-1.0.6.jar.lastUpdated
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE 
      Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.mycompany.services:remote-template:jar:1.0.6 in central (https://repo.maven.apache.org/maven2)
          at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed (ArtifactTransportListener.java:48)
          at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:369)
          at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75)
          at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute (BasicRepositoryConnector.java:628)
          at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:262)
          at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:514)
          at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:402)
          at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:229)
          at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:207)
          at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:262)
          at org.apache.maven.shared.transfer.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact (Maven31ArtifactResolver.java:97)
          at org.apache.maven.shared.transfer.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact (Maven31ArtifactResolver.java:65)
          at org.apache.maven.shared.transfer.artifact.resolve.internal.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:55)
          at org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.downloadBundles (ProcessRemoteResourcesMojo.java:1128)
          at org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.execute (ProcessRemoteResourcesMojo.java:516)
          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)
          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:972)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          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:568)
          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)
      

       

      When i switch back to 1.7.0 everything works properly. Also another strange thing when i add <parent>...</parent> to my pom.xml then everything works and now the plugin first try load resources from custom remote repository not from central. 

      [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://artifactory.mycompany.com/artifactory/maven-repo/
      [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://artifactory.mycompany.com/artifactory/maven-repo/ 

       

       

      Attachments

        Issue Links

          Activity

            People

              sjaranowski Slawomir Jaranowski
              Mizurou Andrei Mizurou
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: