-
Notifications
You must be signed in to change notification settings - Fork 106
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
Update apps generator plugin dependencies #593
Update apps generator plugin dependencies #593
Conversation
This commit updates all library and plugin dependencies in the `spring-cloud-dataflow-apps-plugin` modules to the latest versions. Additionally: - performs a general cleanup of build and README files. - updates to maven 3.9.9 Resolves spring-cloud#498
@@ -1,2 +1,20 @@ | |||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip | |||
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar | |||
# Licensed to the Apache Software Foundation (ASF) under one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the wrapper and maven to 3.9.9
@@ -3,41 +3,44 @@ | |||
<modelVersion>4.0.0</modelVersion> | |||
<groupId>org.springframework.cloud</groupId> | |||
<artifactId>spring-cloud-dataflow-apps-plugin-parent</artifactId> | |||
<version>1.0.15-SNAPSHOT</version> | |||
<version>1.1.0-SNAPSHOT</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping up minor version to indicate the dependency updates
@@ -418,14 +418,14 @@ public Manifest getManifest() { | |||
} | |||
|
|||
@Override | |||
public List<Archive> getNestedArchives(EntryFilter ignored) throws IOException { | |||
public Iterator<Archive> getNestedArchives(EntryFilter ignored, EntryFilter ignored2) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API change in Maven
String result = writer.toString(); | ||
return result.substring(result.indexOf('\n') + 1); // remove first line (e.g. remove the <?xml ... ?>) | ||
// Strip the namespace info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version of MXSerializer
handles generated xml a bit different. This impl has been improved to look for the actual tag, not the 1st newline character for parsing.
@@ -168,6 +173,9 @@ public static <T> void invokeMavenXppWriteMethod(T modelElementToWrite, String w | |||
public static String indent(String input, int indentation) { | |||
String indentPrefix = "\n" + IntStream.range(0, indentation).mapToObj(i -> " ").collect(Collectors.joining()); | |||
String indentedInput = input.replace("\n", indentPrefix); | |||
return indentedInput.substring(0, indentedInput.lastIndexOf(indentPrefix)); // remove the last empty line. | |||
if (input.endsWith(indentPrefix)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to comment above, more lenient processing.
void httpSourceAppsGeneration() throws Exception { | ||
File pomRoot = new File("src/test/resources/unit/http-source-apps"); | ||
MavenProject project = readMavenProject(pomRoot); | ||
SpringCloudStreamAppGeneratorMojo myMojo = (SpringCloudStreamAppGeneratorMojo) super.lookupConfiguredMojo(project, "generate-app"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no Junit5 replacement for the Mojo Junit5 rule. HOWEVER, the AbstractMojoTestCase
has what we need but we have to jump through some hoops in readMavenProject
to get an actual project object to then pass into super.lookupConfiguredMojo
.
<version>3.15.0</version> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-dataflow-configuration-metadata</artifactId> | ||
<version>2.11.5</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is way less than ideal. However, it was previously hardcoded to 2.7.0
so just updated to 2.11.5
for now. Need to figure out how to detangle this bidrectional dependency (apps plugin needs SCDF and SCDF needs apps plugin).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot tell that I understood too much from the change, but mostly it is really OK.
Just a couple nit-picks from me.
Thanks
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright 2019-2020 the original author or authors. | |||
* Copyright 2019-2024 the original author or authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these couple classes updates are bogus.
What do I miss?
Why would one update just a copyright year?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically I would not just update the copyright like this but I was basically brining this repo up-to-date for everything I could find that was outdated. I figured I would catch up the copyrights as well.
<version>2.0.0.BUILD-SNAPSHOT</version> | ||
|
||
<artifactId>spring-cloud-dataflow-apps-metadata-plugin</artifactId> | ||
<version>1.0.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really expected to have 1.0.0
here as a version, but not the mentioned above 1.1.0-SNAPSHOT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Will update
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright 2017-2020 the original author or authors. | |||
* Copyright 2017-2024 the original author or authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DITTO - bogus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #593 (comment)
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright 2018-2020 the original author or authors. | |||
* Copyright 2018-2024 the original author or authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And again 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #593 (comment)
- Use `1.1.0-SNAPSHOT` as version in metadata plugin README.adoc to be consistent w/ other examples
I have no idea what is that CI build failure:
|
Digging in.. |
@artembilan this 5cce183#diff-56d907718f7f9fbb26e09bddd3723c4ba7782bf2eaf3b8f22781f2a66df9701bR43 fixed it Something has changed on Artifactory where the server id used to generate the token was "repo.spring.io" but is now different per group of projects (e.g. it is now |
This commit updates all library and plugin dependencies in the
spring-cloud-dataflow-apps-plugin
modules to the latest versions.Additionally:
Resolves #498