-
Notifications
You must be signed in to change notification settings - Fork 206
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
Improve user experience (i.e.: documentation) when migrating from STS3 #340
Comments
(comment in Pivotal Tracker added by Nieraj Singh:) I've split this item into three components to work on.
|
Thanks Nieraj for taking this and Kris for #397. I just wanted to say that indeed I'm still stuck at this: I still feel like my Eclipse 2019-06 installation with a bunch of STS4 4.4.2 and STS3(?) 3.9.11 bundles is not working as expected with my Spring projects, although I have to admit that I didn't try to fix this myself a lot during the last months. |
@mauromol If you can create a few slimmed down sample projects that you can share with us, we could have a more in-depth look at those projects, too, and provide feedback. Just as an additional option. |
Hi Martin, So any progress on the STS4 installation documentation on base Eclipse (or at least some guidance) would be much appreciated. |
@mauromol I added more details to the installation wiki page, hope that helps: https://github.com/spring-projects/sts4/wiki/Installation#spring-tool-suite-4-the-eclipse-based-distribution |
Hi Martin, Then I went back to the XML files that I mentioned in my original report and this is what I see:
So, regarding content assist and navigation, it seems like I'm just relying on the standard Eclipse XML features. I don't know if this is expected, but this is what I see in the XML content assist configuration page: That is, I can't see anything related to Spring. Another question: how can I see if there's some "Spring Boot Language Server" process running on my system? And also, is it supposed to run even for non-Boot applications? (as I said, I'm using a plain Dynamic Web Project). |
There are various options to check for a running spring-boot-language-server process. You can use the Another option is to enable the logging of the spring-boot-language-server (in the With regards to the missing content-assist, I guess this is related to your XML file not being recognized as a Spring-related XML file - which is most likely a limitation on our side that we should fix. Can you attach a sample XML file for which content-assist doesn't work? That would be awesome. |
Indeed with VisualVM I see a Java process with The xml file is an applicationContext XML file. This is an excerpt: <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jms="http://www.springframework.org/schema/jms" default-lazy-init="true"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd">
<!-- Load configuration properties -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="locations">
<array>
<value>classpath:/conf/datasource.properties</value>
<value>classpath:/conf/shop.properties</value>
</array>
</property>
<property name="propertiesArray">
<array>
<ref bean="commonConfigurationProperties" />
<ref bean="configurationProperties" />
</array>
</property>
</bean>
<bean id="commonConfigurationProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<value>
productionModeEnabled=false
systemMail.dcsBackendUserRecipientAddress=example@example.com
systemMail.senderAddress=ACME <noreply@example.com>
</value>
</property>
</bean>
<bean id="configurationProperties" abstract="true"
class="org.springframework.beans.factory.config.PropertiesFactoryBean" />
<context:annotation-config />
<context:component-scan base-package="it.dcssrl" />
<tx:annotation-driven proxy-target-class="true" />
<!-- [CUT] -->
<!-- Import other common configuration files -->
<import resource="classpath:context/applicationContext-shopCommon-jms.xml" />
</beans> Of course I'm trying code assist and navigation on |
(btw, the mentions above was a mistake, please ignore) |
The good news here is: I tried your XML file and content-assist works for me when I use this inside of a Dynamic Web Project. The bas news: there must be a difference somewhere that prevents this from working for you. I would suggest to submit a new issue for this (since this is not really related to user documentation anymore) and attach a small sample project that could help us to reproduce the issue. |
It would also be helpful to enable the log output of the language server via |
I added a new page to the user guide wiki that specifically addresses questions and issues when moving a workspace from Spring Tool Suite 3 to the Spring Tools 4 for Eclipse here: https://github.com/spring-projects/sts4/wiki/STS3-Migration Therefore I am closing this item here now. Please open additional enhancement requests against the newly created wiki page if you come across additional questions or would like to share your experiences with the community. Contributions to that page are also highly welcome. I am sorry that this took so long. Hope the new wiki page helps the community to further adopt the Spring Tools 4 for Eclipse. |
Hi Martin, Sorry for not getting back to you with my problem with the broken XML file editing in my main project. I wasn't able yet to understand what is going on. |
I'm here again with a lot of questions! :-)
I know the issue title is not very descriptive, so I'm going to try to explain my point of view/use case. Please feel free to split into more focused issues if you prefer.
Now that #96 and #108 have brought support for non-boot projects and (at least partial) XML config, I decided to give STS4 a try. So, I'm trying to "migrate" my Eclipse projects from STS3 to STS4 tooling.
Unfortunately I don't see any progress on #113, which perhaps could have helped me a bit to make the move.
So, let's start with the questions.
STS4 installation from the update site
I don't like the idea to install STS4 distribution, I prefer to build my Eclipse installation from scratch, just installing the plugins I want through update sites. I have been doing this for years.
First of all, the page at:
https://spring.io/tools
doesn't mention this possibility. You have to click on "User guide, installation instructions, FAQ" after scrolling the page a bit to get to:
https://github.com/spring-projects/sts4/wiki
and then, clicking on "Installation (latest release)" you get to:
https://github.com/spring-projects/sts4/wiki/Installation
Here, the guide talks about the existence of the update sites, but doesn't give any hint on what to install.
If in Eclipse I try to install software from that update site, I get the following categories:
These are a lot of categories! So, my first doubt was: what should I install??
Under "Spring Tool Suite 4 Distribution" there are "Spring Tool Suite 4 Main Feature" and "Spring Tool Suite 4 Branding Feature". The latter one sounds to me like pure "marketing" (perhaps logos, splash screens, whatever), so "Main Feature" sounds more appropriate. However, it's not clear to me which features I will get with it which I won't.
For instance, in Core / Eclipse Integrations there are:
Apart from the Quicksearch, which is a known component of its own, are the other needed? Will they be installed as part of the "STS4 Main Feature"?
The confusion is augmented by the fact that all these plugins are versioned as 3.9.10 (STS3?) rather than 4.3.1...
Also, in "Extensions / Spring IDE" I find:
For my use case (webapp with Spring and XML config) I think the last one is really needed, but what still confuses me is the version number (3.9.10), which makes me wonder whether that component is indeed the legacy STS3 XML config support component rather than the new one implemented in #108.
On the other hand, versions seem to be 4.3.1 for packages under "Spring Tool Suite 4 Language Server Integrations for Eclipse" category, but here again there are a lot of components which are not easy to understand from a user point of view: what do I need and what I don't? Package details don't help (they are simply equal to the package names, without any further details).
I know I'm following an "expert path", but I must confess it has never been so hard to understand what I should install and what I could omit with any other Eclipse plugin I tried so far. Indeed, it was much easier with STS3 itself to combine your own installation through the update site.
Using a JDK instead of a JRE to run Eclipse
The page at:
https://github.com/spring-projects/sts4/wiki/Known-Limitations-&-Issues
suggests that in order for some features to work, running Eclipse with a JDK instead of a JRE is required. However, is there a way to see if the requirement is satisfied? I mean, if I configure Eclipse to run with the
server.dll
library contained in thejre
folder of the JDK (which ensures better integration with the Windows process manager), does it satisfy the requirement?Example:
Using STS4 on an existing project
The user guide talks about how to create new Spring projects with the Starter projects. But I can't find any mention of what to do when you're dealing with an existing project. This is especially confusing when you come from STS3, where you had to configure a project nature and you could set up some project configuration like the list of XML Bean config files for your project, automatic detetction through classpath scanning and so on.
So, reading this:
https://stackoverflow.com/questions/49201689/enable-spring-project-nature-in-sts-4-to-fix-xml-schema-problems
I see that there's no Spring nature any more.
By the way, in my projects I had previously already removed the Spring nature because of the following problems in STS3:
So, with STS4 it seems like I should expect "everything" to work (I mean, the XML support features that were implemented) out of the box, without configuring anything on my project. Some clarifications in the User guide would have helped though. Especially because it seems like I have some issues with XML file schema validations: the above SO question was written at the times of STS 4.0, but now we're at 4.3.1 and from #108 I would expect STS4 to detect the latest shemas of Spring Integration from the classpath, but I have some validation errors like the following:
The error says:
cvc-complex-type.3.2.2: Attribute 'header-mapper' is not allowed to appear in element 'int-ws:outbound-gateway'.
, but I'm using Spring Integration 4.3.x which does support that attribute (all works fine at runtime).Again, in the above SO question Martin suggests to use versioned schemas in the namespace declarations, which is generally not recommended however.
The text was updated successfully, but these errors were encountered: