spring-projects / spring-integration-samples

You are looking for examples, code snippets, sample applications for Spring Integration? This is the place.

Home Page:http://www.springsource.org/spring-integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to import and compile the project locally

jialigit opened this issue · comments

I encountered an issue when importing this repo(main branch) into my IDE(IDEA).

I want to know how to import and compile this project in my IDEA.

Do I need to install something before?
I Used IDEA - IntelliJ IDEA 2021.3.2 (Community Edition)

My question:
what the java version required for this project?
Do I have to install gradle first and configure it in the IDE?
Hope this can be seen in the README if this is a issue.

I right click the gradlew, in the context menu:

image

then the terminal output the following stack trace.
as the stack trace said:
problem occurred configuring root project 'spring-integration-samples'.

Could not resolve all files for configuration ':classpath'.
Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT.
Required by:
project :
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT:20220407.074752-399 was found. The consumer was configu
red to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.4.1' but:
- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4.1')
- Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4.1')
- Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.0-SNAPSHOT declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4.1')
- Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.0-SNAPSHOT declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4.1')
- Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4.1')
- Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-SNAPSHOT declares a runtime of a component, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '7.4.1')
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 14s

Yes, the latest main is based on Spring 6 and Java 17 already.
No, you don't need to install Gradle: the IDEA can do the proper importing based on the Gradle Wrapper presented in the project.

I will update the README respectively.

Thanks