You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spring Tool Suite 17 with maven no longer copies application.properties file to the target folder #929
Describe the bug
When you create a new Spring Boot project (2.76, Maven, Java 17) with Spring Web an application.properties file gets created. When you edit this file, e.g. add server.port=8888 and save the file, the file never appears in the target folder of the project.
This also means that the web application still starts at the default port 8080.
There is no problem with the same project is created with gradle.
I can reproduce this and I think this is a problem with the m2e integration in Eclipse (since I can reproduce this with Eclipse 2022-12 RC1 JEE package as well), therefore I reported this issue via eclipse-m2e/m2e-core#1148 to the m2e project.
Here is the issue from the m2e project where this got fixed: eclipse-m2e/m2e-core#1150 - now waiting for a new release of m2e to be published that includes this fix.
In case you want to try the fix early, you can add the m2e snapshots update site to the preferences (Preferences -> Install/Update -> Available Update Sites, then add https://download.eclipse.org/technology/m2e/snapshots/latest/) and run a Check for Updates.
Feel free to uncheck the JustJ JRE update, but keep everything else selected and run the update. It includes the fix for this issue.
Unfortunately the workaround doesn't seem to work anymore due to a new dependency being required from the latest m2e snapshot builds. I am looking into this to see what we can do here. In the meantime, run a regular maven build on the command line or via the Run As -> Maven Install menu item whenever you change those resource files.
Reacted by Stanislav Spiridonov and Shinji Kashihara
@CrisLi The workaround described above (running stuff manually) should work, the fix for the underlying issue is implemented in the corresponding component (the Maven Integration, m2e) and we are waiting for a new release of m2e to include this fix (I guess on-time for the next major Eclipse release, coming in mid March).
In the meantime, we have fixed the issues that were preventing us from installing the latest m2e snapshot CI builds, that works again with our latest snapshot CI builds. So if you would like to, you could go to https://dist.springsource.com/snapshot/STS4/nightly-distributions.html, download and install this latest CI build (on top of Eclipse 4.26 or 4.27, whatever you prefer) and then install the latest m2e snapshot to it (as described above). That would result in an STS environment with the m2e fix included, but would also mean to run on the latest CI builds of STS as well as m2e.
A fix for the (potential) underlying issue in Maven has just been merged: apache/maven-filtering#77.
There are exchanges ongoing on eclipse-m2e/m2e-core#1511 to see how this can be tested in the context of m2e and confirm.
Not sure if this will require a new release of Maven Filtering and/or Maven itself.
Thanks a lot @pcdavid for this update, that sounds indeed quite promising. I will include the m2e snapshot update site in our builds, so that we could get a few nightly builds of STS that include this fix right away for further testing here. Will keep you posted here once those builds are around.
@pcdavid Do you think that this fixes the issue for all the cases you observed?
I have not experienced the bug since I updated, but I've not used STS much these last few days and the bug was not systematic. It looks good, but it's difficult to be sure.
@pcdavid Do you think that this fixes the issue for all the cases you observed?
I have not experienced the bug since I updated, but I've not used STS much these last few days and the bug was not systematic. It looks good, but it's difficult to be sure.
Thanks for the update, much appreciated. Let's keep an eye on this for a little longer before we finally close this item here.
Yes, since we don't have a new release of m2e yet that includes this and we will not ship the Spring Tools 4.21.1 release with an snapshot version of m2e, we will move the target milestone for this to the 4.22.0 release.
If you would like to get this into the upcoming 4.21.1 release, please install the latest m2e milestone manually into the Spring Tools distribution.
m2e has just released a version with a fix on their side: eclipse-m2e/m2e-core#1511 (comment)
It looks like a complete fix of the underlying problem will also require a new release of maven-filtering with apache/maven-filtering#77 (which has been merged), but personally I've been using m2e snapshots for a while and do not see the bug anymore.
Awesome, thanks a lot @pcdavid for the continuous feedback here, much appreciated. With that, I will close this item and mark it as solved for now. We will include the m2e 2.6 release in our upcoming Spring Tools 4.22.0 release.
Activity
martinlippert commentedon Dec 19, 2022
I can reproduce this and I think this is a problem with the m2e integration in Eclipse (since I can reproduce this with Eclipse 2022-12 RC1 JEE package as well), therefore I reported this issue via eclipse-m2e/m2e-core#1148 to the m2e project.
martinlippert commentedon Jan 1, 2023
Here is the issue from the m2e project where this got fixed: eclipse-m2e/m2e-core#1150 - now waiting for a new release of m2e to be published that includes this fix.
marcgemis commentedon Jan 2, 2023
thanks for keeping me updated
martinlippert commentedon Jan 5, 2023
In case you want to try the fix early, you can add the m2e snapshots update site to the preferences (
Preferences -> Install/Update -> Available Update Sites, then addhttps://download.eclipse.org/technology/m2e/snapshots/latest/) and run aCheck for Updates.Feel free to uncheck the JustJ JRE update, but keep everything else selected and run the update. It includes the fix for this issue.
martinlippert commentedon Jan 25, 2023
Unfortunately the workaround doesn't seem to work anymore due to a new dependency being required from the latest m2e snapshot builds. I am looking into this to see what we can do here. In the meantime, run a regular maven build on the command line or via the
Run As -> Maven Installmenu item whenever you change those resource files.CrisLi commentedon Feb 16, 2023
this issue is still here, is there any hotfix?
martinlippert commentedon Feb 16, 2023
@CrisLi The workaround described above (running stuff manually) should work, the fix for the underlying issue is implemented in the corresponding component (the Maven Integration, m2e) and we are waiting for a new release of m2e to include this fix (I guess on-time for the next major Eclipse release, coming in mid March).
In the meantime, we have fixed the issues that were preventing us from installing the latest m2e snapshot CI builds, that works again with our latest snapshot CI builds. So if you would like to, you could go to https://dist.springsource.com/snapshot/STS4/nightly-distributions.html, download and install this latest CI build (on top of Eclipse 4.26 or 4.27, whatever you prefer) and then install the latest m2e snapshot to it (as described above). That would result in an STS environment with the m2e fix included, but would also mean to run on the latest CI builds of STS as well as m2e.
41 remaining items
pcdavid commentedon Dec 20, 2023
A fix for the (potential) underlying issue in Maven has just been merged: apache/maven-filtering#77.
There are exchanges ongoing on eclipse-m2e/m2e-core#1511 to see how this can be tested in the context of m2e and confirm.
Not sure if this will require a new release of Maven Filtering and/or Maven itself.
pcdavid commentedon Dec 22, 2023
A potential fix has just been merged in m2e itself via eclipse-m2e/m2e-core#1629
It can be tested by updating m2e from https://download.eclipse.org/technology/m2e/snapshots/latest/ and getting
org.eclipse.m2e.feature2.4.300.20231222-1142 (or more recent).martinlippert commentedon Jan 2, 2024
Thanks a lot @pcdavid for this update, that sounds indeed quite promising. I will include the m2e snapshot update site in our builds, so that we could get a few nightly builds of STS that include this fix right away for further testing here. Will keep you posted here once those builds are around.
martinlippert commentedon Jan 2, 2024
Builds that include the m2e fix are available now from here:
https://cdn.spring.io/spring-tools/snapshot/STS4/nightly-distributions.html
It is included in builds based on Eclipse 2023-12 (e4.30) as well as the early access builds for Eclipse 2024-03 (e4.31).
martinlippert commentedon Jan 2, 2024
@pcdavid Do you think that this fixes the issue for all the cases you observed?
@BoykoAlex Probably worth a try to double check from your end as well
pcdavid commentedon Jan 5, 2024
I have not experienced the bug since I updated, but I've not used STS much these last few days and the bug was not systematic. It looks good, but it's difficult to be sure.
martinlippert commentedon Jan 8, 2024
Thanks for the update, much appreciated. Let's keep an eye on this for a little longer before we finally close this item here.
OLibutzki commentedon Jan 10, 2024
As this comment states there is some relationship to apache/maven-filtering#77, too.
So maybe we need a maven-filtering release including apache/maven-filtering#77 before this issue can be closed?
BoykoAlex commentedon Jan 29, 2024
@martinlippert are we moving this to 4.22.0 to include new eclipse release with new m2e release?
martinlippert commentedon Jan 31, 2024
Yes, since we don't have a new release of m2e yet that includes this and we will not ship the Spring Tools 4.21.1 release with an snapshot version of m2e, we will move the target milestone for this to the 4.22.0 release.
If you would like to get this into the upcoming 4.21.1 release, please install the latest m2e milestone manually into the Spring Tools distribution.
pcdavid commentedon Feb 21, 2024
m2e has just released a version with a fix on their side: eclipse-m2e/m2e-core#1511 (comment)
It looks like a complete fix of the underlying problem will also require a new release of maven-filtering with apache/maven-filtering#77 (which has been merged), but personally I've been using m2e snapshots for a while and do not see the bug anymore.
martinlippert commentedon Feb 26, 2024
Awesome, thanks a lot @pcdavid for the continuous feedback here, much appreciated. With that, I will close this item and mark it as solved for now. We will include the m2e 2.6 release in our upcoming Spring Tools
4.22.0release.