You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by David Leangen <os...@leangen.net> on 2017/10/08 03:19:41 UTC
Creating a "partial" OBR
Hi!
I have a few felix projects that I have patched and would like to test, but I need to create an OBR containing just those projects.
I am a bit stumped as to how to go about it, though.
Specifically, there are 3 projects:
* converter/converter
* converter/serializer
* converter/schematizer
I would like to have an OBR that contains only those 3 bundles.
Any suggestions as to how I could go about that?
maven-bundle-plugin is already configured in those projects. I am guess that I just need to set it up properly, but I am not understanding from the docs, and I have not found any examples.
Thanks!!
=David
Re: Creating a "partial" OBR
Posted by David Leangen <os...@leangen.net>.
Ok, it’s working now. I had the same problem as described in this issue:
https://github.com/bndtools/bnd/issues/1142 <https://github.com/bndtools/bnd/issues/1142>
Thanks again!!
Cheers,
=David
> On Oct 9, 2017, at 11:52 AM, David Leangen <os...@leangen.net> wrote:
>
>
>>>> On Oct 8, 2017 6:39 AM, "Jean-Baptiste Onofré" <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>>>
>>>> I guess the repository.xml is updated by the maven-bundle-plugin right (in
>>>> your .m2/repository) ?
>
> Hi JB. It looks like the repository.xml file is not created / updated. I’ll have to look into that as a separate task.
>
> But in any case, it appears that the suggested bnd-indexer-maven-plugin the right way to go for what I am trying to do.
>
>>> On 8 Oct 2017, at 09:18, Raymond Auge <ra...@liferay.com> wrote:
>>>
>>> Just for purists sake, you probably mean R5 index as obr refers to a
>>> specific non-standard form of OSGi repository which should be avoided…
>
> Yes, you are correct.
>
>
>>> Have you looked at the bnd-indexer-maven-plugin?
>
> That’s exactly what I need. Thanks!!
>
>
>> On Oct 8, 2017, at 9:06 PM, Neil Bartlett <nj...@gmail.com> wrote:
>>
>> I agree with Ray, you could use the bnd-indexer-maven-plugin. You would use this by creating a Maven module that references all of the modules that you want to include in the index. The plugin will index the full transitive dependency tree (compile + runtime scope) of the module it is attached to, though you can of course use <exclusion> blocks to thin this down if you desire.
>>
>> NB there is no requirement to use any of the other bnd Maven plugins… you can use the bnd-indexer-maven-plugin while continuing to use maven-bundle-plugin to build the actual bundles.
>
>
> Perfect! That confirms that this is exactly what I need.
>
>
>
> However…
>
> I am having trouble. I get an error, and the output file contains the error.
>
> Has anybody seen this before? I don’t understand the error message… :-(
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <repository increment="1507508718794" name="Untitled" xmlns="http://www.osgi.org/xmlns/repository/v1.0.0">
> <resource>
> <!-- Error calling analyzer "org.osgi.service.indexer.impl.BundleAnalyzer" on resource /Users/dleangen/.m2/repository/org/apache/felix/org.apache.felix.converter/0.1.0-SNAPSHOT/org.apache.felix.converter-0.1.0-SNAPSHOT.jar with message java.lang.IllegalArgumentException: Cannot index files above the root URL. Root = file:/Users/dleangen/git/infrastructure/cloud-config/nexus-upload/felix/ path is /Users/dleangen/.m2/repository/org/apache/felix/org.apache.felix.converter/0.1.0-SNAPSHOT/org.apache.felix.converter-0.1.0-SNAPSHOT.jar and stack: java.lang.IllegalArgumentException: Cannot index files above the root URL. Root = file:/Users/dleangen/git/infrastructure/cloud-config/nexus-upload/felix/ path is /Users/dleangen/.m2/repository/org/apache/felix/org.apache.felix.converter/0.1.0-SNAPSHOT/org.apache.felix.converter-0.1.0-SNAPSHOT.jar
> at org.osgi.service.indexer.impl.BundleAnalyzer.calculateLocation(BundleAnalyzer.java:243)
> at org.osgi.service.indexer.impl.BundleAnalyzer.doContent(BundleAnalyzer.java:157)
> at org.osgi.service.indexer.impl.BundleAnalyzer.analyzeResource(BundleAnalyzer.java:69)
> at org.osgi.service.indexer.impl.RepoIndex.generateResource(RepoIndex.java:271)
> at org.osgi.service.indexer.impl.RepoIndex.index(RepoIndex.java:187)
> at aQute.bnd.maven.indexer.plugin.IndexerMojo.execute(IndexerMojo.java:190)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> -->
> <capability namespace="osgi.identity">
> <attribute name="osgi.identity" value="org.apache.felix.converter"/>
> <attribute name="type" value="osgi.bundle"/>
> <attribute name="version" type="Version" value="0.1.0.SNAPSHOT"/>
> </capability>
> </resource>
>
>
> Cheers,
> =David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
Re: Creating a "partial" OBR
Posted by David Leangen <os...@leangen.net>.
>>> On Oct 8, 2017 6:39 AM, "Jean-Baptiste Onofré" <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>>
>>> I guess the repository.xml is updated by the maven-bundle-plugin right (in
>>> your .m2/repository) ?
Hi JB. It looks like the repository.xml file is not created / updated. I’ll have to look into that as a separate task.
But in any case, it appears that the suggested bnd-indexer-maven-plugin the right way to go for what I am trying to do.
>> On 8 Oct 2017, at 09:18, Raymond Auge <ra...@liferay.com> wrote:
>>
>> Just for purists sake, you probably mean R5 index as obr refers to a
>> specific non-standard form of OSGi repository which should be avoided…
Yes, you are correct.
>> Have you looked at the bnd-indexer-maven-plugin?
That’s exactly what I need. Thanks!!
> On Oct 8, 2017, at 9:06 PM, Neil Bartlett <nj...@gmail.com> wrote:
>
> I agree with Ray, you could use the bnd-indexer-maven-plugin. You would use this by creating a Maven module that references all of the modules that you want to include in the index. The plugin will index the full transitive dependency tree (compile + runtime scope) of the module it is attached to, though you can of course use <exclusion> blocks to thin this down if you desire.
>
> NB there is no requirement to use any of the other bnd Maven plugins… you can use the bnd-indexer-maven-plugin while continuing to use maven-bundle-plugin to build the actual bundles.
Perfect! That confirms that this is exactly what I need.
However…
I am having trouble. I get an error, and the output file contains the error.
Has anybody seen this before? I don’t understand the error message… :-(
<?xml version="1.0" encoding="utf-8"?>
<repository increment="1507508718794" name="Untitled" xmlns="http://www.osgi.org/xmlns/repository/v1.0.0">
<resource>
<!-- Error calling analyzer "org.osgi.service.indexer.impl.BundleAnalyzer" on resource /Users/dleangen/.m2/repository/org/apache/felix/org.apache.felix.converter/0.1.0-SNAPSHOT/org.apache.felix.converter-0.1.0-SNAPSHOT.jar with message java.lang.IllegalArgumentException: Cannot index files above the root URL. Root = file:/Users/dleangen/git/infrastructure/cloud-config/nexus-upload/felix/ path is /Users/dleangen/.m2/repository/org/apache/felix/org.apache.felix.converter/0.1.0-SNAPSHOT/org.apache.felix.converter-0.1.0-SNAPSHOT.jar and stack: java.lang.IllegalArgumentException: Cannot index files above the root URL. Root = file:/Users/dleangen/git/infrastructure/cloud-config/nexus-upload/felix/ path is /Users/dleangen/.m2/repository/org/apache/felix/org.apache.felix.converter/0.1.0-SNAPSHOT/org.apache.felix.converter-0.1.0-SNAPSHOT.jar
at org.osgi.service.indexer.impl.BundleAnalyzer.calculateLocation(BundleAnalyzer.java:243)
at org.osgi.service.indexer.impl.BundleAnalyzer.doContent(BundleAnalyzer.java:157)
at org.osgi.service.indexer.impl.BundleAnalyzer.analyzeResource(BundleAnalyzer.java:69)
at org.osgi.service.indexer.impl.RepoIndex.generateResource(RepoIndex.java:271)
at org.osgi.service.indexer.impl.RepoIndex.index(RepoIndex.java:187)
at aQute.bnd.maven.indexer.plugin.IndexerMojo.execute(IndexerMojo.java:190)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
-->
<capability namespace="osgi.identity">
<attribute name="osgi.identity" value="org.apache.felix.converter"/>
<attribute name="type" value="osgi.bundle"/>
<attribute name="version" type="Version" value="0.1.0.SNAPSHOT"/>
</capability>
</resource>
Cheers,
=David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Creating a "partial" OBR
Posted by Neil Bartlett <nj...@gmail.com>.
I agree with Ray, you could use the bnd-indexer-maven-plugin. You would use this by creating a Maven module that references all of the modules that you want to include in the index. The plugin will index the full transitive dependency tree (compile + runtime scope) of the module it is attached to, though you can of course use <exclusion> blocks to thin this down if you desire.
NB there is no requirement to use any of the other bnd Maven plugins… you can use the bnd-indexer-maven-plugin while continuing to use maven-bundle-plugin to build the actual bundles.
Regards,
Neil
> On 8 Oct 2017, at 09:18, Raymond Auge <ra...@liferay.com> wrote:
>
> On Oct 8, 2017 6:39 AM, "Jean-Baptiste Onofré" <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>
> Hi David,
>
> I guess the repository.xml is updated by the maven-bundle-plugin right (in
> your .m2/repository) ?
>
> Regards
> JB
>
>
> On 10/08/2017 05:19 AM, David Leangen wrote:
>
>> Hi!
>>
>> I have a few felix projects that I have patched and would like to test,
>> but I need to create an OBR containing just those projects.
>>
>
> Just for purists sake, you probably mean R5 index as obr refers to a
> specific non-standard form of OSGi repository which should be avoided...
>
>
>> I am a bit stumped as to how to go about it, though.
>>
>
> Have you looked at the bnd-indexer-maven-plugin?
> https://github.com/bndtools/bnd/tree/master/maven/bnd-indexer-maven-plugin <https://github.com/bndtools/bnd/tree/master/maven/bnd-indexer-maven-plugin>
>
> - Ray
>
>
>>
>> Specifically, there are 3 projects:
>>
>> * converter/converter
>> * converter/serializer
>> * converter/schematizer
>>
>>
>> I would like to have an OBR that contains only those 3 bundles.
>>
>>
>> Any suggestions as to how I could go about that?
>>
>> maven-bundle-plugin is already configured in those projects. I am guess
>> that I just need to set it up properly, but I am not understanding from the
>> docs, and I have not found any examples.
>>
>>
>> Thanks!!
>> =David
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
Re: Creating a "partial" OBR
Posted by Raymond Auge <ra...@liferay.com>.
On Oct 8, 2017 6:39 AM, "Jean-Baptiste Onofré" <jb...@nanthrax.net> wrote:
Hi David,
I guess the repository.xml is updated by the maven-bundle-plugin right (in
your .m2/repository) ?
Regards
JB
On 10/08/2017 05:19 AM, David Leangen wrote:
> Hi!
>
> I have a few felix projects that I have patched and would like to test,
> but I need to create an OBR containing just those projects.
>
Just for purists sake, you probably mean R5 index as obr refers to a
specific non-standard form of OSGi repository which should be avoided...
> I am a bit stumped as to how to go about it, though.
>
Have you looked at the bnd-indexer-maven-plugin?
https://github.com/bndtools/bnd/tree/master/maven/bnd-indexer-maven-plugin
- Ray
>
> Specifically, there are 3 projects:
>
> * converter/converter
> * converter/serializer
> * converter/schematizer
>
>
> I would like to have an OBR that contains only those 3 bundles.
>
>
> Any suggestions as to how I could go about that?
>
> maven-bundle-plugin is already configured in those projects. I am guess
> that I just need to set it up properly, but I am not understanding from the
> docs, and I have not found any examples.
>
>
> Thanks!!
> =David
>
>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Creating a "partial" OBR
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi David,
I guess the repository.xml is updated by the maven-bundle-plugin right (in your
.m2/repository) ?
Regards
JB
On 10/08/2017 05:19 AM, David Leangen wrote:
> Hi!
>
> I have a few felix projects that I have patched and would like to test, but I need to create an OBR containing just those projects.
>
> I am a bit stumped as to how to go about it, though.
>
>
> Specifically, there are 3 projects:
>
> * converter/converter
> * converter/serializer
> * converter/schematizer
>
>
> I would like to have an OBR that contains only those 3 bundles.
>
>
> Any suggestions as to how I could go about that?
>
> maven-bundle-plugin is already configured in those projects. I am guess that I just need to set it up properly, but I am not understanding from the docs, and I have not found any examples.
>
>
> Thanks!!
> =David
>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org