What seems to be working so far in most cases: remove executions of the clean goal, and override
<outputDirectory>${project.build.directory}</outputDirectory>
<flattenedPomFilename>${project.artifactId}-${project.version}.pom</flattenedPomFilename>
I noticed one behavioral change in findbugs-maven-plugin (relative paths in findbugs.excludeFilterFile are not resolved), but it is not clear what the correct behavior was there anyway; prepending ${project.basedir}/ fixes it.
Now I am tracking down a problem in frontend-maven-plugin: node commands get run from target as the CWD. This code seems to be getting the wrong value—but only when the project version is not a snapshot. Of course I cannot reproduce a similar problem using a simple test mojo. This seems to have something to do with source:jar running a forked Maven execution, thus rerunning lots of mojos, in which the basedir is apparently wrong. The produce-incrementals profile runs this mojo, which is presumably the trigger.
I notice that MavenProject.deepCopy is wrong (calls setFile and thus sets basedir of the clone to target). I am guessing that is the culprit behind both problems—they involve forked executions. (@Execute annotation)
Summary: making this switch is not completely safe, but can be done.
What seems to be working so far in most cases: remove executions of the clean goal, and override
I noticed one behavioral change in findbugs-maven-plugin (relative paths in findbugs.excludeFilterFile are not resolved), but it is not clear what the correct behavior was there anyway; prepending ${project.basedir}/ fixes it.
Now I am tracking down a problem in frontend-maven-plugin: node commands get run from target as the CWD. This code seems to be getting the wrong value—but only when the project version is not a snapshot. Of course I cannot reproduce a similar problem using a simple test mojo. This seems to have something to do with source:jar running a forked Maven execution, thus rerunning lots of mojos, in which the basedir is apparently wrong. The produce-incrementals profile runs this mojo, which is presumably the trigger.
I notice that MavenProject.deepCopy is wrong (calls setFile and thus sets basedir of the clone to target). I am guessing that is the culprit behind both problems—they involve forked executions. (@Execute annotation)
Summary: making this switch is not completely safe, but can be done.