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.
Summary: | New project cannot be created if project dir contains package.json or bower.json | ||
---|---|---|---|
Product: | web | Reporter: | Tomas Mysik <tmysik> |
Component: | HTML Project | Assignee: | Tomas Mysik <tmysik> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tzezula, vriha |
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 250232, 253521 | ||
Bug Blocks: | 253339 | ||
Attachments: |
proposed fix
naive Ant fix |
Description
Tomas Mysik
2015-02-06 12:37:57 UTC
I was just trying that after I saw the PHP bug :) This definitely must be fixed in the current dev version. The new ProjectConvertors.isCOnvertorProject() can be used to exclude the artifical project. Unfortunately, it still does not work :/ Now, the problem is in Ant's ProjectGenerator. I tried to fix it (will attach my naive patch) but it still does not work [1]. Tome, could we please have a look at it? Thanks. [1] WARNING [org.openide.WizardDescriptor] java.lang.IllegalArgumentException: Project org.netbeans.modules.project.ui.convertor.ProjectConvertorFactory$ConvertorProject@6fdd594e was not recognized as an Ant-based project at org.netbeans.spi.project.support.ant.ProjectGenerator$1.run(ProjectGenerator.java:222) at org.netbeans.spi.project.support.ant.ProjectGenerator$1.run(ProjectGenerator.java:123) at org.netbeans.modules.openide.util.DefaultMutexImplementation.writeAccess(DefaultMutexImplementation.java:293) at org.openide.util.Mutex.writeAccess(Mutex.java:299) at org.netbeans.spi.project.support.ant.ProjectGenerator.createProject0(ProjectGenerator.java:123) Created attachment 154663 [details]
proposed fix
Created attachment 154664 [details]
naive Ant fix
(In reply to Tomas Mysik from comment #5) > Created attachment 154663 [details] > proposed fix Tomas just found out that this patch does not fix Existing nodejs project use case.. will improve it. Thanks. Should be fixed now (both existing-project wizards), thanks a lot, Tome! Láďo, please verify it. Thanks. http://hg.netbeans.org/web-main/rev/2cb8ad876dd6 Integrated into 'main-silver', will be available in build *201507180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/2cb8ad876dd6 User: Tomas Mysik <tmysik@netbeans.org> Log: #250268 - New project cannot be created if project dir contains package.json or bower.json If i write: Project p = FileOwnerQuery.getOwner(<any-maven-web-project-file-object>); in a NetBeans module than p is an instance of ConvertorProject. Suppose I have a Maven web application and I put into the src/main/webapp a file named package.json. If i write in a NetBeans module: Project webProject = FileOwnerQuery.getOwner(<any-maven-web-project-file-object>); than webProject is an instance of ConvertorProject. And the code: WebModule.getModule(<any-maven-web-project-file-object>) produces null value. I have: Windows 7 (64) jdk-1.8.0_72 NetBeans 8.1 |