-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#502] : delete episodeFile if only file generated in configuration phase of m2e #503
[#502] : delete episodeFile if only file generated in configuration phase of m2e #503
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a command line procedure that could create this scenario?
maven-plugin/plugin-core/src/main/java/org/jvnet/jaxb/maven/RawXJC2Mojo.java
Show resolved
Hide resolved
maven-plugin/plugin-core/src/main/java/org/jvnet/jaxb/maven/RawXJC2Mojo.java
Show resolved
Hide resolved
Can we add the example project as a test and validate the episode is deleted? |
@@ -479,6 +481,7 @@ protected void doExecute() throws MojoExecutionException { | |||
setupDirectories(); | |||
doExecute(options); | |||
addIfExistsToEpisodeSchemaBindings(); | |||
deleteEpisodeIfOnlyFileOnEmptyContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to just not call doExecute
instead of creating and then deleting the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alerosmile : there is some scenario (simple ones with no bindings / catalog) where files are just created the right way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@laurentschoelens : You are right but I once read this:
https://www.eclipse.org/lists/m2e-dev/msg01178.html
maven-resources-plugin:copy-resources does nothing during onConfiguration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you suggest that the runOnConfiguration
should be set to false ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the source roots must be added during runOnConfiguration, but according to Igor's comment, no files should be created. I'm not sure but I think Igor is one of the main creator of m2e.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, it's working as expected with only runOnIncremental 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, it's working as expected with only runOnIncremental 😄
Or not 😄
I don't think so sadly 😞 |
…guration phase of m2e (tested in eclipse)
d0f6984
to
4cf793b
Compare
No : the problem is only in m2e 😞 |
See other test failures-- did this change cause a regression? |
Thoughts on guarding this change with a config flag or state flag that detects we are running in Eclipse / m2e? |
|
No, see f574786 (fixed in other PR) |
Closing, will recreate new one with another fix |
Fixes #502
Does not break build
Tested in eclipse m2e sample project provided here