Giter Site home page Giter Site logo

jqa-maven3-plugin's Introduction

jQAssistant Maven 3 Plugin

This is the Maven 3 Plugin of jQAssistant. It enables jQAssistant to scan and to analyze Maven 3 projects.

For more information on jQAssistant see https://jqassistant.org.

jqa-maven3-plugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jqa-maven3-plugin's Issues

Dependency scan misses files or creates duplicates

Bug Description

The setting maven3.dependency.scan enables scanning of dependencies. There are two problems observable

  1. If a dependency is managed in the pom then it is not scanned
  2. If the same artifact is a dependency to multiple modules then it scanned multiple times

Expected Behaviour

  • Always scan dependency artifacts exactly once.

Your Environment

  • Independent of environment

How can we reproduce the bug?

  • Test is already in place

Definition of Done for the Implementers

  • We got a final feedback from the reporting user (if applicable)
  • Unittests have been written (if applicable)
  • Integration tests have been written (if applicable)
  • Test coverage is the same or even better then before (if applicable)
  • Documentation has been written (if applicable)
  • Added a note on the new feature to the release notes (if applicable)

Allow Maven Dependencies (*.jar contents) to be included in scan

The Problem: We use several libraries in our projects (who doesn't ;-) ) that provide different integration points. For example we do use Vaadin as a frontend technology. In order to create custom forms, panels and other components one needs to extend Vaadin classes or implement interfaces provided by Vaadin. Most components and interfaces provided by Vaadin are Serializable.

Now I'd like to create a jQAssistant rule that checks that all Serializable classes do provide a serialVersionUID field. Unfortunately jQAssistant maven plugin does not do a deep scan of the Vaadin dependencies. Thus I cannot identify all serializable classes of my project.

Just including the dependencies during scan might solve the problem but will raise another issue: If those other classes are included they might be matched by concepts and constraints as well. I'm not in control over those libraries thus I cannot enforce my own rules and constraints there. For example Vaadin policy dictates that no class has a serialVersionUID at all (conflicting with my own rule).

How to solve the dilemma: On the one hand it would be very nice to have the type information of the whole inheritance tree, on the other hand those external classes should not be included in each and every constraint.

mvn jqassistant:server fails with JDK 11 & JDK 14 (but not with 8)

Bug description

I have a sample project, it has a Maven profile jqa which makes use of jQAssistant 1.8.0. I can perform the typical scan/analyze steps with jqa. But running ./mvnw -P jqa -N jqassistant:server runs into the following error, when used with JDK 11:

Error injecting: com.buschmais.jqassistant.scm.maven.ServerMojo
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.IllegalStateException: Cannot create JAXB context for org.jqassistant.schema.plugin.v1.JqassistantPlugin
  at com.buschmais.jqassistant.scm.maven.provider.PluginRepositoryProvider.<init>(Unknown Source)
  at ClassRealm[plugin>com.buschmais.jqassistant:jqassistant-maven-plugin:1.8.0, parent: java.net.URLClassLoader@4520ebad] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
  while locating com.buschmais.jqassistant.scm.maven.provider.PluginRepositoryProvider
  while locating com.buschmais.jqassistant.scm.maven.ServerMojo

1 error
    at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
    at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
    at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
    at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
    at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
    at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:190)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:834)
Caused by: java.lang.IllegalStateException: Cannot create JAXB context for org.jqassistant.schema.plugin.v1.JqassistantPlugin
    at com.buschmais.jqassistant.core.shared.xml.JAXBUnmarshaller.<init> (JAXBUnmarshaller.java:78)
    at com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl.<init> (PluginConfigurationReaderImpl.java:50)
    at com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl.<init> (PluginConfigurationReaderImpl.java:39)
    at com.buschmais.jqassistant.scm.maven.provider.PluginRepositoryProvider.<init> (PluginRepositoryProvider.java:22)
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance (Constructor.java:490)
    at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance (DefaultConstructionProxyFactory.java:126)
    at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:114)
    at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:32)
    at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
    at org.eclipse.sisu.bean.BeanScheduler$CycleActivator.onProvision (BeanScheduler.java:230)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:120)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:306)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.internal.SingletonScope$1.get (SingletonScope.java:168)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:39)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
    at org.eclipse.sisu.plexus.PlexusRequirements$RequirementProvider.get (PlexusRequirements.java:250)
    at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty (ProvidedPropertyBinding.java:48)
    at org.eclipse.sisu.bean.BeanInjector.injectMembers (BeanInjector.java:52)
    at com.google.inject.internal.MembersInjectorImpl.injectMembers (MembersInjectorImpl.java:160)
    at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:124)
    at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:32)
    at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:306)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
    at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
    at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
    at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
    at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
    at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:190)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:834)
Caused by: javax.xml.bind.JAXBException: ClassCastException: attempting to cast jar:file:/Users/ascheman/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar!/javax/xml/bind/JAXBContext.class to jar:file:/Users/ascheman/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar!/javax/xml/bind/JAXBContext.class.  Please make sure that you are specifying the proper ClassLoader.
    at javax.xml.bind.ContextFinder.handleClassCastException (ContextFinder.java:148)
    at javax.xml.bind.ContextFinder.newInstance (ContextFinder.java:291)
    at javax.xml.bind.ContextFinder.newInstance (ContextFinder.java:277)
    at javax.xml.bind.ContextFinder.find (ContextFinder.java:400)
    at javax.xml.bind.JAXBContext.newInstance (JAXBContext.java:721)
    at javax.xml.bind.JAXBContext.newInstance (JAXBContext.java:662)
    at com.buschmais.jqassistant.core.shared.xml.JAXBUnmarshaller.<init> (JAXBUnmarshaller.java:76)
    at com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl.<init> (PluginConfigurationReaderImpl.java:50)
    at com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl.<init> (PluginConfigurationReaderImpl.java:39)
    at com.buschmais.jqassistant.scm.maven.provider.PluginRepositoryProvider.<init> (PluginRepositoryProvider.java:22)
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance (Constructor.java:490)
    at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance (DefaultConstructionProxyFactory.java:126)
    at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:114)
    at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:32)
    at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
    at org.eclipse.sisu.bean.BeanScheduler$CycleActivator.onProvision (BeanScheduler.java:230)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:120)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:306)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.internal.SingletonScope$1.get (SingletonScope.java:168)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:39)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
    at org.eclipse.sisu.plexus.PlexusRequirements$RequirementProvider.get (PlexusRequirements.java:250)
    at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty (ProvidedPropertyBinding.java:48)
    at org.eclipse.sisu.bean.BeanInjector.injectMembers (BeanInjector.java:52)
    at com.google.inject.internal.MembersInjectorImpl.injectMembers (MembersInjectorImpl.java:160)
    at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:124)
    at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:32)
    at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:98)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:93)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:306)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
    at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
    at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
    at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
    at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
    at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
    at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
    at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
    at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:190)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:186)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:834)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.255 s (Wall Clock)
[INFO] Finished at: 2020-10-18T16:54:09+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.buschmais.jqassistant:jqassistant-maven-plugin:1.8.0:server (default-cli) on project dukecon-server: Execution default-cli of goal com.buschmais.jqassistant:jqassistant-maven-plugin:1.8.0:server failed: Unable to load the mojo 'server' (or one of its required components) from the plugin 'com.buschmais.jqassistant:jqassistant-maven-plugin:1.8.0': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) Error injecting constructor, java.lang.IllegalStateException: Cannot create JAXB context for org.jqassistant.schema.plugin.v1.JqassistantPlugin
[ERROR]   at com.buschmais.jqassistant.scm.maven.provider.PluginRepositoryProvider.<init>(Unknown Source)
[ERROR]   at ClassRealm[plugin>com.buschmais.jqassistant:jqassistant-maven-plugin:1.8.0, parent: java.net.URLClassLoader@4520ebad] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR]   while locating com.buschmais.jqassistant.scm.maven.provider.PluginRepositoryProvider
[ERROR]   while locating com.buschmais.jqassistant.scm.maven.ServerMojo
[ERROR]   at ClassRealm[plugin>com.buschmais.jqassistant:jqassistant-maven-plugin:1.8.0, parent: java.net.URLClassLoader@4520ebad] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR]   while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value="com.buschmais.jqassistant:jqassistant-maven-plugin:1.8.0:server")
[ERROR]
[ERROR] 1 error
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: com.buschmais.jqassistant:jqassistant-maven-plugin:1.8.0:server: ClassCastException: attempting to cast jar:file:/Users/ascheman/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar!/javax/xml/bind/JAXBContext.class to jar:file:/Users/ascheman/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar!/javax/xml/bind/JAXBContext.class.  Please make sure that you are specifying the proper ClassLoader.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/PluginContainerException

Everything works well when using JDK 8 (openjdk version "1.8.0_265").
Replacing JAXB with an older version (e.g., 2.3.1) does not help either.

Expected behaviour

Running with current (LTS) versions of JDK.

Your Environment

  • JDK: openjdk version "14.0.2" 2020-07-14
  • OS: OSX 10.14.6 (but I have a similar project at my customer which runs into the same bug on Win 10)

How can we reproduce the bug?

  • Install/Set JAVA_HOME to JDK 11, eg. via sdkman: sdk u java 14.0.2.hs-adpt
  • Clone the demo repo (https://github.com/dukecon/dukecon_server/), and
  • Run ./mvnw -P jqa clean install && ./mvnw -P jqa jqassistant:server

Definition of Done for the Implementers

  • We got a final feedback from the reporting user (if applicable)

Some goals don't run a multi-module project if last module has property `jqassistant.skip` set to true

Bug Description

Expected Behaviour

In a multi-module maven project, one might want to skip jqassistant on some modules (e.g. if it contains gatling tests).
However if the last module to run has jqassistant.skip property set to true, some goals like jqassistant:analyze or jqassistant:server don't run anymore. NB: jqassistant:scan seems to work.

I tested skipping jqassistant on another non final module: maven plugin works as expected.

Your Environment

  • OpenJDK8 or OpenJDK17 (reproduced with both)
  • NixOS
  • jqassistant-maven-plugin 1.11.1

How can we reproduce the bug?

Run mvn jqassistant:server on https://github.com/murdos/piggymetrics/tree/jqa-playground

Definition of Done for the Implementers

  • We got a final feedback from the reporting user (if applicable)
  • Unittests have been written (if applicable)
  • Integration tests have been written (if applicable)
  • Test coverage is the same or even better then before (if applicable)
  • Documentation has been written (if applicable)
  • Added a note on the new feature to the release notes (if applicable)

double nodes for macronized versions in dependencies

I am using the latest version of JQAssistant within a multimodule maven 3 project.

I have a dependency in one of my modules like:

<dependency>  
  <groupId>mygroup</groupId>
  <artifactId>configuration.utilities</artifactId>
  <version>${mygroup.version}</version>
</dependency>

This property mygroup.version has a fixed value of maybe 5.1.

So after a successfull JQAssistant process without any fancy additional configuration using this Cyper query:

MATCH (n:Artifact)
WHERE n.fqn starts with 'com.gingko.commons:configuration.utilities'
RETURN n 

My problem here is that I nearly for all of my modules I get two nodes as an answer. Here is an example derived from the configuration above:

data
{"name":"configuration.utilities","fileName":"***/configuration.utilities/${mygroup.version}/configuration.utilities-${mygroup.version}.jar","fqn":"mygroup:configuration.utilities:jar:${mygroup.version}","type":"jar","version":"${mygroup.version}","group":"mygroup"}
{"name":"configuration.utilities","fileName":"***/configuration.utilities/5.1/configuration.utilities-12.1.12.jar","fqn":"mygroup:configuration.utilities:jar:5.1","type":"jar","version":"5.1","group":"mygroup"}

Within one node the macro is replaced, within the other, it is not.

Is there any reason behind this or is this simply a bug?

Support for the URL of the project

Add support for the URL of the project (project/url).

This should help to avoid writting rules like this:

MATCH (rp:RootProject)-[:HAS_MODEL]->(model:Maven:Pom:Xml)
                                        -[:HAS_ROOT_ELEMENT]->(re:Element:Xml)
                                        -[:HAS_ELEMENT]->(ele:Element:Xml {name: "url"})
                                        -[:HAS_TEXT]->(t:Text:Xml)
 RETURN re, ele, t

Migrate the Plugin Documentation of the Maven 3 Plugin to the new Reference Manual

Task Description

Migrate the existing documentation of the Maven 3 Plugin to the new reference manul.

Definition of Done for the Implementers

  • The reference manual contains the same information as the old user manual
  • The section on the Maven 3 Plugin in the old user manual points to the section for the plugin in the reference manual

Expose attribute "description" for node :Maven:Pom

Feature Description

It might be useful to have access to the description of a Maven Pom, e.g. for documentation purpose.

Definition of Done for the Implementers

Remove this hint: these checkboxes can be checked like this: [x]

  • We got a final feedback from the reporting user (if applicable)
  • Unittests have been written (if applicable)
  • Integration tests have been written (if applicable)
  • Test coverage is the same or even better then before (if applicable)
  • Documentation has been written (if applicable)
  • Added a note on the new feature to the release notes (if applicable)

Improve performance for scan

Unfortunately the scanning of the maven pom takes very long with our multi module project. Currently the scanning takes 1 to 3 seconds for a multi module project with 95 modules. Thus scanning takes between two and three minutes. Performance seemed to degrade slowly over the last months when our project grew.

image

The project has about 140.000 LOC.

As you can see from the analysis the problem seems to be the dependency management section. We're using spring-boot-dependencies as a parent which has a huge dependency management section thus I guess this causes the 182.115 calls to getMavenArtifactDescriptor(). Unfortunately we cannot exclude the dependency management section from scanning nor exclude the Plugin at all (see jQAssistant/jqa-core-framework#44).

Are there any possibilities to speed up the scanning?

Use Github Actions to provide a simple CI/CD Buildchain

As core developer of jQAssistant, I want this project to be build on various plattforms with different JDK versions on each commit, so that I know if the change done my the commit does not break the build and the software is fully functional.

The following acceptance criterias must be met:

  • mvn -DskipTests -Djqassistant.skip clean install must pass
  • mvn -Djqassistant.skip clean install must pass
  • mvn -P IT clean install must pass
  • mvn -DskipTests -Djqassistant.skip=false clean install must pass

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.