--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/893b3fc6-285b-494b-8ac7-63508fefefb2%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.
Keep in mind that in Eclipse you will not see plain Eclipse/OSGi bundles when you point at such a P2 repository. Eclipse's views only show you P2 features. You either have to add features to your released bundles (I use Tycho for my builds and this makes it really easy to do), or the other workaround is to mirror the P2 repository (as needed) to your local machine and then use the "folder" option to define target platforms. When you use the "folder" option you will see the individual bundles and you won't need features. But relying on features is the better option if you are mostly developing the Eclipse way and want to take advantage of the Eclipse UIs and the P2 APIs. There are a couple of pages on the Eclipse wiki that show how to use the command line to mirror P2 repositories and the Tycho plugins also have Maven goals to do this. I usually use the Tycho goals if I need this but I try to use features as much as possible.There is no need to create two artifacts. You just need to deploy Maven artifacts that have the necessary OSGi/Eclipse metadata and Nexus will recognize this make the same artifacts available in the generated P2 repository. How you do this depends on your build. I use Tycho to take care of this but there are other options. The P2 integration is now included as part of the Nexus release and you don't need any additional plugins. If you are working with an older Nexus version you might need to install the two plugins. It's been some time since I looked at the documentation but the last time I read it it described all the steps needed to enable a P2 repository based on an already hosted/mirrored Maven repository but I usually had to lookup the documentation for installing the P2 plugins elsewhere before the plugins were part of the release.Hi David,I'm not part of the Nexus team but I thought I can share what I know in case it is useful.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/56DF1868.4060603%40gmail.com.
On 03/08/2016 09:28 AM, Shahim Essaid wrote:
Keep in mind that in Eclipse you will not see plain Eclipse/OSGi bundles when you point at such a P2 repository. Eclipse's views only show you P2 features. You either have to add features to your released bundles (I use Tycho for my builds and this makes it really easy to do), or the other workaround is to mirror the P2 repository (as needed) to your local machine and then use the "folder" option to define target platforms. When you use the "folder" option you will see the individual bundles and you won't need features. But relying on features is the better option if you are mostly developing the Eclipse way and want to take advantage of the Eclipse UIs and the P2 APIs. There are a couple of pages on the Eclipse wiki that show how to use the command line to mirror P2 repositories and the Tycho plugins also have Maven goals to do this. I usually use the Tycho goals if I need this but I try to use features as much as possible.There is no need to create two artifacts. You just need to deploy Maven artifacts that have the necessary OSGi/Eclipse metadata and Nexus will recognize this make the same artifacts available in the generated P2 repository. How you do this depends on your build. I use Tycho to take care of this but there are other options. The P2 integration is now included as part of the Nexus release and you don't need any additional plugins. If you are working with an older Nexus version you might need to install the two plugins. It's been some time since I looked at the documentation but the last time I read it it described all the steps needed to enable a P2 repository based on an already hosted/mirrored Maven repository but I usually had to lookup the documentation for installing the P2 plugins elsewhere before the plugins were part of the release.Hi David,I'm not part of the Nexus team but I thought I can share what I know in case it is useful.
I understand the basic process of adding the manifest to make something an OSGi bundle, but I don't know how to handle this last point about features.
I need to mirror artifacts from Maven Central and other non-Eclipse builds as p2 artifacts, and I need that available on our Nexus server.
On 03/08/2016 09:53 AM, Shahim Essaid wrote:
On Tue, Mar 8, 2016 at 9:45 AM, David M. Karr <davidmic...@gmail.com> wrote:
On 03/08/2016 09:28 AM, Shahim Essaid wrote:
Keep in mind that in Eclipse you will not see plain Eclipse/OSGi bundles when you point at such a P2 repository. Eclipse's views only show you P2 features. You either have to add features to your released bundles (I use Tycho for my builds and this makes it really easy to do), or the other workaround is to mirror the P2 repository (as needed) to your local machine and then use the "folder" option to define target platforms. When you use the "folder" option you will see the individual bundles and you won't need features. But relying on features is the better option if you are mostly developing the Eclipse way and want to take advantage of the Eclipse UIs and the P2 APIs. There are a couple of pages on the Eclipse wiki that show how to use the command line to mirror P2 repositories and the Tycho plugins also have Maven goals to do this. I usually use the Tycho goals if I need this but I try to use features as much as possible.There is no need to create two artifacts. You just need to deploy Maven artifacts that have the necessary OSGi/Eclipse metadata and Nexus will recognize this make the same artifacts available in the generated P2 repository. How you do this depends on your build. I use Tycho to take care of this but there are other options. The P2 integration is now included as part of the Nexus release and you don't need any additional plugins. If you are working with an older Nexus version you might need to install the two plugins. It's been some time since I looked at the documentation but the last time I read it it described all the steps needed to enable a P2 repository based on an already hosted/mirrored Maven repository but I usually had to lookup the documentation for installing the P2 plugins elsewhere before the plugins were part of the release.Hi David,I'm not part of the Nexus team but I thought I can share what I know in case it is useful.
I understand the basic process of adding the manifest to make something an OSGi bundle, but I don't know how to handle this last point about features.
I need to mirror artifacts from Maven Central and other non-Eclipse builds as p2 artifacts, and I need that available on our Nexus server.
Sure, that should be easily doable, I use it all the time. Create Maven mirrors on your Nexus for the repositories you need, enable P2 on these Maven mirrors, and then run some build to populate your mirror with the needed Maven artifacts and you will see the corresponding P2 artifacts created in the generated P2 repository under /.meta/p2 Look at the metadata files in that location to check if it is working as expected. After you start seeing the artifacts in the artifacts.xml and content.xml (i.e. the Nexus/P2 setup is working) you need to decide on how to use them from Eclipse, your builds, your target platforms, etc. This is where you might want to have Eclipse features.
So you're saying that by simply publishing a Maven artifact to a Maven repo served by Nexus that is "p2 enabled", it will transparently add a manifest to that jar that exports and imports all classes?
I assume that this transformation only happens when you publish something to this "p2 enabled" repo. It won't happen magically for any existing artifacts already in the repo when the p2 flag is turned on?
Is there any reason NOT to simply "p2 enable" our existing Maven repositories that our plain Maven builds are using, so that Eclipse builds can use the same artifacts? What are the consequences of doing that?
I'm starting to get the feeling that you're saying that configuring "features" is really just an enhancement to make it easier to specify the artifacts you need. If so, I don't see the need for that here.