This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 44817 - [freeform] relativize path in project.xml
Summary: [freeform] relativize path in project.xml
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks: 42682
  Show dependency tree
 
Reported: 2004-06-14 13:13 UTC by David Konecny
Modified: 2006-03-24 10:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2004-06-14 13:13:42 UTC
If project metadata are stored in original project
folder then use relative paths from project folder
to all locations like source folder, output
folder, etc.

If project metadata are stored in separate folder
then define a property in project.xml pointing to
original project folder and base all paths on this
property, i.e. something like
${project.folder}/src, etc.
Comment 1 Jesse Glick 2004-06-14 16:17:45 UTC
May also need CollocationQuery in some cases.
Comment 2 David Konecny 2004-06-18 11:58:38 UTC
Fixed as part of larger refactorings and cleanups. The full commit is:
src/org/netbeans/modules/ant/freeform/FreeformProject.java;
new revision: 1.19; previous revision: 1.18
src/org/netbeans/modules/ant/freeform/FreeformProjectGenerator.java;
new revision: 1.13; previous revision: 1.12
src/org/netbeans/modules/ant/freeform/ui/BasicProjectInfoPanel.java;
new revision: 1.7; previous revision: 1.6
src/org/netbeans/modules/ant/freeform/ui/BasicProjectInfoWizardPanel.java;
new revision: 1.2; previous revision: 1.1
src/org/netbeans/modules/ant/freeform/ui/ClasspathPanel.form;
new revision: 1.3; previous revision: 1.2
src/org/netbeans/modules/ant/freeform/ui/ClasspathPanel.java;
new revision: 1.6; previous revision: 1.5
src/org/netbeans/modules/ant/freeform/ui/ClasspathWizardPanel.java;
new revision: 1.3; previous revision: 1.2
src/org/netbeans/modules/ant/freeform/ui/GeneralPanel.java;
new revision: 1.2; previous revision: 1.1
src/org/netbeans/modules/ant/freeform/ui/NewJ2SEFreeformProjectWizardIterator.java;
new revision: 1.10; previous revision: 1.9
src/org/netbeans/modules/ant/freeform/ui/NewWebFreeformProjectWizardIterator.java;
new revision: 1.6; previous revision: 1.5
src/org/netbeans/modules/ant/freeform/ui/OutputPanel.form;
new revision: 1.2; previous revision: 1.1
src/org/netbeans/modules/ant/freeform/ui/OutputPanel.java;
new revision: 1.2; previous revision: 1.1
src/org/netbeans/modules/ant/freeform/ui/ProjectCustomizer.java;
new revision: 1.7; previous revision: 1.6
src/org/netbeans/modules/ant/freeform/ui/ProjectCustomizerProvider.java;
new revision: 1.3; previous revision: 1.2
src/org/netbeans/modules/ant/freeform/ui/SourceFoldersPanel.java;
new revision: 1.7; previous revision: 1.6
src/org/netbeans/modules/ant/freeform/ui/SourceFoldersWizardPanel.java;
new revision: 1.5; previous revision: 1.4
src/org/netbeans/modules/ant/freeform/ui/TargetMappingPanel.form;
new revision: 1.6; previous revision: 1.5
src/org/netbeans/modules/ant/freeform/ui/TargetMappingPanel.java;
new revision: 1.9; previous revision: 1.8
src/org/netbeans/modules/ant/freeform/ui/WebLocationsPanel.java;
new revision: 1.6; previous revision: 1.5
src/org/netbeans/modules/ant/freeform/ui/WebLocationsWizardPanel.java;
new revision: 1.4; previous revision: 1.3
Comment 3 hanasaki 2004-07-08 04:39:45 UTC
Maybe I misunderstand but; shouldn't the ant script be relative to the
project.location?  My goal is to be able to move a project directory
and have everything still work the same.  This probably requires
relative paths not the absolute as below.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.ant.freeform</type>
    <configuration>
        <general-data
xmlns="http://www.netbeans.org/ns/freeform-project/1">
            <name>common</name>
            <properties>
                <property
name="project.location">/home/hanasaki/data/dev/projects/j2ee/</property>
                <property
name="ant.script">/home/hanasaki/data/dev/projects/j2ee/build_jar_facade.xml</property>
Comment 4 Jesse Glick 2004-07-08 16:47:25 UTC
Works for me, I get e.g.

<property name="project.dir">/space/src/whatever</property>
<property name="ant.script">${project.dir}/build.xml</property>

If it works differently for you, please file a fresh bug with full
details to reproduce and it will be looked at.

Note: regardless of what the wizard may or may not generate for you,
you can set up any kind of configuration by directly editing
project.xml, even weird things like multiple original project
directories with their own build scripts, etc.
Comment 5 Jaromir Uhrik 2005-07-14 16:19:36 UTC
Verified.