GayaBalan / ivybeans

Automatically exported from code.google.com/p/ivybeans
0 stars 0 forks source link

Non-relative paths stored in ivy-impl.xml #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Environment : ivybeans 1.0, netbeans 6.9 , Mac OS , jdk 1.6

Description :

If I enter a path under the same version control root the settings file (in 
this case, my ivy.xml is 
in $ROOT/project1/ivy.xml and the settings file is in 
$ROOT/build-common/ivysettings.xml), a 
fully-qualified path is generated into $PROJECT/nbproject/ivy-impl.xml.  I set 
the settings file 
using the Browse button in the project customizer.

This is fairly disasterous, as ivy-impl.xml is shared in version control, and 
other people will not 
have the same path to the repository root on their disk.

How this should work:
 - Ideally, store this path in a .properties file somewhere, so it can be put in nbproject/private/* 
if it is a fully qualified path and should not be shared in version control
 - Otherwise:
  - Use ColocationQuery to determine if ivy-impl.xml and the settings file live under the same 
version control root
  - Generate relative paths whenever it is possible (i.e. settings is not on a different Windows root)
 - OR
  - Always use relative paths unless absolutely impossible (probably impossible for different 
Windows disk roots, but this will be a rare case)

I've relativized the file names;  hopefully that will work and not get changed 
by anything later...

Original issue reported on code.google.com by niftin...@gmail.com on 6 May 2010 at 3:59

GoogleCodeExporter commented 9 years ago
niftiness,

yes the ivysettings filename/url (and the ivy.xml filename also) should be in 
project.properties and just used by reference elsewhere. 

In my case, because it can be a URL, and because my settings are in subversion 
and we use webdav to access it, I use the url of the file in the repository ( 
http:/svn/repo/bla/bla/ivysettings.xml), which then works correctly for 
everyone, including our hudson server.

Original comment by bruce.ch...@gmail.com on 23 Aug 2010 at 9:34

GoogleCodeExporter commented 9 years ago
Doing it by URL could work, I suppose, but would not be a great practice if you 
ever want to code, say, on an airplane.

Original comment by niftin...@gmail.com on 23 Aug 2010 at 4:54

GoogleCodeExporter commented 9 years ago
Have started work to store settings and descriptor file names in 
project.properties, and not in project.xml

Original comment by bruce.ch...@gmail.com on 25 Aug 2010 at 9:40

GoogleCodeExporter commented 9 years ago
Revision: 299
Author: brucechapman@paradise.net.nz
Date: 2:50:17 p.m., Wednesday, 1 September 2010
Message:
issue 70  Move settings file, and descriptor file from project.xml to 
project.properties, so that ivy-impl.xml ant script can use those properties 
rather than hard coded values.
----
Modified : 
/trunk/ivybeans/ivy-module/src/com/googlecode/ivybeans/module/IvyBuildHelper.jav
a
Modified : 
/trunk/ivybeans/ivy-module/src/com/googlecode/ivybeans/module/IvyLibraryControll
er.java
Modified : 
/trunk/ivybeans/ivy-module/src/com/googlecode/ivybeans/module/ProjectConfigurati
onHelper.java
Modified : 
/trunk/ivybeans/ivy-module/src/com/googlecode/ivybeans/module/resources/ivy-impl
_.xml

Original comment by bruce.ch...@gmail.com on 1 Sep 2010 at 2:53

GoogleCodeExporter commented 9 years ago
Issue 81 has been merged into this issue.

Original comment by laurent....@gmail.com on 24 Sep 2010 at 7:41