Skip to content

Commit cf708a3

Browse files
[MCHECKSTYLE-447] Bump org.codehaus.plexus:plexus-resources from 1.1.0 to 1.3.0 (#129)
- [Release notes](https://github.com/codehaus-plexus/plexus-resources/releases) - [Commits](codehaus-plexus/plexus-resources@plexus-resources-1.1.0...plexus-resources-1.3.0) ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Sylwester Lachiewicz <[email protected]>
1 parent 34fcf3e commit cf708a3

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

pom.xml

+1-7
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,7 @@ under the License.
159159
<dependency>
160160
<groupId>org.codehaus.plexus</groupId>
161161
<artifactId>plexus-resources</artifactId>
162-
<version>1.1.0</version>
163-
<exclusions>
164-
<exclusion>
165-
<groupId>org.codehaus.plexus</groupId>
166-
<artifactId>plexus-container-default</artifactId>
167-
</exclusion>
168-
</exclusions>
162+
<version>1.3.0</version>
169163
</dependency>
170164
<dependency>
171165
<groupId>org.codehaus.plexus</groupId>

src/main/java/org/apache/maven/plugins/checkstyle/resource/LicenseResourceManager.java

+14-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package org.apache.maven.plugins.checkstyle.resource;
2020

21+
import javax.inject.Inject;
22+
2123
import java.util.Map;
2224

2325
import org.codehaus.plexus.component.annotations.Component;
@@ -28,6 +30,8 @@
2830
import org.codehaus.plexus.resource.loader.ResourceLoader;
2931
import org.codehaus.plexus.resource.loader.ResourceNotFoundException;
3032
import org.codehaus.plexus.resource.loader.ThreadContextClasspathResourceLoader;
33+
import org.slf4j.Logger;
34+
import org.slf4j.LoggerFactory;
3135

3236
/**
3337
* License resource manager, to avoid defaulting license to maven-checkstyle-plugin's own license.
@@ -37,9 +41,16 @@
3741
@Component(role = ResourceManager.class, hint = "license", instantiationStrategy = "per-lookup")
3842
public class LicenseResourceManager extends DefaultResourceManager {
3943

44+
private static final Logger LOGGER = LoggerFactory.getLogger(LicenseResourceManager.class);
45+
4046
@Requirement(role = ResourceLoader.class)
4147
private Map<String, ResourceLoader> resourceLoaders;
4248

49+
@Inject
50+
public LicenseResourceManager(Map<String, ResourceLoader> resourceLoaders) {
51+
super(resourceLoaders);
52+
}
53+
4354
@Override
4455
public void addSearchPath(String id, String path) {
4556
ResourceLoader loader = resourceLoaders.get(id);
@@ -64,13 +75,12 @@ public PlexusResource getResource(String name) throws ResourceNotFoundException
6475
try {
6576
PlexusResource resource = resourceLoader.getResource(name);
6677

67-
getLogger().debug("The resource '" + name + "' was found as " + resource.getName() + ".");
78+
LOGGER.debug("The resource '" + name + "' was found as " + resource.getName() + ".");
6879

6980
return resource;
7081
} catch (ResourceNotFoundException e) {
71-
getLogger()
72-
.debug("The resource '" + name + "' was not found with resourceLoader "
73-
+ resourceLoader.getClass().getName() + ".");
82+
LOGGER.debug("The resource '" + name + "' was not found with resourceLoader "
83+
+ resourceLoader.getClass().getName() + ".");
7484
}
7585
}
7686

0 commit comments

Comments
 (0)