fosslight / fosslight_scanner

FOSSLight Scanner
Apache License 2.0
17 stars 16 forks source link

Execution default-cli of goal org.codehaus.mojo:license-maven-plugin:2.4.0:aggregate-download-licenses failed: Null URL for file /mnt/c/mydisk/fosslight/sample_dependency/flink-master/flink-master/target/generated-resources/licenses/ #104

Closed vampard closed 4 months ago

vampard commented 4 months ago

Describe the bug Hello, I am one of fosslight users. I came accross an error that I never expected when analysing the source code with maven pom.xml. Could anyone help me sort out this issue?

To Reproduce source code: apache flink https://dlcdn.apache.org/flink/flink-1.19.1/flink-1.19.1-src.tgz

In the root directory of source code, implemented as below

  1. fosslight_scanner dependency -p sourcecode_path
  2. or the below command line: ./mvnw license:aggregate-download-licenses

Expected behavior A clear and concise description of what you expected to happen. no result with empty spreedsheet after analysis.

System environment (please complete the following information):

[INFO] Flink : Docs ....................................... SKIPPED [INFO] Flink : Walkthrough : .............................. SKIPPED [INFO] Flink : Walkthrough : Common ....................... SKIPPED [INFO] Flink : Walkthrough : Datastream Java .............. SKIPPED [INFO] Flink : Tools : CI : Java .......................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.896 s [INFO] Finished at: 2024-07-16T13:34:00+09:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:license-maven-plugin:2.4.0:aggregate-download-licenses (default-cli) on project flink-parent: Execution default-cli of goal org.codehaus.mojo:license-maven-plugin:2.4.0:aggregate-download-licenses failed: Null URL for file /mnt/c/mydisk/fosslight/sample_dependency/flink-master/flink-master/target/generated-resources/licenses/ - -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:license-maven-plugin:2.4.0:aggregate-download-licenses (default-cli) on project flink-parent: Execution default-cli of goal org.codehaus.mojo:license-maven-plugin:2.4.0:aggregate-download-licenses failed: Null URL for file /mnt/c/mydisk/fosslight/sample_dependency/flink-master/flink-master/target/generated-resources/licenses/ -** at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52) at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161) at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.mojo:license-maven-plugin:2.4.0:aggregate-download-licenses failed: Null URL for file /mnt/c/mydisk/fosslight/sample_dependency/flink-master/flink-master/target/generated-resources/licenses/ - at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52) at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161) at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73) Caused by: java.lang.IllegalArgumentException: Null URL for file /mnt/c/mydisk/fosslight/sample_dependency/flink-master/flink-master/target/generated-resources/licenses/ - at org.codehaus.mojo.license.download.LicenseDownloader.downloadLicense (LicenseDownloader.java:169) at org.codehaus.mojo.license.AbstractDownloadLicensesMojo.downloadLicenses (AbstractDownloadLicensesMojo.java:1319) at org.codehaus.mojo.license.AbstractDownloadLicensesMojo.execute (AbstractDownloadLicensesMojo.java:875) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:64) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:564) at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:52) at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:161) at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:73) [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

dd-jy commented 4 months ago

@vampard Actually, it's not an issue for FOSSLight Scanner. FOSSLight Dependency Scanner uses the mojohaus/license-maven-plugin to detect the direct/transitive dependency and get the open source information.

This issue was caused by mojohaus/license-maven-plugin. So please register an issue with mojohaus/license-maven-plugin.

./mvnw license:aggregate-download-licenses => command for mojohaus/license-maven-plugin.

vampard commented 4 months ago

Thank you for the reply:)