Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-6305

Kogito Spring Boot Maven Archetype tests cannot resolve productized versions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • None
    • 1.11.0.Final
    • Core Engine
    • None
    • False
    • False
    • 3

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              mmacik@redhat.com Marian Macik
              mmacik@redhat.com Marian Macik
              Ricardo Zanini Fernandes Ricardo Zanini Fernandes
              Ricardo Zanini Fernandes Ricardo Zanini Fernandes
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: