-
Notifications
You must be signed in to change notification settings - Fork 208
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
Spring Tool Suite 17 with maven no longer copies application.properties file to the target folder #929
Comments
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. |
thanks for keeping me updated |
In case you want to try the fix early, you can add the m2e snapshots update site to the preferences ( 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 |
this issue is still here, is there any hotfix? |
@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. |
thanks for the reply. let me try the workaround |
Closing this from the Spring Tools perspective now, the updates to m2e will be included on the upcoming 4.18.0 release (from what I can see at the moment). |
Note: To be supported in Eclipse SimRel 2023-03 |
I'm still seeing the problem, getting:
I reverted to 4.16.1, and the problem is gone. |
@arimeyer Can you attach a small sample project that reproduces this issue? And can you double check which version of the m2e plugins you have installed in your environment that doesn't work? The version that are ship and which should include a fix for this is: |
Hi @martinlippert -- will try to do so this weekend. Best, Ari |
FYI, I'm on STS 4.18.0 with |
Hey @pcdavid, I also have a colleague who reports the same, but I am not able yet to reproduce it. Do you have a sample project and/or a few steps how to reproduce this. The steps that I tried don't trigger the issue yet. Many many thanks for your help! |
I don't understand yet what triggers it but I'll comment here if I find more. |
That would be great, looking forward to hearing more details from your side. Also in case you have a project that you can share, let us know. |
Well, in my case it's on https://github.com/eclipse-sirius/sirius-components, but that's 320 kSLOCs of Java across 57 Maven modules, so as far as a minimal repro case as can be... |
So, I now have a much simpler scenario to reproduce. I don't think it's possible to do simpler.
We're back to a valid state where everything compiles without error, but Not shown on the video: doing a "Project > Clean... > Clean all projects" afterwards fixes the issue (in this very simple case). simplescreenrecorder-2023-07-17_16.23.18.mp4Sample project used: demo.zip The m2e issue eclipse-m2e/m2e-core#1150 linked above mentioned that it may be related to the presence of the |
Unsurprisingly, I reproduce the issue with the scenario above on a plain "Eclipse IDE for Java Developers 2023-06 (4.28.0)", so it's not related to an STS-specific component. |
@pcdavid Thanks very much for the simpler instructions to reproduce this issue. I have attempted a JUnit test for this in M2E-Core. It has a few |
This is the m2e issue we are waiting on to be fixed: eclipse-m2e/m2e-core#1511 |
@martinlippert I've installed the latest M2E 2.5.0 which came out on 2023-11-27 and I still observe the issue. Moving to 4.21.1 |
There's some activity on apache/maven-filtering#77 (comment) which seems to be the root cause. No idea how long it would take, once merged there (and assuming this indeed fixes the issue) to be available in STS. It looks like it would need a new Maven release? It's been reported multiple times on m2e (eclipse-m2e/m2e-core#1585 and eclipse-m2e/m2e-core#1511 for example). |
@pcdavid any update on this issue? the stated workaround is untenable for enterprise projects with many applications in your workspace |
A fix for the (potential) underlying issue in Maven has just been merged: apache/maven-filtering#77. |
A potential fix has just been merged in m2e itself via eclipse-m2e/m2e-core#1629 |
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. |
Builds that include the m2e fix are available now from here: 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). |
@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. |
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? |
@martinlippert are we moving this to 4.22.0 to include new eclipse release with new m2e release? |
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) |
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 |
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.
Platform MacOS Monterey 12.5.1 Apple M1 chip - Eclipse STS 17.0
To Reproduce
See above
Problem does not occur in STS 14
A non-working maven project, and a working gradle project
sounds-of-animals-maven.zip
sounds-of-animals.zip
The text was updated successfully, but these errors were encountered: