Skip to content

Use new version of site and thoughts about new release#1

Closed
KroArtem wants to merge 1 commit intoapache:masterfrom
KroArtem:update-jdk-cleanup-code
Closed

Use new version of site and thoughts about new release#1
KroArtem wants to merge 1 commit intoapache:masterfrom
KroArtem:update-jdk-cleanup-code

Conversation

@KroArtem
Copy link
Copy Markdown
Contributor

@KroArtem KroArtem commented Jan 9, 2020

[description is a wip]

  • Cleanup code to align with java8 features

  • Mark VerificationResultPrinter as a @FunctionalInterface

  • Use java8

  • Update dependencies

Cleanup code to align with java8 features

Mark VerificationResultPrinter as a @FunctionalInterface

Use java8

Update dependencies
Copy link
Copy Markdown
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are too many different changes here:

  • Plugin updates must be separate
  • Java update must be advertised separately, at least a minor version bump is required
  • Java 7 style code separately

Please start with these, we will go on with the rest afterwards.

@KroArtem
Copy link
Copy Markdown
Contributor Author

KroArtem commented Jan 9, 2020

Yes, I know the changes are altogether in one PR but it's a sample PR. I've already sent a message on dev@maven.apache.org regarding this plugin. To summarize:

  1. Previous version was released in 2015
  2. Previous version has old site https://maven.apache.org/plugins/maven-verifier-plugin/
  3. Java version is set to 1.7. Is it indeed reasonable when current maven requires 1.8?
  4. According to mvnrepository, it's used only in two artifacts, is it worth supporting? https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-verifier-plugin/usages

@michael-o
Copy link
Copy Markdown
Member

Hard to tell, the dependent ones haven't been updates for years -- nor they cared for this plugin to be updated. I'd rather discontinue this plugin. We have verify.bsh or verify.groovy.

@KroArtem
Copy link
Copy Markdown
Contributor Author

Let's wait for developer community replies then.

Copy link
Copy Markdown
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of this is good, especially updating dependencies, but personally I find adding lambdas to be a step backwards for readability. Others may feel differently. In general it's easier to move changes forward when they're split into smaller, more focused PRs, each of which does exactly one kind of thing.


Reader reader = null;
try
try ( Reader reader = new FileReader( this.verificationFile ) )
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not changed in this PR, but this is likely a bug. There's no specified character set

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. There are no open issues about it, though, and according to this answer there is no possibility to set encoding for FileReader until Java 11. https://stackoverflow.com/questions/696626/java-filereader-encoding-issue
(another way still exists, though)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is why code shouldn't use FileReader. It's a bad API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread pom.xml
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.0</version>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there wasn't a version here before you probably don't want it now. I'd guess it's supplied by thedependencyManagement section of a parent or some such thing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I didn't find out any information about this.

@slachiewicz
Copy link
Copy Markdown
Member

thx for contribution. I've created https://issues.apache.org/jira/browse/MVERIFIER-36 for that and selected only changes related to move to Java 7 and code cleanup.
Other changes look not so critical for this small plugin so let not try to upgrade to Java 8.

I've also checked where we use that plugin ... and there is no big demand for it. We use it only in the integration suite and that's good reason to release version 3.0.0 and drop Maven 2 compatibility. Even if we then retie plugin.

@asfgit asfgit closed this in 1330656 Jan 10, 2020
@slachiewicz
Copy link
Copy Markdown
Member

The build was successful - code merged to master. Thx. Let's continue the discussion about the release on the mailing list.

@KroArtem
Copy link
Copy Markdown
Contributor Author

@slachiewicz , thanks! Is there any reason to leave Java 7 version?

@slachiewicz
Copy link
Copy Markdown
Member

No real benefits thanks to the Java 8 upgrade for this small plugin.

And if we update only this plugin, it will be useful only for the basic Maven project (where we do not use it) and until we upgrade other plugins to a higher version of Java - we can not use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants