Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-4042

Kogito Spring Boot Maven Archetype tests cannot resolve productized versions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.12.0.GA
    • 7.12.0.GA
    • Kogito Core
    • None
    • 3
    • 2021 Week 46-48 (from Nov 15)

      Spring Boot archetype tests fail on productized build with:

      [2021-11-22T15:32:46.097Z] [INFO] [INFO] [ERROR] [ERROR] Some problems were encountered while processing the POMs:
      [2021-11-22T15:32:46.097Z] [INFO] [INFO] [ERROR] Unresolveable build extension: Plugin org.kie.kogito:kogito-maven-plugin:1.11.0.redhat-00011 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.kie.kogito:kogito-maven-plugin:jar:1.11.0.redhat-00011 @ 
      [2021-11-22T15:32:46.097Z] [INFO] [INFO] [FATAL] Non-resolvable parent POM for org.kie.kogito:kogito-runtimes:1.11.0.redhat-00011: Failure to find org.jboss:jboss-parent:pom:36.0.0.redhat-00001 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ org.kie.kogito:kogito-runtimes:1.11.0.redhat-00011, /home/hudson/.m2/repository/org/kie/kogito/kogito-runtimes/1.11.0.redhat-00011/kogito-runtimes-1.11.0.redhat-00011.pom, line 4, column 11
      [2021-11-22T15:32:46.097Z] [INFO] [INFO] [ERROR] 'dependencies.dependency.version' for org.kie.kogito:kogito-decisions-spring-boot-starter:jar is missing. @ line 36, column 17
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]  @ 
      [2021-11-22T15:32:46.097Z] [INFO] [INFO] [ERROR] The build could not read 1 project -> [Help 1]
      [2021-11-22T15:32:46.097Z] [INFO] [INFO] org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
      [2021-11-22T15:32:46.097Z] [INFO] [INFO] [ERROR] Unresolveable build extension: Plugin org.kie.kogito:kogito-maven-plugin:1.11.0.redhat-00011 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.kie.kogito:kogito-maven-plugin:jar:1.11.0.redhat-00011 @ 
      [2021-11-22T15:32:46.097Z] [INFO] [INFO] [FATAL] Non-resolvable parent POM for org.kie.kogito:kogito-runtimes:1.11.0.redhat-00011: Failure to find org.jboss:jboss-parent:pom:36.0.0.redhat-00001 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ org.kie.kogito:kogito-runtimes:1.11.0.redhat-00011, /home/hudson/.m2/repository/org/kie/kogito/kogito-runtimes/1.11.0.redhat-00011/kogito-runtimes-1.11.0.redhat-00011.pom, line 4, column 11
      [2021-11-22T15:32:46.097Z] [INFO] [INFO] [ERROR] 'dependencies.dependency.version' for org.kie.kogito:kogito-decisions-spring-boot-starter:jar is missing. @ line 36, column 17
      [2021-11-22T15:32:46.097Z] [INFO] [INFO] 
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:397)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.graph.DefaultGraphBuilder.collectProjects (DefaultGraphBuilder.java:414)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor (DefaultGraphBuilder.java:405)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:82)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:507)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:219)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at java.lang.reflect.Method.invoke (Method.java:566)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
      [2021-11-22T15:32:46.097Z] [INFO] [INFO]     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      

      The issue is that main Maven build settings.xml is not passed to the maven-archetype-plugin:integration-test goal. Unlike Invoker plugin, which supports this, Archetype plugin supports only no settings.xml or a provided file. This can cause issues when building without any provided settings.xml (no -s option). In this case any effort, including reference to ${session.request.userSettingsFile.path} will fail because without -s option it points to a (usually) non-existing ${user.dir}/.m2/settings.xml file. A workaround is needed which will dump the current settings to a file using the maven-help-plugin:effective-settings goal and pass this file to the archetype plugin.

              mmacik@redhat.com Marian Macik
              mmacik@redhat.com Marian Macik
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: