You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by matthjes <ma...@gmail.com> on 2015/01/30 21:57:22 UTC

Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Hi,

I'm trying to create a custom karaf distribution having ipojo supported by
default. So I added the respective dependency (I'm using the karaf-assembly
archetype):

<dependency>
  <groupId>org.apache.felix</groupId>
  <artifactId>org.apache.felix.ipojo.features</artifactId>
  <version>1.12.1</version>
  <type>xml</type>
  <scope>runtime</scope>
</dependency>

Furthermore, I added the ipojo feature to the bootFeatures:

<bootFeatures>
  <feature>standard</feature>
  <feature>management</feature>
  <feature>ipojo</feature>
</bootFeatures>

However, install-kars completely ignores this dependency and then throws an
error that the feature ipojo could not be found:

[INFO] --- karaf-maven-plugin:3.0.2:install-kars (default-install-kars) @
pcbnxt-karaf-distribution ---
[INFO] Creating system directory
[INFO] Creating startup.properties
[INFO] Loading kar and features repositories dependencies with compile or
runtime scopes
[INFO] The startup.properties file is updated using kar and features
dependency with a scope different from runtime, or defined in the
<startupFeatures/> plugin configuration
[INFO] Extracting org.apache.karaf.features:framework:kar:3.0.2:compile kar
[INFO] Resolving
/C:/Users/mj/Development/Workspace/Java/pcbnxt/pcbnxt-karaf-distribution/target/assembly/system/org/apache/karaf/features/framework/3.0.2/framework-3.0.2-features.xml
features repository
[INFO] Resolving
org.apache.karaf.features:standard:xml:features:3.0.2:runtime features
repository
[INFO] Resolving mvn:org.apache.karaf.features/standard/3.0.2/xml/features
features repository
[INFO] Resolving mvn:org.ops4j.pax.web/pax-web-features/3.1.2/xml/features
features repository
[INFO] Checking features resolution
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.504 s
[INFO] Finished at: 2015-01-30T21:51:30+01:00
[INFO] Final Memory: 19M/224M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.karaf.tooling:karaf-maven-plugin:3.0.2:install-kars
(default-install-kars) on project pcbnxt-karaf-distribution: Feature ipojo
is not resolved. Check that <dependencies/> provide the kar of features
repository providing this feature (with compile or runtime scope) -> [Help
1]

I have no idea why it just ignores this dependency...



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Posted by Achim Nierbeck <bc...@googlemail.com>.
For opening issues for Apache Products please use the Apache JIRA [1].

regards, Achim

[1] -
https://issues.apache.org/jira/browse/KARAF/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel

2015-01-31 21:19 GMT+01:00 matthjes <ma...@gmail.com>:

> Hi,
>
> Thanks for the help. Could this maybe added to the archetype? I've looked
> at
> the github page, but I could not find a way to open an issue there...
>
>
> jbonofre wrote
> > As you can see, the equinox region artifact is not on Central but on
> > ServiceMix M2 repo:
> >
> >
> http://svn.apache.org/repos/asf/servicemix/m2-repo/org/eclipse/equinox/region/1.0.0.v20110506/
> >
> > So, both your
> > <repository/>
> >  for the plugins MOJO and the
> > etc/org.ops4j.pax.url.mvn.cfg repositories section in the Karaf runtime
> > have to contain the repo:
> >
> > http://svn.apache.org/repos/asf/servicemix/m2-repo
> >
> > Regards
> > JB
>
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145p4038172.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Yes, I will add to the archetype.

Regards
JB

On 01/31/2015 09:19 PM, matthjes wrote:
> Hi,
>
> Thanks for the help. Could this maybe added to the archetype? I've looked at
> the github page, but I could not find a way to open an issue there...
>
>
> jbonofre wrote
>> As you can see, the equinox region artifact is not on Central but on
>> ServiceMix M2 repo:
>>
>> http://svn.apache.org/repos/asf/servicemix/m2-repo/org/eclipse/equinox/region/1.0.0.v20110506/
>>
>> So, both your
>> <repository/>
>>   for the plugins MOJO and the
>> etc/org.ops4j.pax.url.mvn.cfg repositories section in the Karaf runtime
>> have to contain the repo:
>>
>> http://svn.apache.org/repos/asf/servicemix/m2-repo
>>
>> Regards
>> JB
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145p4038172.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Posted by matthjes <ma...@gmail.com>.
Hi,

Thanks for the help. Could this maybe added to the archetype? I've looked at
the github page, but I could not find a way to open an issue there...


jbonofre wrote
> As you can see, the equinox region artifact is not on Central but on 
> ServiceMix M2 repo:
> 
> http://svn.apache.org/repos/asf/servicemix/m2-repo/org/eclipse/equinox/region/1.0.0.v20110506/
> 
> So, both your 
> <repository/>
>  for the plugins MOJO and the 
> etc/org.ops4j.pax.url.mvn.cfg repositories section in the Karaf runtime 
> have to contain the repo:
> 
> http://svn.apache.org/repos/asf/servicemix/m2-repo
> 
> Regards
> JB





--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145p4038172.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
As you can see, the equinox region artifact is not on Central but on 
ServiceMix M2 repo:

http://svn.apache.org/repos/asf/servicemix/m2-repo/org/eclipse/equinox/region/1.0.0.v20110506/

So, both your <repository/> for the plugins MOJO and the 
etc/org.ops4j.pax.url.mvn.cfg repositories section in the Karaf runtime 
have to contain the repo:

http://svn.apache.org/repos/asf/servicemix/m2-repo

Regards
JB

On 01/31/2015 01:42 PM, matthjes wrote:
> Switched to the newly released 3.0.3, problems are still there. Here is part
> of the log output from a plain custom distribution generated with the
> karaf-assembly archetype (version 3.0.3):
>
> 2015-01-31 13:37:10,186 | WARN  | FelixStartLevel  | AetherBasedResolver
> | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.1 | Error resolving
> artifactorg.eclipse.equinox:region:jar:1.0.0.v20110506:Could not find
> artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central
> (http://repo1.maven.org/maven2/)
> shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not
> find artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central
> (http://repo1.maven.org/maven2/)
>
> It also still ignore the ipojo feature descriptor (see other thread).
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145p4038168.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Did you add the smx m2 repository in etc/org.ops4j.pax.url.mvn.cfg and 
in the pom <repository/> element ?

Regards
JB

On 01/31/2015 01:42 PM, matthjes wrote:
> Switched to the newly released 3.0.3, problems are still there. Here is part
> of the log output from a plain custom distribution generated with the
> karaf-assembly archetype (version 3.0.3):
>
> 2015-01-31 13:37:10,186 | WARN  | FelixStartLevel  | AetherBasedResolver
> | 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.1 | Error resolving
> artifactorg.eclipse.equinox:region:jar:1.0.0.v20110506:Could not find
> artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central
> (http://repo1.maven.org/maven2/)
> shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not
> find artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central
> (http://repo1.maven.org/maven2/)
>
> It also still ignore the ipojo feature descriptor (see other thread).
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145p4038168.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Posted by matthjes <ma...@gmail.com>.
Switched to the newly released 3.0.3, problems are still there. Here is part
of the log output from a plain custom distribution generated with the
karaf-assembly archetype (version 3.0.3):

2015-01-31 13:37:10,186 | WARN  | FelixStartLevel  | AetherBasedResolver             
| 3 - org.ops4j.pax.logging.pax-logging-api - 1.8.1 | Error resolving
artifactorg.eclipse.equinox:region:jar:1.0.0.v20110506:Could not find
artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central
(http://repo1.maven.org/maven2/)
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not
find artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central
(http://repo1.maven.org/maven2/)

It also still ignore the ipojo feature descriptor (see other thread).



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145p4038168.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Posted by matthjes <ma...@gmail.com>.
Hi,

Not even the distribution created from an unmodified pom.xml (as created by
the archetype) runs without throwing an error:

2015-01-30 23:22:44,376 | INFO  | FelixStartLevel  | FeaturesServiceImpl             
| 20 - org.apache.karaf.features.core - 3.0.2 | Installing feature region
3.0.2
2015-01-30 23:22:47,386 | WARN  | FelixStartLevel  | AetherBasedResolver             
| 1 - org.ops4j.pax.url.mvn - 2.2.0 | Error resolving
artifactorg.eclipse.equinox:region:jar:1.0.0.v20110506:Could not find
artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central
(http://repo1.maven.org/maven2/)
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not
find artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central
(http://repo1.maven.org/maven2/)

It seems like karaf-assembly does not work at all, so what is the
recommended way to create a custom distribution? I'm 3.0.2...



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145p4038149.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Posted by matthjes <ma...@gmail.com>.
I've created my own feature XML containing the ipojo bundle (also using the
respective archetype to create the feature XML) and now the karaf-assembly
reads it.

I've even copied the content of the original ipojo feature descriptor file
(https://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.ipojo.features/1.12.1/org.apache.felix.ipojo.features-1.12.1.xml)
into my own file and it works.

The only difference now is the groupId, artifactId, version, and classifier.
I don't think it has anything to do with the groupId, artifactId, or
version, but with the classifier. Does the install-kar goal require a
classifier "features"?





--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145p4038148.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 custom distribution: install-kars ignores ipojo dependency

Posted by matthjes <ma...@gmail.com>.
Furthermore, after adding the enterprise feature XML, there is an error while
installing the hibernate feature:

[INFO] = Installing bundles from hibernate feature
[INFO] == Installing bundle
mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.java-persistence-api-1.1.1/2.4.0
[INFO] == Installing bundle
mvn:commons-collections/commons-collections/3.2.1
[INFO] == Installing bundle mvn:commons-pool/commons-pool/1.6
[INFO] == Installing bundle mvn:commons-dbcp/commons-dbcp/1.4
[INFO] == Installing bundle
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6.1_5
[INFO] == Installing bundle
mvn:org.objectweb.asm/com.springsource.org.objectweb.asm/1.5.3
[WARNING] Could not resolve
org.objectweb.asm:com.springsource.org.objectweb.asm:1.5.3
org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find
org.objectweb.asm:com.springsource.org.objectweb.asm:jar:1.5.3 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

Btw, is it possible to provide a version for a feature? When installing the
hibernate feature it seems like it's trying to install all version given in
the enterprise feature XML...



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-custom-distribution-install-kars-ignores-ipojo-dependency-tp4038145p4038147.html
Sent from the Karaf - User mailing list archive at Nabble.com.