Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » Trouble fetching a maven dependency
Trouble fetching a maven dependency [message #1497201] Wed, 03 December 2014 16:27 Go to next message
Thomas Elskens is currently offline Thomas ElskensFriend
Messages: 159
Registered: September 2014
Location: Brussels - Belgium
Senior Member
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 17:08 Go to previous messageGo to next message
Thomas Elskens is currently offline Thomas ElskensFriend
Messages: 159
Registered: September 2014
Location: Brussels - Belgium
Senior Member
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 Cool.

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
Re: Trouble fetching a maven dependency [message #1507029 is a reply to message #1506199] Thu, 11 December 2014 08:57 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1750
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 10/12/2014 18:08, Thomas Elskens wrote:
> 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.

Hi Thomas

concerning that blog post I wrote some years ago, if you only want to
have local p2 artifacts to speed up your build, I would suggest you a
faster and easier approach (which I didn't know about at that time): you
could use the Eclipse b3 aggregator to mirror artifacts (IIRC it also
handles maven artifacts).

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Previous Topic:is git.auto.fetch implemented at all?
Next Topic:Angular Js Eclipse Plugin Issue
Goto Forum:
  


Current Time: Tue Aug 21 06:25:44 GMT 2018

Powered by FUDForum. Page generated in 0.01781 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top