How to use BndPomRepository in standalone mode?

137 views
Skip to first unread message

Christian Schneider

unread,
Sep 12, 2016, 11:04:43 AM9/12/16
to bndtool...@googlegroups.com
I would now like to switch to the BndPomRepository if possible. I found
https://github.com/bndtools/bnd/wiki/Changes-in-3.3.0 where it is
described how to use it... but I think this only applies to the bndtools
builds. How do I use the BndPomRepository in standalone mode (for maven
builds without a bndtools workspace)?


Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

BJ Hargrave

unread,
Sep 12, 2016, 11:35:44 AM9/12/16
to bndtool...@googlegroups.com
Did you try putting the -plugin instruction in your bndrun file?

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
BJ

Christian Schneider

unread,
Sep 12, 2016, 12:31:48 PM9/12/16
to bndtool...@googlegroups.com
I am trying with this bndrun file:
https://gist.github.com/anonymous/cfebb9d130a92e5b71e9e25e77921ec4

I get no error but the browse repo view is empty.
Btw. the pom is in no external repo .. only in my local repo.

Christian

BJ Hargrave

unread,
Sep 12, 2016, 2:02:05 PM9/12/16
to bndtool...@googlegroups.com
Well, if it not in the external repo, I would not expect the Repo View of that external repo to show the file!

Christian Schneider

unread,
Sep 12, 2016, 3:34:41 PM9/12/16
to bndtool...@googlegroups.com
On 12.09.2016 20:01, BJ Hargrave wrote:
Well, if it not in the external repo, I would not expect the Repo View of that external repo to show the file!
Hmm. That is not how maven works. Maven will always first try the local repo and only use the remote repos if that fails.
I think the BndPomRepository should behave in the same way. If not then it will be impossible to resolve against bundles that
are in the same reactor build. This would make the new index completely unusable for me.

Christian

BJ Hargrave

unread,
Sep 12, 2016, 3:42:18 PM9/12/16
to bndtool...@googlegroups.com
Your local .m2 repo is a cache. It can contain jars locally built and copies of jars from many remote repos. The Repo View of a remote repo cannot include all of .m2.

Christian Schneider

unread,
Sep 12, 2016, 4:37:05 PM9/12/16
to bndtool...@googlegroups.com
It was not my intention to get an index from my whole .m2 repository. 

What I would like to have is that the  BndPomRepository allows to specify a pom and the pom specifies the bundles to form the index. The pom as well as the bundle it specifies should be retrieved using maven semantics. So for example for snapshots it should try to update them from the remote repo once per day. Apart from that it should use the artifacts from the local repo if they are already present. During a build it should also be able to use the pom and bundles that are part of the reactor build. This allows to do a export and resolve in the same build that creates some of the bundles. The easiest way to achieve this is to use the eclipse aether library. I know that Peter recreated the functionality but I think the goal should be that it behaves like maven.

Christian

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--

BJ Hargrave

unread,
Sep 12, 2016, 4:51:35 PM9/12/16
to bndtool...@googlegroups.com
OK, I'm confused. Does it not work as you expect? You seemed to be complaining that you did not see things in the repo view that were not in a remote repo.

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ

Christian Schneider

unread,
Sep 13, 2016, 1:47:17 AM9/13/16
to bndtool...@googlegroups.com
Hi BJ,

maybe I missunderstood your response.
> Well, if it not in the external repo, I would not expect the Repo View of that external repo to show the file!
I read it as "it will only work with external repos".

I just described the expected behaviour to make sure I explain what I wanted to achieve.

So does the BndPomRepository allow to retrieve poms and bundles from the local maven repo? We can look into the integration with the reactor build separately but that might also hit us later.

Christian

BJ Hargrave

unread,
Sep 13, 2016, 8:29:09 AM9/13/16
to bndtool...@googlegroups.com
I would expect the repo will use the local m2 cache as a "front end" to the remote repo. Did it not work that way for you?

Christian Schneider

unread,
Sep 13, 2016, 12:59:16 PM9/13/16
to bndtool...@googlegroups.com
Difficult to say. I only see the the repository view stays empty. No errors. So maybe my config is simply not working at all.
Do you have any example for standalone plus BndPomRepository?

Christian

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

BJ Hargrave

unread,
Sep 13, 2016, 1:17:22 PM9/13/16
to bndtool...@googlegroups.com
I don't but I expected Peter's forthcoming enRoute tutorials for maven will.

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ

Christian Schneider

unread,
Sep 13, 2016, 2:07:28 PM9/13/16
to bndtool...@googlegroups.com
That is fine. Will wait till he is around and stick with the old index for now.

Btw. I just added a first bndtools example for CXF-DOSGi. See

Christian

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Derek Baum

unread,
Sep 16, 2016, 8:03:46 AM9/16/16
to bndtool...@googlegroups.com
Hi Christian,

I’ve managed to get this working for a local pom.


The main problem seemed to be your setting of the pom property:
pom=org.apache.cxf.dosgi:cxf-dosgi-samples-repository:2.0-SNAPSHOT; \

This should be set to the path (or URL) of the pom.

I found this config in PomRepositoryTest:

I also found:
config.put("pom", "testdata/pomrepo/simple-nodeps.xml”)


but the only way I have been able to resolve against a local pom, is to specify its absolute path,
as the macro ${workspace} doesn’t appear to work in maven environment.


Here is my working plugin definition:

-plugin.pom: aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
name="pom-index9"; \
pom="/Users/derek/devl/maven-repo-example/repo-test/pom.xml"; \
releaseUrls="https://repo1.maven.org/maven2/"; \
snapshotUrls="https://repo1.maven.org/maven2/“

My pom is NOT in maven central; I’ve just pointed releaseUrls and snapshotUrls there to avoid leaving them blank.


There appears to be some caching problem, as if I change the pom property to point at another file,
the browse repos view does not reflect the new content (even if I close and reopen the bndrun file) unless I also change the name property to a new name that I have not used before.
i.e. once a repo has been populated, it seems to be cached against that name, even if the pom property changes.

If you change the dependencies in the pom.xml, then you need close and re-open the bndrun file, for it to see the new dependencies.


HTH,

Derek



To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

Christian Schneider

unread,
Sep 16, 2016, 8:15:18 AM9/16/16
to bndtool...@googlegroups.com
Does this solution work if the bundles the pom points to are also not in maven central?

Christian

Derek Baum

unread,
Sep 16, 2016, 8:23:24 AM9/16/16
to bndtool...@googlegroups.com
On 16 Sep 2016, at 13:15, Christian Schneider <ch...@die-schneider.net> wrote:

Does this solution work if the bundles the pom points to are also not in maven central?

Christian

yes, my bundles are not all in maven central.


I’ve also found a revision property that takes the maven co-ordinates you were trying to use.

i.e. either use:

revision = org.apache.cxf.dosgi:cxf-dosgi-samples-repository:2.0-SNAPSHOT;

or


pom = path-to-pom.xml


relative pom path is resolved against current directory (user.dir),
which is why I had to use an absolute path, as I’m not sure what the current directory is in eclipse.


Derek


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

Gianluca Iannella

unread,
Sep 24, 2016, 6:16:28 AM9/24/16
to bndtools-users, de...@baums.org.uk
Hi Derek,

you need to use  ${build} to point to the cnf relative folder path 

-plugin.pom: aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
name="PomRepo"; \
pom=${build}/pom.xml; \

Gianluca
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
BJ
--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.

Derek Baum

unread,
Sep 24, 2016, 6:21:10 AM9/24/16
to bndtool...@googlegroups.com
That’s great!

Thanks,

Derek
Reply all
Reply to author
Forward
0 new messages