0

I'm trying to apply the solutions (proper XML schema resolution) mentioned here which requires me to enable Spring project nature in an existing project in STS 4. According to this, there would be a Spring Tools context menu on which one can do “Spring Tools -> Add Spring Project Nature”. I'm not seeing that menu:

enter image description here

enter image description here

My .project file has the following already:

<natures>
        <nature>org.springframework.ide.eclipse.core.springnature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>org.eclipse.m2e.core.maven2Nature</nature>
        <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
    </natures>

What am I missing?

Update:

As per Martin's second comment, the following works:

<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:int="http://www.springframework.org/schema/integration"
    xmlns:int-jdbc="http://www.springframework.org/schema/integration/jdbc"
    xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    xsi:schemaLocation="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/integration http://www.springframework.org/schema/integration/spring-integration-5.0.xsd
       http://www.springframework.org/schema/integration/jdbc http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd
       http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd">
Simeon Leyzerzon
  • 18,658
  • 9
  • 54
  • 82
  • it's already a spring boot project. look at the [boot] next to the project name you've right-clicked on. i'm confused as to what you mean. –  Mar 09 '18 at 20:39
  • In order to see the Spring Tools context menu, you will need to install the Spring IDE plugin for Eclipse through the Marketplace. – Steve Mar 09 '18 at 20:39
  • @DieNerd: see that red squiggly underline under fixed-delay section? I'm trying to get rid of it as described in the first link I'm referring to. – Simeon Leyzerzon Mar 09 '18 at 20:49

1 Answers1

3

The Spring Nature feature that you are referring to doesn't exist anymore in the STS4 public beta that you seem to use. Therefore there is no "Spring" section in the context-menu anymore that offers the Spring Nature. It is not simply not needed anymore in STS4.

The question here is: What exactly are you trying to do in STS4 that doesn't work? If something is strange and missing in STS4 that you would like to see it getting back from STS3, you should raise an issue at https://github.com/spring-projects/sts4/issues and attach a sample project that reproduces the underlying issue. I would be happy to take a more detailed look then.

As a workaround, you can go back and download the latest STS 3.9.2 distribution and work from there, it still has all the old features included.

Martin Lippert
  • 5,988
  • 1
  • 15
  • 18
  • Hi Martin, thanks for confirming. As I explained in my answer to @DieNerd, I'm trying to remove the IDE's erroneous reaction to the `` stanza. It doesn't recognize the `fixed-delay` part, and according to the links I mentioned of the question ensuring the Spring nature in the project would help resolving those schema issues. I'm on Version: 4.0.0.M7 Build Id: 201712141343 by the way. Here's the wording of the message: `cvc-complex-type.3.2.2: Attribute 'fixed-delay' is not allowed to appear in element 'int:poller'.` Not sure if it's a bug or not. – Simeon Leyzerzon Mar 10 '18 at 14:40
  • but surely would be nice not to have those error markings in Eclipse. I updated the original question a bit more to highlight what I am after. Thanks. – Simeon Leyzerzon Mar 10 '18 at 14:45
  • As another workaround, you can specify the exact version of the schema in your XML file, so instead of pointing to https://www.springframework.org/integration/spring-integration.xsd you could point to https://www.springframework.org/integration/spring-integration-5.0.xsd (or whatever version of Spring Integration you are using). This will allow the IDE to resolve the schema from that HTTP location. The resolution of those schemas from the classpath of the project is not (yet) pasrt of STS4 (but included in STS3). – Martin Lippert Mar 12 '18 at 08:24