karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (Jira) <j...@apache.org>
Subject [jira] [Commented] (KARAF-6536) StackOverflowError in karaf-maven-plugin:verify when referencing feature which uses version ranges
Date Sun, 05 Jan 2020 10:31:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17008294#comment-17008294
] 

Jean-Baptiste Onofré commented on KARAF-6536:
---------------------------------------------

I'm not able to reproduce on your test case. Here's what I did:
{code:java}
test-features$ mvn clean install -Prange
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< com.test:test-features >-----------------------
[INFO] Building test-features 1.0-SNAPSHOT
[INFO] ------------------------------[ feature ]-------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ test-features ---
[INFO] 
[INFO] --- karaf-maven-plugin:4.2.7:features-generate-descriptor (default-features-generate-descriptor)
@ test-features ---
[INFO] Generation not enabled
[INFO] Attaching artifact
[INFO] 
[INFO] --- karaf-maven-plugin:4.2.7:verify (default-verify) @ test-features ---
[INFO] Using repositories: https://repo.maven.apache.org/maven2@id=central
[WARNING] Matched URI can't use version ranges: mvn:org.apache.karaf.features/standard/[4,5)/xml/features
[INFO] Verification of feature test/1.0.0.SNAPSHOT succeeded
[INFO] Features verified: 1, failures: 0, ignored: 0, skipped: 0
[INFO] 
[INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) @ test-features ---
[INFO] Installing /home/jbonofre/test/test-features/target/feature/feature.xml to /home/jbonofre/.m2/repository/com/test/test-features/1.0-SNAPSHOT/test-features-1.0-SNAPSHOT-features.xml
[INFO] Installing /home/jbonofre/test/test-features/pom.xml to /home/jbonofre/.m2/repository/com/test/test-features/1.0-SNAPSHOT/test-features-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.362 s
[INFO] Finished at: 2020-01-05T11:28:17+01:00
[INFO] ------------------------------------------------------------------------
{code}
So I can see the WARNING with the "Matched URI", but it works.

I think it works if the local repository is populated. Let me try with an empty repo.

> StackOverflowError in karaf-maven-plugin:verify when referencing feature which uses version
ranges
> --------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-6536
>                 URL: https://issues.apache.org/jira/browse/KARAF-6536
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.7
>            Reporter: Donnie McMahan
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 4.3.0, 4.2.8
>
>         Attachments: test-features.zip
>
>
> When running karaf-maven-plugin:verify on a feature which references the aries-jax-rs
feature, I'm getting a StackOverflowException:
> {code:java}
> Exception in thread "main" java.lang.StackOverflowError
> 	at org.osgi.framework.Version.toString(Version.java:308)
> 	at org.apache.felix.utils.resource.SimpleFilter.convert(SimpleFilter.java:532)
> 	at org.apache.felix.utils.resource.RequirementImpl.getFilter(RequirementImpl.java:133)
> 	at org.apache.felix.utils.resource.RequirementImpl.<init>(RequirementImpl.java:77)
> 	at org.apache.felix.utils.resource.RequirementImpl.<init>(RequirementImpl.java:44)
> 	at org.apache.karaf.features.internal.resolver.ResourceUtils.addIdentityRequirement(ResourceUtils.java:127)
> 	at org.apache.karaf.features.internal.resolver.ResourceUtils.addIdentityRequirement(ResourceUtils.java:107)
> 	at org.apache.karaf.features.internal.resolver.ResourceUtils.addIdentityRequirement(ResourceUtils.java:99)
> 	at org.apache.karaf.features.internal.region.Subsystem.requireFeature(Subsystem.java:284)
> 	at org.apache.karaf.features.internal.region.Subsystem.doBuild(Subsystem.java:350)
> 	at org.apache.karaf.features.internal.region.Subsystem.build(Subsystem.java:332)
> 	at org.apache.karaf.features.internal.region.Subsystem.doBuild(Subsystem.java:390)
> 	at org.apache.karaf.features.internal.region.Subsystem.build(Subsystem.java:332)
> 	at org.apache.karaf.features.internal.region.Subsystem.doBuild(Subsystem.java:390)
> 	at org.apache.karaf.features.internal.region.Subsystem.build(Subsystem.java:332)
> ...
> {code}
> The issue seems to be related to the use of version ranges in the aries-jax-rs feature:
> {code:xml|title=https://github.com/apache/aries-jax-rs-whiteboard/blob/org.apache.aries.jax.rs-1.0.6/jax-rs.features/src/main/feature/feature.xml}
> ...
> <repository>mvn:org.apache.karaf.features/standard/[4,5)/xml/features</repository>
> ...
> {code}
> I've attached a simple project which illustrates the issue. The verify goal completes
successfully using the "norange" profile but fails when using the "range" profile.
> Is there a workaround for this?
> Thanks in advance!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message