spring-attic / jdbc

Apache License 2.0
11 stars 18 forks source link

Add Boot 2.0 compatibility #18

Closed rhockman closed 6 years ago

rhockman commented 6 years ago

When I perform the following:

git clone https://github.com/spring-cloud-stream-app-starters/jdbc && cd jdbc && ./mvnw clean package

I receive the following error message:

Running version check
The found version is [2.0.0.BUILD-SNAPSHOT]
Deactivating "milestone" profile for version="2.0.0.BUILD-SNAPSHOT"
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'build.plugins.plugin.version' for org.springframework.cloud.stream.app.plugin:spring-cloud-stream-app-maven-plugin is missing. @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-source-jdbc:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-source-jdbc/pom.xml, line 75, column 12
[ERROR] 'dependencies.dependency.version' for org.springframework.integration:spring-integration-java-dsl:jar is missing. @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-source-jdbc:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-source-jdbc/pom.xml, line 16, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.cloud.stream.app:jdbc-app-starters-common:jar -> duplicate declaration of version (?) @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-jdbc:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-sink-jdbc/pom.xml, line 59, column 15
[WARNING] 'build.plugins.plugin.version' for org.springframework.cloud.stream.app.plugin:spring-cloud-stream-app-maven-plugin is missing. @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-jdbc:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-sink-jdbc/pom.xml, line 71, column 12
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.boot:spring-boot-starter-jdbc:jar -> duplicate declaration of version (?) @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-pgcopy:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-sink-pgcopy/pom.xml, line 28, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.cloud.stream.app:jdbc-app-starters-common:jar -> duplicate declaration of version (?) @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-pgcopy:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-sink-pgcopy/pom.xml, line 37, column 15
[WARNING] 'build.plugins.plugin.version' for org.springframework.cloud.stream.app.plugin:spring-cloud-stream-app-maven-plugin is missing. @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-pgcopy:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-sink-pgcopy/pom.xml, line 49, column 12
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.springframework.cloud.stream.app:spring-cloud-starter-stream-source-jdbc:2.0.0.BUILD-SNAPSHOT (/Users/ronhockman/code/jdbc/spring-cloud-starter-stream-source-jdbc/pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for org.springframework.integration:spring-integration-java-dsl:jar is missing. @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-source-jdbc:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-source-jdbc/pom.xml, line 16, column 15
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
artembilan commented 6 years ago

You should run mvn clean install -PgenerateApps instead: https://docs.spring.io/spring-cloud-stream-app-starters/docs/Celsius.RELEASE/reference/html/_introduction.html#_building_the_artifacts

rhockman commented 6 years ago

When I run: mvn clean install -PgenerateApps

Running version check
The found version is [2.0.0.BUILD-SNAPSHOT]
Deactivating "milestone" profile for version="2.0.0.BUILD-SNAPSHOT"
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.springframework.integration:spring-integration-java-dsl:jar is missing. @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-source-jdbc:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-source-jdbc/pom.xml, line 16, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.cloud.stream.app:jdbc-app-starters-common:jar -> duplicate declaration of version (?) @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-jdbc:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-sink-jdbc/pom.xml, line 59, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.boot:spring-boot-starter-jdbc:jar -> duplicate declaration of version (?) @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-pgcopy:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-sink-pgcopy/pom.xml, line 28, column 15
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.cloud.stream.app:jdbc-app-starters-common:jar -> duplicate declaration of version (?) @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-pgcopy:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-sink-pgcopy/pom.xml, line 37, column 15
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.springframework.cloud.stream.app:spring-cloud-starter-stream-source-jdbc:2.0.0.BUILD-SNAPSHOT (/Users/ronhockman/code/jdbc/spring-cloud-starter-stream-source-jdbc/pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for org.springframework.integration:spring-integration-java-dsl:jar is missing. @ org.springframework.cloud.stream.app:spring-cloud-starter-stream-source-jdbc:[unknown-version], /Users/ronhockman/code/jdbc/spring-cloud-starter-stream-source-jdbc/pom.xml, line 16, column 15
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
artembilan commented 6 years ago

Please, edit your comment properly: https://help.github.com/articles/basic-writing-and-formatting-syntax/.

It's hard to read it.

Thanks

rhockman commented 6 years ago

Updated.

artembilan commented 6 years ago

OK. I see the apps have been upgraded to Spring Cloud 2.0. Cool!

But that means that spring-integration-java-dsl dependency is not needed any more.

So, this is a bug, although it doesn't help so easy. We have some other inconsistency with the Spring Boot...

sobychacko commented 6 years ago

There are some ongoing efforts happening at the moment to fix some of the issues in the 2.0 version. In the meantime, is it an option for you to check out the 1.3.x branch?

artembilan commented 6 years ago

Great, @sobychacko !

Is there someone busy with this jdbc app starter project? Or may I go ahead with the fix on the matter?

rhockman commented 6 years ago

Is the 1.3 branch compatible with Spring Boot 2.0.0.M7 and the Spring Cloud Finchley.M5?

I tried earlier today and it didn't seem to be compatible, hence my trying 2.0

sobychacko commented 6 years ago

@artembilan please go ahead! @rhockman 1.3.x branch is not compatible with 2.0.0 boot, its still based on 1.5.x boot.

artembilan commented 6 years ago

This cannot be fixed until: https://github.com/spring-cloud/spring-cloud-stream/issues/1170.