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.
When a Maven project is checked to CompileOnSave and changes are made in any resource(main/resources) NetBeans should copy the files to the dest dir(target/classes). This allow tools such as jrebel to work right and be notified of changes. In the default NB project(ant) resources are already with this behavior(copy on save) Product Version = NetBeans IDE Dev (Build 20130916-bf4eefdc37ae) Operating System = Linux version 3.8.0-30-generic running on amd64 Java; VM; Vendor = 1.7.0_25 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01
this *is* happening for me when the project has CoS turned on. please provide detailed steps to reproduce or a sample project where the copying is not happening.
for the record, I've used the nbm-maven-plugin sources, edited a jnlp file from resources and observed if the edit made it to target/classes which it did.
I've tried with a new project and it works. Maybe is something wrong in my project. I'm going to see what can be wrong Thanks. I'm closing this as invalid.
This isn't invalid and is a bug. CoS will not work if you have resource filtering enabled in your POM. I can understand how this could be tricky for resources where the filter is enabled and you save a file that matches the pattern, but it should still work for patterns that match the exclusion rule: Let us examine the following pom filtering rules: <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>**/*.properties</include> </includes> </resource> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> <excludes> <exclude>**/*.properties</exclude> </excludes> </resource> </resources> With this (or any other) resource content added to your pom you will no longer be able to save content within src/main/resources. However, I believe that given the above rule files that are not of pattern `**/*.properties' should still be matched and filtered. I tried creating instructions for creating a project but am on 8.1 Beta and bug:254570 [1] prevented me completing this. Steps to reproduce: ------------------ 1. Checkout the project at https://github.com/brettryan/nb-test-cos.git 2. Run the project 3. Edit the file src/main/resources/test.txt and reload browser 4. Observe that the section within the page will change to the files contents. 5. Clean the project 6. Uncomment the resources section (lines 84 - 101) within pom.xml. 7. Run project again 8. Edit the file as in step 3 and reload page. Observe that at step #9 that the content will not change. Observe also that the file is a .txt file and should be included for copying as it is not filtered within the resource processing section. [1]: https://netbeans.org/bugzilla/show_bug.cgi?id=254570
fixed in jet-main #dee225513055
btw - thanks for the great test project
Integrated into 'main-silver', will be available in build *201508290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/dee225513055 User: Tomas Stupka <tstupka@netbeans.org> Log: Issue #236047 - Maven compile on save should copy main/resources