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 219721 - Setting external build directory
Summary: Setting external build directory
Status: REOPENED
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 7.3
Hardware: PC All
: P3 normal (vote)
Assignee: pgebauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-08 18:40 UTC by fanguad
Modified: 2013-03-13 19:39 UTC (History)
3 users (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 fanguad 2012-10-08 18:40:19 UTC
related issue: http://forums.netbeans.org/viewtopic.php?t=17725

I am attempting to move my build directory from the default NB Platform directory - ${suite.dir}/build - to something different, but I appear to have hit a roadblock. I am compiling files and creating jars in the desired location, but ant keeps searching for the files in the default directory.

I believe I have found the problem in ModuleListParser.java around line 380:

    case ParseProjectXml.TYPE_SUITE:
            assert path == null;
            faketask.setName("suite.dir");
            faketask.setValue(properties.get("suite.dir"));
            faketask.execute();
            faketask.setName("cluster");
            faketask.setValue(fakeproj.replaceProperties("${suite.dir}/build/cluster"));
            faketask.execute();	


this is overwriting "cluster" to the default location, ignoring the location set in my project.properties file
Comment 1 Jaroslav Tulach 2012-10-29 09:19:38 UTC
I don't see any relation to module system. This is an issue about nbbuild tasks which traditionally belongs to RE.

Btw. have you seen bug 188210? That is what we use for specifying separate build directory.

*** This bug has been marked as a duplicate of bug 188210 ***
Comment 2 fanguad 2013-03-13 19:26:11 UTC
I just acquired Netbeans 7.3 and retested this.  It appears to be a different issue from #188210.

If I try to implement the fix from #188210 by putting the recommended lines in my project.properties, I get the following error:

"When using cluster.path property, remove netbeans.dest.dir, enabled.clusters and disabled.clusters properties from platform config, they would be ignored."

In my build, I see a very similar error to the forum post linked in the original description.  In my case the first module to build is called "thirdparty."  It successfully builds <build-root>/build/cluster/modules/com-company-thirdparty.jar, but then the build fails with the error:

"No such classpath entry: <src-root>/build/cluster/modules/com-company-thirdparty.jar"
Comment 3 fanguad 2013-03-13 19:39:48 UTC
Examining the source code, I figured out what the problem is, and I think it's a problem with bad wording in netbeans/harness/README

The following is from the README:

"PROPERTIES WHICH MAY BE DEFINED IN YOUR SUITE project.properties
...
suite.build.dir ... If overridden, should be placed in platform.properties"

This definition of this variable should be moved to the section for platform.properties.  It doesn't make sense for it to be in the project.properties section and then tell you not to put it in that file.