Code Monkey home page Code Monkey logo

license-maven-plugin's People

Contributors

basil avatar dependabot[bot] avatar imod avatar jglick avatar kohsuke avatar ndeloof avatar notmyfault avatar renovate[bot] avatar timja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

license-maven-plugin's Issues

Parameter `localRepository` uses deprecated parameter expression `${localRepository}`

When running on Maven 3.9.1:

10:17:55  [INFO] --- license:1.15:process (default) @ plugin ---
10:17:56  [WARNING] Parameter 'localRepository' is deprecated core expression; Avoid use of ArtifactRepository type. If you need access to local repository, switch to '${repositorySystemSession}' expression and get LRM from it instead.
10:17:57  [INFO] Generated /home/jenkins/agent/workspace/Tools_plugin-pom_master/target/plugin/WEB-INF/licenses.xml

I recommend the following patch:

diff --git a/src/main/java/com/cloudbees/maven/license/ProcessMojo.java b/src/main/java/com/cloudbees/maven/license/ProcessMojo.java
index b5c282b..b657dee 100644
--- a/src/main/java/com/cloudbees/maven/license/ProcessMojo.java
+++ b/src/main/java/com/cloudbees/maven/license/ProcessMojo.java
@@ -21,7 +21,6 @@ import groovy.lang.GroovyShell;
 import groovy.lang.Script;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -68,9 +67,6 @@ public class ProcessMojo extends AbstractMojo {
     @Component
     public ArtifactFactory artifactFactory;
 
-    @Parameter(defaultValue = "${localRepository}")
-    public ArtifactRepository localRepository;
-
     /**
      * Specifies completion/generation/filtering scripts.
      *
@@ -176,7 +172,6 @@ public class ProcessMojo extends AbstractMojo {
                 ProjectBuildingRequest buildingRequest =
                         new DefaultProjectBuildingRequest(session.getProjectBuildingRequest());
                 buildingRequest.setRemoteRepositories(project.getRemoteArtifactRepositories());
-                buildingRequest.setLocalRepository(localRepository);
                 buildingRequest.setProcessPlugins(false); // improve performance
                 models.put(a, projectBuilder.build(pom, buildingRequest).getProject());
             } catch (ProjectBuildingException x) {

Would it make sense to see to merge with https://www.mojohaus.org/license-maven-plugin/?

Describe your use-case which is not covered by existing documentation.

(Disclaimer: I haven't looked at the specific use cases handled by this plugin here, and the MojoHaus' eponym plugin.)

Have we considered contributing this plugin's features to https://www.mojohaus.org/license-maven-plugin/ and switch to the latter?

Why:

  • doing Maven related work is more MojoHaus' scope than Jenkins'.
  • There is a maven plugin out there with the very same name. Confusion ahead. And MojoHaus is much more widely used in the Maven ecosystem.

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

https://www.mojohaus.org/license-maven-plugin/

Rename `maven-license-plugin` to `license-maven-plugin`

Our Maven build contains the following warning:

Artifact IDs of the format maven-___-plugin are reserved for plugins in the group ID org.apache.maven.plugins. Please change your artifact ID to the format ___-maven-plugin. In the future this error will break the build.

This notice elaborates further:

Calling it maven-<yourplugin>-plugin (note "Maven" is at the beginning of the plugin name) is strongly discouraged since it's a reserved naming pattern for official Apache Maven plugins maintained by the Apache Maven team with group ID org.apache.maven.plugins. Using this naming pattern is an infringement of the Apache Maven Trademark.

Renaming this plugin is trivial, but the real work in this task is adapting all consumers to the new name.


Reference: https://maven.apache.org/guides/plugin/guide-java-plugin-development.html

Illegal reflective access

[INFO] --- maven-license-plugin:1.8:process (default) @ database-mysql ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (file:/Users/timja/.m2/repository/org/codehaus/groovy/groovy/1.6.5/groovy-1.6.5.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

caused by ancient groovy...

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

regex
src/site/site.xml
  • org.apache.maven.skins:maven-fluido-skin 1.12.0

  • Check this box to trigger a request for Renovate to run again on this repository

PermGen exhaustion

Whenever I build Jenkins core sources, I get an java.lang.OutOfMemoryError: PermGen space in maven-license-plugin:1.7:process. This might be coincidental, but it might mean that this plugin actually sucks up an unwarranted amount of the permanent generation, e.g. by loading too many classes. Should be profiled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.