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: | Maven insists on creating src/main/java directory, despite skipMain=true for maven-compliler-plugin | ||
---|---|---|---|
Product: | java | Reporter: | chrisjr |
Component: | Hints | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | rcasha |
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 250809 | ||
Bug Blocks: | |||
Attachments: | Sample Cucumber project |
Description
chrisjr
2016-07-18 15:51:06 UTC
could you please attach a sample project thanks Created attachment 160550 [details]
Sample Cucumber project
This project is fine "out of the box". To reproduce the problem, try adding a new field of unknown type to the SampleStepsDefn class. This will cause NetBeans to create a src/main/java directory, which in turn will trigger warnings about "CDI artifact is found but there is no beans.xml file".
> To reproduce the problem, try adding a new field of unknown type to the SampleStepsDefn class.
what exactly am i supposed to do - to create a new type like Reporter and then add it and clean/build?
anything else?
thanks
All you need to do is to open the project in NetBeans and then add a field to SampleStepsDefn such as private Method method; It doesn't have to be a Method field; any type that would require a new import statement would suffice. NetBeans should create the src/main/java directory as it tries to guess what the new import statement should be. org.netbeans.modules.java.hints.errors.CreateElement.getPossibleSourceGroups() calls SourceGroupModifier.createSourceGroup() while merely trying to figure out to which SG a source belongs. this unfortunately forces maven to create the src/main/java directory in case it doesn't exist reassigning for further evaluation Note that this issue is not present in NetBeans 8.0. I therefore consider this to be a regression. *** Bug 256638 has been marked as a duplicate of this bug. *** Fixed in jet-main#feccaef2859a, behaviour introduced by patch supplied in issue #250809 -- I didn't thought about the 'creation' side effect, sorry. |