-
Bug
-
Resolution: Done
-
Major
-
None
-
False
-
False
-
NEW
-
NEW
-
Undefined
-
-
There is a Spring Boot application (based on business-application-{model,kjar,service} generated from start.jbpm.org) which contains Kie Server and also contains business-application-kjar by configuration (*1) with properties (*2). After adding a dependency to commons-beanutils (1.9.4.redhat-00002) in business-application-kjar/pom.xml like (*3) for using functions of it, an error "Could not read pom in jar" like (*e) occurs while the Spring Boot application is launching.
(*e)
[main] ERROR o.a.m.i.InJarArtifactResolver - Could not read pom in jar jar:file:/path/to/reproducer_business-application_1a/business-application-service/target/business-application-service-1.0-SNAPSHOT.jar!/BOOT-INF/classes/KIE-INF/lib/commons-beanutils-1.9.4.redhat-00002.jar!/META-INF/maven/commons-beanutils/commons-beanutils/pom.xml
When the error occurs at start-up, the Kie Server in the Spring Boot application is actually trying to look for some artifacts in local maven repository (~/.m2/repository). So, we can avoid the error (*e) by installing those artifacts in the local maven repository in advance like (*4), but originally the Spring Boot application should be able to start independently without installing artifacts in the local maven repository.
(*1) There is the following description in business-application-service/pom.xml.
<plugin>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>${version.org.kie}</version>
<executions>
<execution>
<id>copy</id>
<phase>prepare-package</phase>
<goals>
<goal>package-dependencies-kjar</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.company</groupId>
<artifactId>business-application-kjar</artifactId>
<version>1.0-SNAPSHOT</version>
</artifactItem>
</artifactItems>
</configuration>
</plugin>
(*2) There are two lines in business-application-service/src/main/resources/application-dev.properties.
kieserver.classPathContainer=true kieserver.autoScanDeployments=true
(*3) There is a dependency to commons-beanutils-1.9.4.redhat-00002.jar in business-application-kjar/pom.xml.
<dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> <version>1.9.4.redhat-00002</version> </dependency>
(*4)
.m2/repository
└── org
├── apache
│ ├── apache
│ │ └── 19.0.0.redhat-00001
│ │ ├── apache-19.0.0.redhat-00001.pom
│ │ └── apache-19.0.0.redhat-00001.pom.sha1
│ └── commons
│ └── commons-parent
│ └── 47.0.0.redhat-00001
│ ├── commons-parent-47.0.0.redhat-00001.pom
│ └── commons-parent-47.0.0.redhat-00001.pom.sha1
└── jboss
└── jboss-parent
└── 19.0.0.redhat-2
├── jboss-parent-19.0.0.redhat-2.pom
└── jboss-parent-19.0.0.redhat-2.pom.sha1
- clones
-
RHPAM-3797 Spring Boot jar containing kjar and commons-beanutils causes "Could not read pom in jar" error.
-
- Closed
-
- relates to
-
JBPM-9836 Create test case for - Spring Boot jar containing kjar and commons-beanutils causes "Could not read pom in jar" error.
-
- Open
-
-
JBPM-9860 ArtifactResolver's getAllDependecies method returns a list of dependencies unfiltered by maven resolver's standard version conflict resolution process
-
- Pull Request Sent
-