Skip to content

Minor Updates to pom.xml - #16

Merged
hiranya911 merged 1 commit into
masterfrom
hkj-pom-update
Apr 21, 2017
Merged

Minor Updates to pom.xml#16
hiranya911 merged 1 commit into
masterfrom
hkj-pom-update

Conversation

@hiranya911

@hiranya911 hiranya911 commented Apr 21, 2017

Copy link
Copy Markdown
Contributor

Some minor changes to pom.xml based on today's release experience.

Adding a flag to disable unit tests and integration tests separately

  • -DskipITs (skips integration tests; flag provided by maven failsafe plugin)
  • -DskipUTs (skips unit tests; custom flag added to pom.xml)

Also the failsafe plugin knows to look for *IT.java tests. We don't have to explicitly mention it in the pom.

Skipping integration tests in the release profile

Maven-based release is conducted in 2 main steps:

  • mvn release:prepare
  • mvn release:perform

The prepare step builds and runs all tests (both unit and integration) before tagging the source in GitHub. The perform step grabs the source from the tag, and proceeds to build and test it again. Therefore we end up running the integration test suite twice during the release process which is redundant and takes time. This PR sets the skipITs flag in the release profile which essentially skips integration tests during release:perform.

…tegration tests during release:perform (they are executed once in release:prepare)

@mikelehen mikelehen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM though consider using a more verbose flag name.

Comment thread .github/CONTRIBUTING.md

```
mvn verify -Dfirebase.it.certificate=path/to/your/serviceAccount.json -Dskip.surefire.tests=true
mvn verify -Dfirebase.it.certificate=path/to/your/serviceAccount.json -DskipUTs

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this an existing convention? Or could we spell this out as skipUnitTests (which I think would be much clearer)? :-)

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.

Maven failsafe plugin which is in charge of running integration tests supports a skipITs flag out of the box. I thought we could support a similarly named flag for skipping unit tests. WDYT?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

OK, cool. If it's an existing convention I'm fine with it.

@hiranya911
hiranya911 merged commit 245f64d into master Apr 21, 2017
@hiranya911
hiranya911 deleted the hkj-pom-update branch April 21, 2017 18:32
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.

2 participants