Skip to content

Conversation

@ercpe
Copy link
Contributor

@ercpe ercpe commented Feb 27, 2019

…og spam when using a shared missing file

#201

…reduce log spam when using a shared missing file
Copy link
Contributor

@ppalaga ppalaga left a comment

Choose a reason for hiding this comment

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

The proposed solution eliminates the warnings also for users that want to see them and I cannot accept it like this. I propose to solve the issue by adding a parameter much like we did in AbstractDownloadLicensesMojo

/**
* What to do on any license download related error. The possible values are:
* <li>
* <ul>{@link ErrorRemedy#ignore}: all errors are ignored</ul>
* <ul>{@link ErrorRemedy#warn}: all errors are output to the log as warnings</ul>
* <ul>{@link ErrorRemedy#failFast}: a {@link MojoFailureException} is thrown on the first download related
* error</ul>
* <ul>{@link ErrorRemedy#xmlOutput}: error messages are added as {@code <downloaderMessages>} to
* {@link AbstractDownloadLicensesMojo#licensesErrorsFile}; in case there are error messages, the build will
* fail after processing all dependencies</ul>
* </li>
* @since 1.18
*/
@Parameter( property = "license.errorRemedy", defaultValue = "warn" )
protected ErrorRemedy errorRemedy;

I'd recommend to add your own ErrorRemedy-like enum that would initially contain just warn (default) and ignore so that you not need to implement the other options we have in AbstractDownloadLicensesMojo.

Do not forget to add an integration test.

@guidograzioli
Copy link

I'm interested in this change, is anybody currently working on it? Happy to help otherwise

…ugin into 201-reduce-log-level

# Conflicts:
#	src/main/java/org/codehaus/mojo/license/api/DefaultThirdPartyTool.java
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typo throughout the change Unkown -> Unknown

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably cleaner to hand id down to handleUnkownDependency instead of passing the log message around.

@wuwu2000
Copy link
Contributor

wuwu2000 commented Mar 3, 2020

postbuild integration tests seem to run not 100% stable -,.-

@wuwu2000
Copy link
Contributor

wuwu2000 commented Mar 4, 2020

can someone tell me why some builds fail randomly?

@wuwu2000
Copy link
Contributor

@ppalaga Could you see why this jdk7 build fails please?

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.

4 participants