last time I used URI there was a specification of protocol://path so you would 
need to change

 

file:/C:/java/workspace/de.metalevel.eclipse.mlbuild/ivy.xml

to

file:///C:/java/workspace/de.metalevel.eclipse.mlbuild/ivy.xml

 

Windows needs the drive specifier C:/

http://stackoverflow.com/questions/2466369/uri-for-local-resources


Viel Gluck,
Martin-

 



Date: Mon, 21 Oct 2013 12:35:07 +0200
From: riccardo.fosc...@meta-level.de
To: dev@ant.apache.org
Subject: Fixed(?) problem in Ivy's OSGi-Support on Windows

Hello Ivy developers,
 
FYI:
 
I'm trying to use Ivy 2.3.0 OSGi support on Windows to develop an
Eclipse plugin and followed exactly the instructions of the sample
"Building an Eclipse plugin" from the Ivy docs. I only changed the value
of the module attribute in the ivy.xml from the sample (see attached
ivy.xml).
 
After calling ant task ivy:resolve for this ivy.xml on a Windows machine
with JRE 6 the resolve failed with the following output:
 
"Problem occurred while parsing ivy file: Unsupported repository,
resources names are not uris in
file:/C:/java/workspace/de.metalevel.eclipse.mlbuild/ivy.xml"
 
The problem was that in method parseDescriptor of class
OSGiManifestParser an URISyntaxException occured when constructing the
URI to set for bundleInfo (line 67) because res.getName() returned
C:\java\workspace\de.metalevel.eclipse.mlbuild\META-INF\MANIFEST.MF .
 
I attached the output of svn diff for the changes I did in class
OSGiManifestParser (SVN base revision was 1532780), see attachment
OSGiManifestParser.diff.
 
I also added a "quick and dirty" test to reproduce the problem to test
class OSGiManifestParserTest, see attachment
OSGiManifestParserTest.diff. After I did the change this test is successful.
 
I also ran the whole test suite of unit tests for Ivy (ant task "test")
and it was successful, so it seems my dirty fix did not break anything.
This was my first contact with Ivy source code and I'm sure that there
are more elegant ways to fix the problem, so I leave it to the experts
to fix it right :-) Thanks to all Ivy developers for such a great tool!
 
Greetings,
Riccardo
 
-- 
 
META-LEVEL Software AG
Saarbrücker Str. 51
66130 Saarbrücken
Deutschland
Tel: +49 - 681 / 99687-0
Fax: +49 - 681 / 99687-99
Mail: i...@meta-level.de
Web: www.meta-level.de
 
Rechtsform: Aktiengesellschaft
Sitz: Saarbrücken
HR B Nr. 13 380 Amtsgericht Saarbrücken
USt-IdNr. DE 1 38 166667
Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
Vorsitzender des Aufsichtsrats:  Reinhard Kuhn

--------------------------------------------------------------------- To 
unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, 
e-mail: dev-h...@ant.apache.org                                     

Reply via email to