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

Odd behaviour, jacoco is required execute jlink #4

Open
vromero opened this issue Dec 12, 2017 · 1 comment
Open

Odd behaviour, jacoco is required execute jlink #4

vromero opened this issue Dec 12, 2017 · 1 comment

Comments

@vromero
Copy link

vromero commented Dec 12, 2017

This is a very unexpected behaviour, I was trying to use your example without your parent and found out that if the jacoco plugin is not present, jlink doesn't work.

To reproduce:

git clone https://github.com/vromero/jlink-jacoco-build.git
cd jlink-jacoco-build
mvn clean package

Observe the following:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.412 s
[INFO] Finished at: 2017-12-12T11:37:49-08:00
[INFO] Final Memory: 20M/485M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink (default-jlink) on project mod-jlink: Execution default-jlink of goal org.apache.maven.plugins:maven-jlink-plugin:3.0.0-alpha-1:jlink failed.: NullPointerException -> [Help 1]
[ERROR] 

Then edit pom.xml and uncomment the following block:

           <!-- Uncomment the following plugin to fix the build -->
            <!--plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.9</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin-->

And observe:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.493 s
[INFO] Finished at: 2017-12-12T11:39:19-08:00
[INFO] Final Memory: 21M/390M
[INFO] ------------------------------------------------------------------------
@MatthieuCoelho
Copy link

Same issue

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

No branches or pull requests

2 participants