samaxes / minify-maven-plugin

Combine and minimize JavaScript and CSS files for faster page loading.
http://samaxes.github.com/minify-maven-plugin
Apache License 2.0
222 stars 91 forks source link

java.lang.ClassNotFoundException: com.google.javascript.jscomp.CompilerOptions$LanguageMode #135

Open jieryn opened 7 years ago

jieryn commented 7 years ago

Most recent version, and older, of minify-m-p fails with about to be released Apache Maven 3.4.0:

Maven information:

[INFO] --- maven-enforcer-plugin:1.4.1:display-info (display-info) @ project ---
[INFO] Maven Version: 3.4.0-SNAPSHOT
[INFO] JDK Version: 1.8.0_111 normalized as: 1.8.0-111
[INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 3.10.0-514.el7.x86_64

Build failure:

[ERROR] Failed to execute goal com.samaxes.maven:minify-maven-plugin:1.7.6:minify (default-minify) on project ui: Execution default-minify of goal com.samaxes.maven:minify-maven-plugin:1.7.6:minify failed: A required class was missing while executing com.samaxes.maven:minify-maven-plugin:1.7.6:minify: Lcom/google/javascript/jscomp/CompilerOptions$LanguageMode;
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.samaxes.maven:minify-maven-plugin:1.7.6
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/jenkins/.m2/repository/com/samaxes/maven/minify-maven-plugin/1.7.6/minify-maven-plugin-1.7.6.jar
[ERROR] urls[1] = file:/home/jenkins/.m2/repository/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar
[ERROR] urls[2] = file:/home/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>com.acme:project:0.10-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR] 
[ERROR] -----------------------------------------------------: com.google.javascript.jscomp.CompilerOptions$LanguageMode
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.samaxes.maven:minify-maven-plugin:1.7.6:minify (default-minify) on project ui: Execution default-minify of goal com.samaxes.maven:minify-maven-plugin:1.7.6:minify failed: A required class was missing while executing com.samaxes.maven:minify-maven-plugin:1.7.6:minify: Lcom/google/javascript/jscomp/CompilerOptions$LanguageMode;
-----------------------------------------------------
realm =    plugin>com.samaxes.maven:minify-maven-plugin:1.7.6
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/home/jenkins/.m2/repository/com/samaxes/maven/minify-maven-plugin/1.7.6/minify-maven-plugin-1.7.6.jar
urls[1] = file:/home/jenkins/.m2/repository/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar
urls[2] = file:/home/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[project>com.acme:project:0.10-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]

-----------------------------------------------------

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:214)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:155)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:147)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:195)
        at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:191)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-minify of goal com.samaxes.maven:minify-maven-plugin:1.7.6:minify failed: A required class was missing while executing com.samaxes.maven:minify-maven-plugin:1.7.6:minify: Lcom/google/javascript/jscomp/CompilerOptions$LanguageMode;
-----------------------------------------------------
realm =    plugin>com.samaxes.maven:minify-maven-plugin:1.7.6
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/home/jenkins/.m2/repository/com/samaxes/maven/minify-maven-plugin/1.7.6/minify-maven-plugin-1.7.6.jar
urls[1] = file:/home/jenkins/.m2/repository/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar
urls[2] = file:/home/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[project>com.acme:project:0.10-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]

-----------------------------------------------------

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:168)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 11 more
Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing com.samaxes.maven:minify-maven-plugin:1.7.6:minify: Lcom/google/javascript/jscomp/CompilerOptions$LanguageMode;
-----------------------------------------------------
realm =    plugin>com.samaxes.maven:minify-maven-plugin:1.7.6
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/home/jenkins/.m2/repository/com/samaxes/maven/minify-maven-plugin/1.7.6/minify-maven-plugin-1.7.6.jar
urls[1] = file:/home/jenkins/.m2/repository/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar
urls[2] = file:/home/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[project>com.acme:project:0.10-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]

-----------------------------------------------------

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:166)
        ... 12 more
Caused by: java.lang.NoClassDefFoundError: Lcom/google/javascript/jscomp/CompilerOptions$LanguageMode;
        at java.lang.Class.getDeclaredFields0(Native Method)
        at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
        at java.lang.Class.getDeclaredFields(Class.java:1916)
        at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:675)
        at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:380)
        at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:165)
        at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:616)
        at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:572)
        at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:558)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:887)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:808)
        at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:285)
        at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:217)
        at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:1009)
        at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1041)
        at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054)
        at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
        at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
        at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
        at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
        at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
        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:515)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
        ... 12 more
Caused by: java.lang.ClassNotFoundException: com.google.javascript.jscomp.CompilerOptions$LanguageMode
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        ... 48 more
[ERROR] 
[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