Skip to content

Commit

Permalink
Bump org.codehaus.plexus:plexus-resources from 1.1.0 to 1.3.0
Browse files Browse the repository at this point in the history
Bumps [org.codehaus.plexus:plexus-resources](https://github.com/codehaus-plexus/plexus-resources) from 1.1.0 to 1.3.0.
- [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)

---
updated-dependencies:
- dependency-name: org.codehaus.plexus:plexus-resources
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and slachiewicz committed Mar 17, 2024
1 parent 34fcf3e commit 36177bb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
8 changes: 1 addition & 7 deletions pom.xml
Expand Up @@ -159,13 +159,7 @@ under the License.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-resources</artifactId>
<version>1.1.0</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
Expand Down
Expand Up @@ -18,6 +18,8 @@
*/
package org.apache.maven.plugins.checkstyle.resource;

import javax.inject.Inject;

import java.util.Map;

import org.codehaus.plexus.component.annotations.Component;
Expand All @@ -28,6 +30,8 @@
import org.codehaus.plexus.resource.loader.ResourceLoader;
import org.codehaus.plexus.resource.loader.ResourceNotFoundException;
import org.codehaus.plexus.resource.loader.ThreadContextClasspathResourceLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

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

private static final Logger LOGGER = LoggerFactory.getLogger(LicenseResourceManager.class);

@Requirement(role = ResourceLoader.class)
private Map<String, ResourceLoader> resourceLoaders;

@Inject
public LicenseResourceManager(Map<String, ResourceLoader> resourceLoaders) {
super(resourceLoaders);
}

@Override
public void addSearchPath(String id, String path) {
ResourceLoader loader = resourceLoaders.get(id);
Expand All @@ -64,13 +75,12 @@ public PlexusResource getResource(String name) throws ResourceNotFoundException
try {
PlexusResource resource = resourceLoader.getResource(name);

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

return resource;
} catch (ResourceNotFoundException e) {
getLogger()
.debug("The resource '" + name + "' was not found with resourceLoader "
+ resourceLoader.getClass().getName() + ".");
LOGGER.debug("The resource '" + name + "' was not found with resourceLoader "
+ resourceLoader.getClass().getName() + ".");
}
}

Expand Down

0 comments on commit 36177bb

Please sign in to comment.