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

Make quietness of :check goal parameterized #16

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

pzygielo
Copy link
Contributor

I propose to introduce parameter to configure if :check shall be quiet (now it is).
New parameter defaults to true, so if not set explicitly old behaviour is observed.

It would allow to reduce build work, for example in client glassfish-build-maven-plugin:pom.xml#L176-L188: two goals are executed:

            <plugin>
                <groupId>org.glassfish.copyright</groupId>
                <artifactId>glassfish-copyright-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>copyright</goal>
                            <goal>check</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>

where :copyright reports violations (but does not fail the build), while :check does not report violations but fails the build in case there is any. The work of :check and :copyright is almost the same and done twice is such case.

public void execute() throws MojoExecutionException {
log = getLog();
Copyright c = new Copyright();
c.quiet = true;
initializeOptions(c);
check(c);
if (c.errors > 0) {
log.error("Errors: " + c.errors);
throw new MojoExecutionException("Copyright checking failed");
}
}
public void execute() throws MojoExecutionException {
log = getLog();
Copyright c = new Copyright();
initializeOptions(c);
check(c);
}

@pzygielo pzygielo marked this pull request as ready for review October 13, 2020 16:44
@senivam senivam merged commit 7be84ca into eclipse-ee4j:master Dec 8, 2020
@pzygielo pzygielo deleted the check/quiet branch December 8, 2020 07:41
@senivam senivam added this to the 2.4 milestone Dec 8, 2020
@pzygielo pzygielo mentioned this pull request Dec 8, 2020
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