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 197719 - enableModules does not work
Summary: enableModules does not work
Status: RESOLVED DUPLICATE of bug 185291
Alias: None
Product: platform
Classification: Unclassified
Component: NB JUnit (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on: 185291
Blocks:
  Show dependency tree
 
Reported: 2011-04-13 20:02 UTC by Jesse Glick
Modified: 2011-11-04 12:30 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 Jesse Glick 2011-04-13 20:02:15 UTC
I have been trying to understand the usage of enableClasspathModules, clusters, and enableModules, but they do not seem to work as I expect.

package p;
import junit.framework.Test;
import org.netbeans.junit.NbModuleSuite;
import org.netbeans.junit.NbTestCase;
public class XTest extends NbTestCase {
    public XTest(String testName) {
        super(testName);
    }
    public static Test suite() {
        return NbModuleSuite.create(NbModuleSuite.createConfiguration(XTest.class)
                .enableModules(".*", ".*javascript.*")
                );
    }
    public void testStuff() {}
}

in a standalone module (set to an IDE as the target platform) loads all modules in the platform cluster, and no other clusters (except for the standalone module itself).

If I add .clusters(".*") then all IDE modules in all clusters are loaded.

Similarly, .clusters("ide").enableModules("ide", ".*javascript.*") loads all modules in the platform and ide clusters. In no case is just part of a cluster loaded.

I am not sure why filtering does not work, but it is clear why just .enableModules(".*") does not load any non-platform clusters: the findClusters method checks clusterRegExp but ignores moduleRegExp. So, if you pass just enableModules, runInRuntimeContainer will call turnModules on only the platform cluster.
Comment 1 Jaroslav Tulach 2011-04-15 08:12:35 UTC
Also related to bug 185291
Comment 2 Jaroslav Tulach 2011-11-04 12:30:28 UTC
As far as I can tell, the system does not disable any modules. It can only enable more than would be enabled by default. I've added support for disabling while fixing bug 185291. Tentatively making duplicate. Please verify fix for bug 185291 would work for you in Maven scenario.

*** This bug has been marked as a duplicate of bug 185291 ***