Trouble fetching a maven dependency [message #1497201] |
Wed, 03 December 2014 11:27  |
Eclipse User |
|
|
|
Hello,
I'm new to buckminster and was trying some things out.
Resolving & materializing bundles from p2-sites works fine, but when I try to do the same for a maven dependency, I get the following error:
Quote:ERROR java.io.FileNotFoundException: File not found: http://central.maven.org/maven2/org/controlsfx/controlsfx/org.controlsfx.controlsfx/maven-metadata.xml
It is totally normal Buckminster doesn't find the maven-metadata.xml on that URL, it should be "http://central.maven.org/maven2/org/controlsfx/controlsfx/", without the last "org.controlsfx.controlsfx".
But how can I configure this ? My searchPath is as follows :
<rm:searchPath name="maven-central">
<rm:provider xsi:type="mp:MavenProvider"
componentTypes="maven,osgi.bundle"
readerType="maven2"
source="false" mutable="false">
<rm:uri format="http://central.maven.org/maven2"/>
<!-- <mp:mappings>
<mp:entry
name="ControlsFX"
groupId="org.controlsfx"
artifactId="controlsfx"/>
</mp:mappings>-->
</rm:provider>
</rm:searchPath>
//...
<rm:locator searchPathRef="maven-central" pattern="^org\.controlsfx\.(.*)" failOnError="true"/>
I tried with and without the mp:mappings, the two yield the same error.
Any hint would be appreciated,
Thomas Elskens
|
|
|
Re: Trouble fetching a maven dependency [message #1506199 is a reply to message #1497201] |
Wed, 10 December 2014 12:08   |
Eclipse User |
|
|
|
Okay after some (long) searching I found the issue : the name in the <mp:entry> tag refers to the name of the dependency in the cspec file (and not, as I thought, to the name in the pom.xml file)...
After that Buckminster complains about a missing junit dependency but I got that fixed with
<mp:scopes>
<mp:scope name="test" exclude="true"/>
</mp:scopes>
And after that Buckminster still complains about a missing dependency, so also that is solved by adding the entry pointing directy to it :
<mp:entry name="org.controlsfx.openjfx-dialogs" groupId="org.controlsfx" artifactId="openjfx-dialogs"/>
And finally, in order to have this dependency available, I had to add
<mp:scope name="compile" exclude="false"/>
I don't know if this is the right way to go, but at least it works.
Now I'm ready for my real question .
as I'm writing an RCP-application, Buckminster seems a very interesting build solution to me, as it seems to overcome the limitation of Tycho which can only build from a target definition whose bundles are available in a p2-repository.
I'm trying this tutorial (http://www.lorenzobettini.it/2012/11/materializing-and-provisioning-your-target-platform-as-local-p2-site-with-buckminster/) about how to setup a target with Buckminster in a local directory.
Now I would like to fetch osgi-bundles from maven central and materialize them in this directory.
By default, buckminster materialises this dependency in a folder .buckminster in the current workspace. When I use the materialization wizard to redirect this jar to the directory of the target, i do not obtain ./TP/controlsfx-8.20.8.jar but ./TP/maven2/org/controlsfx/controlsfx/8.20.8.jar instead.
Does any one know how to fix this ... ? If it were possible, it would really alleviate the burden of dependency management in my RCP application...
Thanks in advance for any advice,
Thomas Elskens
|
|
|
|
Powered by
FUDForum. Page generated in 0.03010 seconds