I sorry to say this, but I got the feeling that the P2 community is not that
responsive. We sent a couple of patches, and those were not even committed
AFAIK. It is more of a source-open project than an open-source project.

Azeez

On Sat, Jan 16, 2010 at 11:08 AM, Ruwan Linton <[email protected]> wrote:

> OK, may be we shouldn't touch P2 source and try to live on our space,
> that will make it easy to migrate to a newer version of P2. At the same
> time please raise this on the P2 community and see whether we can get
> this fixed.
>
> Thnaks,
> Ruwan
>
> Saminda Wijeratne wrote:
> > Patching p2 for handle this involves some core changes. P2 gets to
> > know which bundles it needs to install by reading the artifacts.xml
> > and the content.xml.
> >
> > In those metadata files the bundles are defined using the symbolic
> > name and the osgi.version, using mapping rules[1]. Thus P2 constructs
> > the bundle name according to that rule.
> >
> > Here the id is the symbolic name (rather than the artifact id of a
> > maven artifact) and version is the osgi version. If we are to patch p2
> > we need to introduce new rules to support maven artifact naming and
> > introduction of maven artifact properties(maven artifactId and
> > maven.version) to p2 metadata. or we can introduce the logic to p2 to
> > find and map the required bundle among the metadata.
> >
> > Getting maven stuff inside p2 is going to be messy, but find and map
> > bundles is reasonable I think. But as this involves some core
> > operational changes in p2, we'll try to provide patches to p2 project
> > in eclipse so that we wont be significantly forking their code.
> >
> > Saminda
> >
> > [1]     <rule filter='(&amp; (classifier=osgi.bundle))'
> > output='${repoUrl}/plugins/${id}-${version}.jar'/>
> > extracted from artifact xml.
> >
> > On Sat, Jan 16, 2010 at 8:11 AM, Ruwan Linton <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> >     I thought we got rid of this issue by patching P2, but seems like
> this
> >     is a hack :-( So what we have done is we have renamed the jar at the
> >     package time keeping it in the maven way at the build time :-)
> >
> >     Why don't we try to do it right, is it extremely hard to do that?
> >
> >     Thanks,
> >     Ruwan
> >
> >     Saminda Wijeratne wrote:
> >     >
> >     >
> >     > On Fri, Jan 15, 2010 at 3:16 PM, Sameera Jayasoma
> >     <[email protected] <mailto:[email protected]>
> >     > <mailto:[email protected] <mailto:[email protected]>>> wrote:
> >     >
> >     >
> >     >
> >     >     On Fri, Jan 15, 2010 at 3:14 PM, Sameera Jayasoma
> >     >     <[email protected] <mailto:[email protected]>
> >     <mailto:[email protected] <mailto:[email protected]>>> wrote:
> >     >
> >     >
> >     >
> >     >         On Fri, Jan 15, 2010 at 2:50 PM, Nuwan Bandara
> >     <[email protected] <mailto:[email protected]>
> >     >         <mailto:[email protected] <mailto:[email protected]>>> wrote:
> >     >
> >     >             Hi guys,
> >     >
> >     >             While I was working in the carbon.ui bundle in the
> >     trunk,
> >     >             I noticed that the carbon ui bundle in the carbon
> >     >             distribution is named as
> >     >             org.wso2.carbon.ui-*3.0.0.SNAPSHOT* but the actual jar
> >     >             which is (in the carbon.ui target) getting created is
> >     >             org.wso2.carbon.ui-*3.0.0-SNAPSHOT*. I also checked the
> >     >             carbon distribution and parent poms and the version is
> >     >             correctly typed as *3.0.0-SNAPSHOT. *The real problem
> is
> >     >             when a product is built some of the carbon core bundles
> >     >             (not only the carbon.ui bundle) come in to the plugins
> >     >             directory as *3.0.0.SNAPSHOT*. Any idea on this issue ?
> >     >
> >     >
> >     >         Your observations are correct. Even though we have
> >     configured
> >     >         Maven to produces bundles with the version 3.0.0-SNAPSHOT,
> >     >         Carbon distribution has bundles with the version
> >     >         3.0.0.SNAPSHOT. This is because of P2.
> >     >
> >     >
> >     > Since we are on the subject,
> >     >
> >     > Maven version : "x.y.z-abc" is the correct format of the version
> >     of an
> >     > artifact
> >     > osgi version : "x.y.z.abc" is the correct format of the version of
> a
> >     > bundle (chk the MANIFEST.MF), but the file name of the bundle can
> >     > contain any character.
> >     >     for p2: filename of the bundle should be in the format
> >     > "<bundle_symbolicname>_<osgi_version>.jar"
> >     >
> >     > The maven bundle plugin updates the version of the bundle in the
> >     > manifest file (converting the "-" to a ".") but does not attempt
> >     to do
> >     > so for the file name of the bundle since it doesn't really care abt
> >     > the filename. But p2 does. Therefore in the carbon-p2-plugin we
> >     create
> >     > bundles with p2 compatible file names when creating features.
> >     >
> >     > Saminda
> >     >
> >     >
> >     >         In Carbon trunk, bundles are no longer copied to the
> >     >         distribution by Maven. We are using P2 for this purpose
> now.
> >     >         P2 always produces bundles with the version format
> >     >         x.x.x.qualifier.
> >     >
> >     >
> >     >     I guess we may need to patch certain P2 bundles to get it
> right.
> >     >
> >     >     Sameera
> >     >
> >     >
> >     >         Sameera
> >     >
> >     >
> >     >             Thanks & Regards
> >     >             --
> >     >             Nuwan Bandara
> >     >             WSO2 Inc. | http://www.wso2.com
> >     >             email: [email protected] <mailto:[email protected]>
> >     <mailto:[email protected] <mailto:[email protected]>>
> >     >             mob: +94 772 907 484
> >     >             blog: http://www.nuwanbando.com
> >     >
> >     >             _______________________________________________
> >     >             Carbon-dev mailing list
> >     >             [email protected] <mailto:[email protected]>
> >     <mailto:[email protected] <mailto:[email protected]>>
> >     >
> >     https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
> >     >
> >     >
> >     >
> >     >
> >     >     _______________________________________________
> >     >     Carbon-dev mailing list
> >     >     [email protected] <mailto:[email protected]>
> >     <mailto:[email protected] <mailto:[email protected]>>
> >     >     https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
> >     >
> >     >
> >     >
> >
> ------------------------------------------------------------------------
> >     >
> >     > _______________________________________________
> >     > Carbon-dev mailing list
> >     > [email protected] <mailto:[email protected]>
> >     > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
> >     >
> >
> >
> >     _______________________________________________
> >     Carbon-dev mailing list
> >     [email protected] <mailto:[email protected]>
> >     https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Carbon-dev mailing list
> > [email protected]
> > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
> >
>
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>



-- 
--
Afkham Azeez
[email protected]
WSO2 Inc. http://wso2.com
Blog: http://afkham.org
_______________________________________________
Carbon-dev mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to