Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Modified configuration in order to work with java 11 #25

Merged

Conversation

fborriello
Copy link
Contributor

  • Modified cobertura-maven-plugin configuration in order to be not inherited by submodules.
  • Updated jacoco-maven-plugin version to 0.8.2 (was 0.8.1)..
  • Updated maven-compiler-plugin version to 3.8.0 (was 3.7.0)..
  • Added maven-compiler-plugin option in order to add constructor parameter's names to compiled classes.
  • Updated jdk version to 1.8 (was 1.7)..

…inherited by submodules.

- Updated `jacoco-maven-plugin` version to 0.8.2 (was 0.8.1)..
- Updated `maven-compiler-plugin` version to 3.8.0 (was 3.7.0)..
- Added `maven-compiler-plugin` option in order to add constructor parameter's names to compiled classes.
- Updated `jdk` version to 1.8 (was 1.7)..
@massdosage massdosage requested a review from a team January 24, 2019 09:35
CHANGELOG.md Outdated
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [2.3.6] - 2019-01-24
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't fill in the number or date until we know for sure what these are going to be, so you can set these both to "TBD" for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks

CHANGELOG.md Outdated
- Updated `jacoco-maven-plugin` version to 0.8.2 (was 0.8.1)..
- Updated `maven-compiler-plugin` version to 3.8.0 (was 3.7.0)..
- Added `maven-compiler-plugin` option in order to add constructor parameter's names to compiled classes.
- Updated `jdk` version to 1.8 (was 1.7)..
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a backwards incompatible change for some downstream users so we should go with a major version bump of this pom to 3.0.0. Can you also put this line up at the top as the first line so people are more likely to notice it as this is the biggest change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks

CHANGELOG.md Outdated
## [2.3.6] - 2019-01-24
### Changed
- Modified `cobertura-maven-plugin` configuration in order to be not inherited by submodules.
- Updated `jacoco-maven-plugin` version to 0.8.2 (was 0.8.1)..
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the extra period at the end, same for next line and line 13.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -114,6 +114,7 @@
<target>${jdk.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<showWarnings>true</showWarnings>
<parameters>true</parameters>
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this do and why is it needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By default, the java compiler substitutes the constructor's parameter's names with arg0, arg1, etc. With this option, the parameter's names are kept.
For instance, given the following constructor:

public Foo(final String name, final BigInteger id) {
        this.name = name;
        this.id = id;
}

without that option will look like:

public Foo(final String arg0, final BigInteger arg1) {
        this.name = arg0;
        this.id = arg1;
}

witht that option enabled will look like:

public Foo(final String name, final BigInteger id) {
        this.name = name;
        this.id = id;
}

I've added it to parent pom as, this helps a lot the class injection from various bean mapping frameworks available on the web: such as BULL, Jackson, etc.
So coming back to your question, this is not strictly related to the Cobertura issue fix

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I didn't know that but it sounds like a useful change.

pom.xml Outdated
@@ -135,6 +136,7 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>${cobertura.maven.plugin.version}</version>
<inherited>false</inherited>
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this just means this plugin isn't available for use in child projects right? So then it would only apply to this parent module where it's irrelevant since this is a pom with no Java code or tests to report coverage on. So I think we should either just remove it entirely (which I'm fine with) or we look into using to control how its used downstream.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right, so as it's fine with you, I removed it and added this change to the changelog.

@@ -114,6 +114,7 @@
<target>${jdk.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<showWarnings>true</showWarnings>
<parameters>true</parameters>
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I didn't know that but it sounds like a useful change.

CHANGELOG.md Show resolved Hide resolved
Copy link
Contributor

@massdosage massdosage left a comment

Choose a reason for hiding this comment

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

Actually, we still need cobertura available as a plugin, just not a reporting plugin

pom.xml Outdated
@@ -39,17 +39,15 @@

<properties>
<buildnumber.maven.plugin.version>1.4</buildnumber.maven.plugin.version>
<cobertura.version>2.1.1</cobertura.version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you put this back, I mean to just remove it from the reporting section. I think having the normal plugin in the pluginManagement section is fine, if you don't want to use it downstream then you don't have to. If we remove it entirely from here we'll have to change quite a few downstream projects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thanks

pom.xml Outdated
@@ -131,27 +130,6 @@
</archive>
</configuration>
</plugin>
<plugin>
Copy link
Contributor

Choose a reason for hiding this comment

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

Put this one back.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -517,20 +495,6 @@
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep this one removed as this was causing the issue with mvn:site and we don't use this in any downstream projects so it won't have any impact.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thanks

Copy link
Contributor Author

@fborriello fborriello left a comment

Choose a reason for hiding this comment

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

Changed

CHANGELOG.md Outdated
- Removed `cobertura-maven-plugin`, from reporting sections, as it's not compatible with JDK versions greater than 1.8.
- Updated `maven-compiler-plugin` version to 3.8.0 (was 3.7.0).
- Updated `jacoco-maven-plugin` version to 0.8.2 (was 0.8.1).
- Added `maven-compiler-plugin` option in order to add constructor parameter's names to compiled classes.
Copy link
Contributor

Choose a reason for hiding this comment

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

"constructor parameter's" -> constructor parameters' (if you mean more than one constructor parameter)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thanks

@AnanaMJ
Copy link
Contributor

AnanaMJ commented Jan 24, 2019

Does mvn site work locally for you? For me it doesn't, but maybe I set up some things incorrectly.

@fborriello
Copy link
Contributor Author

Does mvn site work locally for you? For me it doesn't, but maybe I set up some things incorrectly.

yes it does for me

@fborriello fborriello closed this Jan 24, 2019
@massdosage massdosage reopened this Jan 24, 2019
@massdosage
Copy link
Contributor

OK, so I tested this locally and can confirm that it works for me.

@massdosage massdosage merged commit 73467b2 into HotelsDotCom:master Jan 24, 2019
@fborriello fborriello deleted the feature/make-cobertura-optional branch June 25, 2019 08:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants