Community
Participate
Working Groups
Build Identifier: 20110615-0604 When the workspace property 'Save automatically before build' is enabled files should be saved when maven build is executed Reproducible: Always Steps to Reproduce: 1. Enable property 'Save automatically before build' 2. Change content of a java file whithout saving the file 3. Execute maven install 4. The java file isn't saved.
I don't think this is an Eclipse bug. Maven should read the preference page and trigger a save when the user triggers a build. The bug should be reported in the Maven bugzilla.
Moving to m2e
Assuming the issue is about RunAs->Maven_Install and similar, these are launch configurations and are NOT expected to follow 'Save automatically before build' preference. These launch configurations ARE expected to honour Run/Debug->Launching->Save_required_dirty_editors preference, which does not work either. MavenLaunchDelegate extends JavaLaunchDelegate and re-uses JDT standard save-on-launch logic, which is implemented in LaunchConfigurationDelegate.saveBeforeLaunch and uses AbstractJavaLaunchConfigurationDelegate.getBuildOrder to determine what files should be saved before launch. MavenLaunchDelegate needs to override #getBuildOrder to return affected workspace projects for launch configurations associated with a workspace project and return null for launch configurations that build projects outside of workspace. Or, even better, override #saveBeforeLaunch and handle the case when launching pom.xml nested inside a workspace project. m2e development team has no immediate plans to work on this unless somebody provides a quality patch with adequate test coverage.
closing old/stale bugreports
Moved to https://github.com/eclipse-m2e/m2e-core/issues/