Use Relative Path in Free-form Netbeans Projects

For free-form projects, Netbeans uses absolute path for project directory in project.xml:


<properties>
<property name="project.dir">/Users/yili/Work/homecamera/WowzaStreaming</property>
<property name="ant.script">${project.dir}/build.xml</property>
<properties>

All paths in project.xml are relative to the project folder, which is the folder that contains the nbproject folder. Thus changing the above to the following makes my project works on all platforms regardless where the project is located:


<properties>
<property name="project.dir">../../../WowzaStreaming</property>
<property name="ant.script">${project.dir}/build.xml</property>
<properties>
Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s