Skip to content
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

Class not found on mvn license:aggregate-third-party-report #73

Closed
Jessevanbekkum opened this issue Jan 25, 2017 · 13 comments
Closed

Class not found on mvn license:aggregate-third-party-report #73

Jessevanbekkum opened this issue Jan 25, 2017 · 13 comments

Comments

@Jessevanbekkum
Copy link

When I try to run mvn license:aggregate-third-party-report I get a build failure, with the following error:
Failed to execute goal org.codehaus.mojo:license-maven-plugin:1.12:aggregate-third-party-report (default-cli) on project ing-securities: Execution default-cli of goal org.codehaus.mojo:license-maven-plugin:1.12:aggregate-third-party-report failed: A required class was missing while executing org.codehaus.mojo:license-maven-plugin:1.12:aggregate-third-party-report: org/apache/maven/doxia/sink/render/RenderingContext

This is probably the same issue as #69.

That issue was closed, but I think there still is something wrong here. I downloaded the doxia jars from maven central (http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.maven.doxia%22%20AND%20a%3A%22doxia-core%22) and starting with version 1.5, the file org/apache/maven/doxia/sink/render/RenderingContext.class is not available anymore in the jar.

I was able to to get it working by adding this to my plugin definition:

          <dependencies>
            <dependency>
              <groupId>org.apache.maven.doxia</groupId>
              <artifactId>doxia-core</artifactId>
              <version>1.4</version>
            </dependency>
          </dependencies>

Here is a part of the stacktrace:

Error injecting: org.apache.maven.doxia.siterenderer.DefaultSiteRenderer
java.lang.ClassNotFoundException: org.apache.maven.doxia.sink.render.RenderingContext
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) ~[plexus-classworlds-2.5.2.jar:na]
	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) ~[plexus-classworlds-2.5.2.jar:na]
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) ~[plexus-classworlds-2.5.2.jar:na]
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) ~[plexus-classworlds-2.5.2.jar:na]
	... 93 common frames omitted
Wrapped by: java.lang.NoClassDefFoundError: org/apache/maven/doxia/sink/render/RenderingContext
	at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_101]
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_101]
	at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_101]
@macGYves
Copy link

macGYves commented Jun 1, 2017

This also happens when executing mvn license:third-party-report.

The workaround about adding doxia-core as plugin dependency worked for me, too.

@tchemit tchemit modified the milestone: Backlog Jun 11, 2017
@bannmann
Copy link

I have the same issue, and the workaround "fixes" the problem.

@tchemit
Copy link
Contributor

tchemit commented Jun 30, 2017

Hi guys,

Which version of maven-site-plugin ae you using ?

@dhalperi
Copy link

dhalperi commented Jul 3, 2017

Hi @tchemit I am getting this error with version 1.13:

➜  projects git:(maven-ify) ✗ mvn license:aggregate-third-party-report
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Batfish
[INFO] batfish-common-protocol
[INFO] batfish
[INFO] batfish-client
[INFO] coordinator
[INFO] allinone
[INFO] question
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Batfish 0.29.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- license-maven-plugin:1.13:aggregate-third-party-report (default-cli) @ batfish-parent ---
[WARNING] Error injecting: org.apache.maven.doxia.siterenderer.DefaultSiteRenderer
java.lang.NoClassDefFoundError: org/apache/maven/doxia/sink/render/RenderingContext
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.getDeclaredMethods(Class.java:1975)
	at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:688)
	at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:380)
	at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:164)

@macGYves
Copy link

macGYves commented Jul 4, 2017

I'm on maven 3.3.9 and license-maven-plugin 1.12

@jacobwil
Copy link

For anyone just finding this now and running into a similar problem where org/apache/maven/doxia/siterenderer/RenderingContext is missing, I managed to get past that problem by making my <plugin> entry look like this:

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>1.14</version>

        <dependencies>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-core</artifactId>
            <version>1.6</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-site-renderer</artifactId>
            <version>1.6</version>
          </dependency>
        </dependencies>
      </plugin>

@kajh
Copy link

kajh commented Oct 8, 2018

We get the folloing stacktrace after adding the license-maven-plugin as
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>license-maven-plugin</artifactId> <version>1.16</version> </plugin>
We use maven-site-plugin 3.7.1.

[WARNING] An issue has occurred with license-maven-plugin:1.16:third-party-report report, skipping LinkageError org/apache/maven/doxia/sink/SinkEventAttributeSet, please report an issue to Maven dev team. java.lang.NoClassDefFoundError: org/apache/maven/doxia/sink/SinkEventAttributeSet at org.codehaus.mojo.license.AbstractLicenseReportRenderer.sinkHeaderCellText(AbstractLicenseReportRenderer.java:176)

I added doxia-core and doxia-site-renderer as jacobwil described.

Any ideas? Thanks!

:)

@ispringer
Copy link

Why was this closed?

@tchemit
Copy link
Contributor

tchemit commented Nov 10, 2018 via email

@vasiliy-bout
Copy link

I've just tried to use the latest version 1.16, and the problem still persists. It was reported on version 1.12. Please, fix it. Can you just add this dependency into the plugin's pom.xml?

@ptahchiev
Copy link

They need to update the doxia-site-renderer from 1.4 to 1.8.1 - i don't know why they are not doing it.

@digulla
Copy link

digulla commented Jan 17, 2019

With license-maven-plugin:1.16:aggregate-third-party-report, doxia 1.8 doesn't work for me.
I had to use doxia 1.6 as in #73 (comment)

With doxia 1.8 and 1.8.1, org/apache/maven/doxia/sink/SinkEventAttributeSet is missing (probably was moved to a new package org.apache.maven.doxia.sink.impl in 1.8).

@ppalaga
Copy link
Contributor

ppalaga commented Jan 18, 2019

A pull request with an integration test is welcome.

digulla pushed a commit to digulla/license-maven-plugin that referenced this issue Jan 25, 2019
ppalaga pushed a commit to ppalaga/mojohaus-license-maven-plugin that referenced this issue Feb 1, 2019
ppalaga added a commit that referenced this issue Feb 1, 2019
Fix #73 Class not found on mvn license:aggregate-third-party-report
@ppalaga ppalaga modified the milestones: Backlog, 1.17 Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests