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

[GSS](7.1.x) kie-maven-plugin depends on community JBoss pom

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.0.2.GA
    • Build and Assembly
    • None

      It is not possible to build a KJAR with just rhpam+eap maven repositories, because it seems kie-maven-plugin of rhpam 7.0.2 depends on community jboss pom:

      example pom.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.myspace</groupId>
        <artifactId>OfflineMavenTest</artifactId>
        <version>1.0.0</version>
        <packaging>kjar</packaging>
        <name>OfflineMavenTest</name>
        <description></description>
        <dependencies>
          <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
            <version>1.4.10</version>
            <scope>test</scope>
          </dependency>
          <dependency>
            <groupId>org.kie</groupId>
            <artifactId>kie-internal</artifactId>
            <version>7.7.0.Final-redhat-10</version>
            <scope>provided</scope>
          </dependency>
          <dependency>
            <groupId>org.optaplanner</groupId>
            <artifactId>optaplanner-core</artifactId>
            <version>7.7.0.Final-redhat-10</version>
            <scope>provided</scope>
          </dependency>
          <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
          </dependency>
          <dependency>
            <groupId>org.optaplanner</groupId>
            <artifactId>optaplanner-persistence-jaxb</artifactId>
            <version>7.7.0.Final-redhat-10</version>
            <scope>provided</scope>
          </dependency>
          <dependency>
            <groupId>org.kie</groupId>
            <artifactId>kie-api</artifactId>
            <version>7.7.0.Final-redhat-10</version>
            <scope>provided</scope>
          </dependency>
        </dependencies>
        <build>
          <plugins>
            <plugin>
              <groupId>org.kie</groupId>
              <artifactId>kie-maven-plugin</artifactId>
              <version>7.7.0.Final-redhat-10</version>
              <extensions>true</extensions>
            </plugin>
          </plugins>
        </build>
      </project>
      

      example settings.xml:

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
          
        <localRepository>/Users/osiris/.m2/repository</localRepository>
        
          <profiles>
              <profile>
                  <id>jboss-ga</id>
                  <repositories>
                      <repository>
                          <id>jboss-ga-repository</id>
                          <name>JBoss GA Tech Preview Maven Repository</name>
                          <url>file:///Users/osiris/Downloads/jboss-eap-7.1.0.GA-maven-repository/maven-repository</url>
                          <layout>default</layout>
                          <releases>
                              <enabled>true</enabled>
                              <updatePolicy>never</updatePolicy>
                          </releases>
                          <snapshots>
                              <enabled>false</enabled>
                              <updatePolicy>never</updatePolicy>
                          </snapshots>
                      </repository>
                  </repositories>
                  <pluginRepositories>
                      <pluginRepository>
                          <id>jboss-ga-plugin-repository</id>
                          <name>JBoss 7 Maven Plugin Repository</name>
                          <url>file:///Users/osiris/Downloads/jboss-eap-7.1.0.GA-maven-repository/maven-repository</url>
                          <layout>default</layout>
                          <releases>
                              <enabled>true</enabled>
                              <updatePolicy>never</updatePolicy>
                          </releases>
                          <snapshots>
                              <enabled>false</enabled>
                              <updatePolicy>never</updatePolicy>
                          </snapshots>
                      </pluginRepository>
                  </pluginRepositories>
              </profile>
      
          <!-- RH PAM GA Profile -->
          <profile>
                  <id>rhpam-ga</id>
                  <repositories>
                      <repository>
                          <id>rhpam-ga-repository</id>
                          <name>RH PAM GA Tech Preview Maven Repository</name>
                          <url>file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository</url>
                          <layout>default</layout>
                          <releases>
                              <enabled>true</enabled>
                              <updatePolicy>never</updatePolicy>
                          </releases>
                          <snapshots>
                              <enabled>false</enabled>
                              <updatePolicy>never</updatePolicy>
                          </snapshots>
                      </repository>
                  </repositories>
                  <pluginRepositories>
                      <pluginRepository>
                          <id>rhpam-ga-plugin-repository</id>
                          <name>RH PAM 7 Maven Plugin Repository</name>
                          <url>file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository</url>
                          <layout>default</layout>
                          <releases>
                              <enabled>true</enabled>
                              <updatePolicy>never</updatePolicy>
                          </releases>
                          <snapshots>
                              <enabled>false</enabled>
                              <updatePolicy>never</updatePolicy>
                          </snapshots>
                      </pluginRepository>
                  </pluginRepositories>
              </profile>
          <!-- RH PAM GA Profile -->
          </profiles>
          
          <activeProfiles>
              <activeProfile>jboss-ga</activeProfile>
          <activeProfile>rhpam-ga</activeProfile>
          </activeProfiles>
      </settings>
      

      maven output:

      ✗ mvn clean install
      [INFO] Scanning for projects...
      Downloading from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/kie/kie-maven-plugin/7.7.0.Final-redhat-10/kie-maven-plugin-7.7.0.Final-redhat-10.pom
      Downloaded from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/kie/kie-maven-plugin/7.7.0.Final-redhat-10/kie-maven-plugin-7.7.0.Final-redhat-10.pom (7.6 kB at 239 kB/s)
      Downloading from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/drools/droolsjbpm-integration/7.7.0.Final-redhat-10/droolsjbpm-integration-7.7.0.Final-redhat-10.pom
      Downloaded from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/drools/droolsjbpm-integration/7.7.0.Final-redhat-10/droolsjbpm-integration-7.7.0.Final-redhat-10.pom (5.7 kB at 1.4 MB/s)
      Downloading from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/kie/kie-parent/7.7.0.Final-redhat-10/kie-parent-7.7.0.Final-redhat-10.pom
      Downloaded from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/kie/kie-parent/7.7.0.Final-redhat-10/kie-parent-7.7.0.Final-redhat-10.pom (111 kB at 8.0 MB/s)
      Downloading from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/jboss/integration-platform/jboss-integration-platform-bom/8.0.0.CR3-redhat-2/jboss-integration-platform-bom-8.0.0.CR3-redhat-2.pom
      Downloaded from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/jboss/integration-platform/jboss-integration-platform-bom/8.0.0.CR3-redhat-2/jboss-integration-platform-bom-8.0.0.CR3-redhat-2.pom (118 kB at 9.8 MB/s)
      Downloading from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/jboss/integration-platform/jboss-integration-platform-parent/8.0.0.CR3-redhat-2/jboss-integration-platform-parent-8.0.0.CR3-redhat-2.pom
      Downloaded from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/jboss/integration-platform/jboss-integration-platform-parent/8.0.0.CR3-redhat-2/jboss-integration-platform-parent-8.0.0.CR3-redhat-2.pom (28 kB at 5.5 MB/s)
      Downloading from rhpam-ga-plugin-repository: file:///Users/osiris/Downloads/rhpam-7.0.2-maven-repository/maven-repository/org/jboss/jboss-parent/25/jboss-parent-25.pom
      Downloading from jboss-ga-plugin-repository: file:///Users/osiris/Downloads/jboss-eap-7.1.0.GA-maven-repository/maven-repository/org/jboss/jboss-parent/25/jboss-parent-25.pom
      Downloading from central: https://repo.maven.apache.org/maven2/org/jboss/jboss-parent/25/jboss-parent-25.pom
      [ERROR] [ERROR] Some problems were encountered while processing the POMs:
      [ERROR] Unresolveable build extension: Plugin org.kie:kie-maven-plugin:7.7.0.Final-redhat-10 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.kie:kie-maven-plugin:jar:7.7.0.Final-redhat-10 @
      [ERROR] Unknown packaging: kjar @ line 8, column 14
       @
      [ERROR] The build could not read 1 project -> [Help 1]
      [ERROR]
      [ERROR]   The project com.myspace:OfflineMavenTest:1.0.0 (/Users/osiris/Documents/work/jboss-playground/702-rhpam7-eap712-psql/business-central/bin/.niogit/MySpace/OfflineMavenTest/pom.xml) has 2 errors
      [ERROR]     Unresolveable build extension: Plugin org.kie:kie-maven-plugin:7.7.0.Final-redhat-10 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.kie:kie-maven-plugin:jar:7.7.0.Final-redhat-10: Could not transfer artifact org.jboss:jboss-parent:pom:25 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: nodename nor servname provided, or not known: Unknown host repo.maven.apache.org: nodename nor servname provided, or not known -> [Help 2]
      [ERROR]     Unknown packaging: kjar @ line 8, column 14
      [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/ProjectBuildingException
      [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
      
      

      Adding 7.1.3 EAP maven repo doesn't help. Our kie-maven-plugin depends on:
      org.jboss:jboss-parent:pom:25

      While 7.1.3 EAP includes version jboss-parent-25.0.0.redhat-1

      Please make sure kie-maven-plugin imports productized dependencies only (and not community)

      Impact: This issue doesn't allow offline builds, because jboss-parent:pom:25 is available only in maven central and not in the zipped EAP maven repositories which we ship via Customer Portal

              ant@redhat.com Ant Stephenson
              rhn-support-agiertli Anton Giertli
              Martin Cimbalek Martin Cimbalek (Inactive)
              Martin Cimbalek Martin Cimbalek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: