-
Notifications
You must be signed in to change notification settings - Fork 116
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
Derived resources are not copied to target/classes #1710
Comments
Why does your "external process" does not copy them to |
@laeubi , the external process controls the lifecycle of the directory... so it's also capable of cleaning the whole folder... that's not an action it should perform on |
@laeubi I am quite sure that this behaviour has changed in the last couple of months. Is it possible that #1275 is responsible for this change? So you would say that not triggering Maven's resources plugin is the intended behaviour? As a workaround, we could generate the resources to another folder which is not a |
The behavior is that any change in the sources triggers a build (what probably trigger copy of resources). The |
It's a frontend build which is triggerd by the frontend-maven-plugin in the While developing there is a watcher which automcially builds the frontend whenever a source file is changed. The frontend tooling puts its stuff into |
Okay so actually I would expect in the dev build that this is also executed as part of build? Or is the execution supressed?
Could this watcher maybe trigger a build of the project then? |
It is suppressed because using the incremental build feature of m2e we have not been able to perform an incremental frontend build. We would have to trigger a full frontend build which takes too much time. That's the reason why we decided that Eclipse should just get the generated resources and its only responsibility is to copy them to
To be honest, I don't have a clue how. My expectation was that the chnaged resources trigger the build automatically. |
I have a Maven project which contains multiple resources folders. One of the resources folders is
target/generated-resources
. Astarget
is a derived folder all its containing resources are marked as derived as well.target/generated-resources
contains files which are generated by some external process.Changes in the derived folder
target/generated-resources
don't trigger a Maven's resources plugin and therefore the resources are not copied totarget/classes
.At least from my point of view this behaviour is unexpected as I want all the resources in a Maven resource folder to be copied to
target/classes
.I set up a little reproducer: https://github.com/OLibutzki/m2e-copy-resources
There are three resource folder:
src/main/resources
,src/main/resources2
andtarget/generated-resources
Changes in
src/main/resources
andsrc/main/resources2
trigger the Maven copy resource actionas one can see in the Maven console:Whenever I change something in
target/generated-resources
there is no output in the Maven console.However, when I change a resource in
src\main\resources
again, my change intarget/generated-resources
has been taken into consideration and is copied:The text was updated successfully, but these errors were encountered: