Skip to content
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

Solves issue 94 #95

Merged
merged 11 commits into from
Oct 8, 2020
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ target/
.factorypath
.project
.settings
/bin/
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ jdk:
sudo: false # faster builds

script:
- "mvn clean verify jacoco:report -Prun-it"
- "mvn clean verify jacoco:report jacoco:report-integration -Pquality -Pparallel"
after_success:
- "mvn coveralls:report"
- "mvn coveralls:report -Pquality"
64 changes: 59 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ documentation from the default lifecycle with the asciidoctor-maven-plugin.
In this section I will tell you the most recent changes.
This section will disappear with the final release.

.2020/10/08
* Added ```asciidoctor-prepare-resources``` phase before ```asciidoctor-theme```
* Added ```asciidoctor-verify``` phase after ```asciidoctor-post-publish``` phase.
* Renamed ```asciidoctor-prepare-convert``` to ```asciidoctor-pre-convert```.
* Renamed ```asciidoctor-prepare-notify``` to ```asciidoctor-pre-notify```.
* Renamed ```asciidoctor-prepare-publish``` to ```asciidoctor-pre-publish```.
* Renamed ```asciidoctor-prepare-theme``` to ```asciidoctor-pre-theme```.
* Renamed ```PrepareSourcesMojo.java``` to ```CopySourcesMojo.java``` (and integration test related files).
* Takari tests were replaced with https://github.com/khmarbaise/maven-it-extension[Integration Testing Framework].
* JUnit4 was replaced with https://junit.org/junit5/[JUnit5] and AssertJ.
* Some tests now owns their own IT class.
* Removed one ignored test (publishWithProxy) and one redundant test (publishWithoutProxy).
* Now tests can be executed in parallel with ```-Pparallel```.
* Now jacoco execution is optional. You can enable it with ```-Pquality```.

.2020/04/23
* Files `README.adoc` and `lifecycle.adoc` updated.
* Added phases `asciidoctor-prepare-notify` and `asciidoctor-notify`.
Expand Down Expand Up @@ -150,14 +165,14 @@ without the use of profiles. These are the phases of this lifecycle (in sequenti
[%header%autowidth.spread,cols="h,,"]
|===
|Phase |Description |Mojo
|asciidoctor-prepare-theme |Prepare the theme download. |
|asciidoctor-pre-theme |Prepare the theme download. |
|asciidoctor-theme |In this phase the themes are downloaded from remote repositories,
if required, unzipped and copying common resources to a folder. | ThemeMojo
|asciidoctor-prepare-convert |Actions required before the asciidoctor conversion. |
|asciidoctor-pre-convert |Actions required before the asciidoctor conversion. |
|asciidoctor-convert |The `process-asciidoc` is attached to this phase, to build the documentation. |
|asciidoctor-prepare-publish |Actions required before publishing documents. |
|asciidoctor-pre-publish |Actions required before publishing documents. |
|asciidoctor-publish |Publishing generated content in a remote webdav server, a local filesystem... | PublishMojo
|asciidoctor-prepare-notice |Actions required before notifying users new documentation version. |
|asciidoctor-pre-notice |Actions required before notifying users new documentation version. |
|asciidoctor-notice |Actions required for notifying users new documentation version. |
|===

Expand Down Expand Up @@ -559,6 +574,8 @@ with credentials to publishing the files to the server.

== How can I build the plugin?

=== Conventional build

You can build the project with Maven [3.3.9,4.0) versions and Java 8.

[source,shell]
Expand All @@ -567,7 +584,44 @@ mvn clean package
You can launch the integration tests:

[source,shell]
mvn -Prun-it clean integration-test
mvn clean verify -Prun-it

=== Run tests in parallel

The profile with `id=parallel` allows running tests in parallel,
so you can launch the tests as:

[source,shell]
mvn clean test -Pparallel

or

[source,shell]
mvn clean verify -Pparallel

=== Measure coverage

The profile with `id=quality` configure some additional actions,
such as measuring coverage and submitting Java code coverage to the coveralls service.

[source,shell]
mvn clean verify -Pparallel -Pquality

== Warnings

Tests were redesigned using JUnit5 to run in CONCURRENT mode, so the reports are affected by the bug
https://issues.apache.org/jira/browse/SUREFIRE-1643[JUnit 5 in parallel execution mode confuses Surefire reports].

So please, ignore for the moment the wrong number of tests in surefire report, like:

[source]
----
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.214 s - in com.coutemeier.maven.plugins.asciidoctor.lifecycle.util.ZipUtilTestCase
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.266 s - in com.coutemeier.maven.plugins.asciidoctor.lifecycle.util.FileUtilTestCase
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.21 s - in com.coutemeier.maven.plugins.asciidoctor.lifecycle.util.ArtifactUtilOtherTestCase
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.418 s - in com.coutemeier.maven.plugins.asciidoctor.lifecycle.util.ArtifactUtilTestCase
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.925 s - in com.coutemeier.maven.plugins.asciidoctor.lifecycle.util.WagonUtilTestCase
----

== References

Expand Down
15 changes: 0 additions & 15 deletions lifecycle.adoc

This file was deleted.