JNPM icon indicating copy to clipboard operation
JNPM copied to clipboard

Adding the dependency results in RestTemplate GET-Requests to not work anymore.

Open Floge123 opened this issue 4 years ago • 1 comments

As the title says, adding the dependency in maven:

<dependency>
        <groupId>org.orienteer.jnpm</groupId>
        <artifactId>jnpm-maven-plugin</artifactId>
        <version>1.1</version>
</dependency>

results in may RestTemplate-Request to give me the error:

var response = this.restTemplate.exchange(
          url, HttpMethod.GET, new HttpEntity<>("parameters", getAuthorizationHeader()), returnType
      );

method GET must not have a request body.

This happens without using any methods, just by adding the dependency. Removing the dependency fixes this again.

Floge123 avatar Oct 29 '21 15:10 Floge123

@Floge123 , most probably, it's due to some problem with cross dependencies. Could you please share mvn dependency:tree ? Also I see that you are adding jnpm-maven-plugin not jnpm - could you please clarify: is jnpm-maven-plugin needed for your code directly? Are you working on some maven plugin which should use jnpm-maven-plugin?

PhantomYdn avatar Oct 29 '21 18:10 PhantomYdn