-
Notifications
You must be signed in to change notification settings - Fork 7
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
[MSHARED-1090] Update module #11
Conversation
Update module: * parent to POM 36 * Maven level to 3.2.5 * Java level to 8 * drop m-shared-utils * drop legacy APIs like plexus logger
This change should probably bump the minor version. |
Of course, but did not want to mix the two (there are a LOT of other changes already requiring it) |
Hm, maybe we need NoopMessageSink to retain existing behaviour with defautl ctor... as now it will use sl4j logger and this is behaviour change from before when def ctor used. |
Where is this module still used? |
maven-jar-plugin for sure, unsure for others, but gh search reveals a LOT of uses across many (non our) plugins |
Why do you I have the feeling that I have seen this with Plexus Utils too?! |
Maybe we can just switch to pure slf4j? |
This is "already seen" to me as well, no idea where but really looks familiar... |
As @slachiewicz said - why not use slf4j? There is changed from plexus Logger to slf4j Logger so change will be incompatible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, can we throw out this ugly wrapper around wrappe around SLF4J even if we need to bump the major version?!
Tidied up completely |
* @param log The mojo log instance | ||
*/ | ||
public FileSetManager( Log log ) | ||
public FileSetManager( Logger logger, boolean verbose ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this ctor should be deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disagree, this ctor controls what logger this class will use and verbosity (not level)
*/ | ||
public FileSetManager( Logger log ) | ||
public FileSetManager( Logger logger ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this ctor should be deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disagree, this ctor controls what logger this class will use.
@@ -285,18 +241,18 @@ public void delete( FileSet fileSet, boolean throwsError ) | |||
{ | |||
if ( fileSet.isFollowSymlinks() || !isSymlink( file ) ) | |||
{ | |||
if ( verbose && messages != null ) | |||
if ( verbose ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This completely circumvents log levels
} | ||
|
||
removeDir( file, fileSet.isFollowSymlinks(), throwsError, warnMessages ); | ||
} | ||
else | ||
{ // delete a symlink to a directory without follow | ||
if ( verbose && messages != null ) | ||
if ( verbose ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -316,9 +272,9 @@ public void delete( FileSet fileSet, boolean throwsError ) | |||
} | |||
else | |||
{ | |||
if ( verbose && messages != null ) | |||
if ( verbose ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -380,9 +336,9 @@ private Set<String> findDeletablePaths( FileSet fileSet ) | |||
|
|||
private Set<String> findDeletableDirectories( FileSet fileSet ) | |||
{ | |||
if ( verbose && messages != null ) | |||
if ( verbose ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -398,31 +354,31 @@ private Set<String> findDeletableDirectories( FileSet fileSet ) | |||
|
|||
if ( !fileSet.isFollowSymlinks() ) | |||
{ | |||
if ( verbose && messages != null ) | |||
if ( verbose ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -437,9 +393,9 @@ private Set<String> findDeletableDirectories( FileSet fileSet ) | |||
|
|||
private Set<String> findDeletableFiles( FileSet fileSet, Set<String> deletableDirectories ) | |||
{ | |||
if ( verbose && messages != null ) | |||
if ( verbose ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -455,31 +411,31 @@ private Set<String> findDeletableFiles( FileSet fileSet, Set<String> deletableDi | |||
|
|||
if ( !fileSet.isFollowSymlinks() ) | |||
{ | |||
if ( verbose && messages != null ) | |||
if ( verbose ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
re verbose: disagree. This is "verbose", will tell more, that's all. Log level is INFO |
verbose is orthogonal to log level. That's all IMHO |
General: this is a utility class, is NOT a component. |
Update module:
https://issues.apache.org/jira/browse/MSHARED-1090