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.
Given a maven project that has a custom profile that specifies additional resource paths the compile on save facility does not work when that profile is active. Consider the following profile: <profile> <id>dev</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <webResources> <resource> <directory>src/dev/resources</directory> </resource> </webResources> </configuration> </plugin> </plugins> </build> </profile> Saving a file in the src/main/webapp/WEB-INF/ path or descendants will not initiate CoS, disable the profile and CoS works as expected. I can imagine why the additional resources could be harder to manage, however since this condition relates to web resources directly (not classpath resources) I would imagine that it shouldn't be affected.
One note that could be of interest is the resource path that I have included (as an additional path) includes a file that does target WEB-INF/. In fact there is the single file src/dev/resources/WEB-INF/spring/app-security-impl.xml
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss
While it does appear that the primary resources will now activate CoS, this appears to now be even more dangerous than previously. If you have an active profile as mentioned in my OP where your profile overrides a default resource, if you modify the primary resource while the project is running it will actually copy that resource over the already deployed overridden resource. Steps to Reproduce ================== 1. Create a project with a profile as described below where the profile defines additional resource paths that contain same named files as the default profile. <profiles> <profile> <id>default</id> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>dev-remote</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <webResources> <resource> <directory>src/remotedev/resources</directory> <targetPath>/</targetPath> </resource> </webResources> </configuration> </plugin> </plugins> </build> </profile> </profiles> 2. Create a file "test.jsp" for both profiles, both with differing content. 3. Activate profile `remote-dev` 4. Run the project 5. Confirm that the test.jsp from `remote-dev` is present in the build 6. Make a change to the default `test.jsp` Expected Behaviour ================== Modification of original `test.jsp` should not be present after CoS. Actual Behaviour ================ `test.jsp` from default profile will overwrite the active profiles version.