1 Reply Latest reply on May 24, 2009 7:31 AM by Jay Balunas

    Maven Resource Plugin error in IntelliJ

    Stephan B Newbie

      Hi,

      with the new 3.3.1.GA release I got the maven resource plugin working from console, though not in IntelliJ IDEA. For some reason it tries to open the pom file from a dependency I also manage in IDEA.
      Here is the maven log:

      [INFO] ---------------------------------------------------------------------
      [INFO] Building myProject
      [INFO]
      [INFO] Id: myproject:author-portal-web:war:0.0.4
      [INFO] task-segment: [generate-sources, generate-resources, generate-test-sources, generate-test-resources]
      [INFO] ------------------------------------------------------------------------
      [INFO] Attempting to resolve a version for plugin: net.sf.alchim:yuicompressor-maven-plugin using meta-version: LATEST
      [INFO] Using version: 0.7.1 of plugin: net.sf.alchim:yuicompressor-maven-plugin
      [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
      [INFO] Setting property: velocimacro.messages.on => 'false'.
      [INFO] Setting property: resource.loader => 'classpath,cdk'.
      [INFO] Setting property: resource.manager.logwhenfound => 'false'.
      [INFO] Setting property: cdk.resource.loader.class => 'org.ajax4jsf.builder.velocity.ResourceLoader'.
      [INFO] **************************************************************
      [INFO] Starting Jakarta Velocity v1.4
      [INFO] RuntimeInstance initializing.
      [INFO] Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
      [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
      [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
      [INFO] ClasspathResourceLoader : initialization starting.
      [INFO] ClasspathResourceLoader : initialization complete.
      [INFO] Resource Loader Instantiated: org.ajax4jsf.builder.velocity.ResourceLoader
      [INFO] ClasspathResourceLoader : initialization starting.
      [INFO] ClasspathResourceLoader : initialization complete.
      [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
      [INFO] Default ResourceManager initialization complete.
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
      [INFO] Created: 20 parsers.
      [INFO] Velocimacro : initialization starting.
      [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
      [INFO] Velocimacro : added new VM : #quietnull( a ) : source = VM_global_library.vm
      [INFO] Velocimacro : added new VM : #tagPropertyMethods12( source ) : source = VM_global_library.vm
      [INFO] Velocimacro : added new VM : #tagPropertyRelease( source ) : source = VM_global_library.vm
      [INFO] Velocimacro : VM library template macro registration complete.
      [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
      [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
      [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
      [INFO] Velocimacro : initialization complete.
      [INFO] Velocity successfully started.
      [INFO] [resource-dependency:assembly-resources]
      [INFO] Process jar: jar:file:///home/user/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/
      [INFO] no dependecy files found
      [INFO] Process jar: jar:file:///home/user/.m2/repository/de/odysseus/juel/juel/2.1.0/juel-2.1.0.jar!/
      [INFO] no dependecy files found
      [INFO] Process jar: jar:file:///home/user/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar!/
      [INFO] no dependecy files found
      [INFO] Process jar: jar:file:///home/user/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar!/
      [INFO] no dependecy files found
      [INFO] Process jar: jar:file:///home/user/.m2/repository/commons-logging/commons-logging/1.1/commons-logging-1.1.jar!/
      [INFO] no dependecy files found
      [INFO] Process jar: jar:file:///home/user/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar!/
      [INFO] no dependecy files found
      [INFO] Process jar: jar:file:///home/user/.m2/repository/logkit/logkit/1.0.1/logkit-1.0.1.jar!/
      [INFO] no dependecy files found
      [INFO] Process jar: jar:file:///home/user/.m2/repository/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar!/
      [INFO] no dependecy files found
      [INFO] Process jar: jar:file:///home/user/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar!/
      [INFO] no dependecy files found
      [ERROR] Error during processing file: file:/home/user/dev/workspace/portal.users/pom.xml
      Could not open Jar file "/home/user/dev/workspace/portal.users/pom.xml".
      
      [ERROR] Could not open Jar file "/home/user/dev/workspace/portal.users/pom.xml".
      
      org.apache.commons.vfs.FileSystemException: Could not open Jar file "/home/user/dev/workspace/portal.users/pom.xml".
       at org.apache.commons.vfs.provider.jar.JarFileSystem.createZipFile(JarFileSystem.java:62)
       at org.apache.commons.vfs.provider.zip.ZipFileSystem.getZipFile(ZipFileSystem.java:136)
       at org.apache.commons.vfs.provider.jar.JarFileSystem.getZipFile(JarFileSystem.java:207)
       at org.apache.commons.vfs.provider.zip.ZipFileSystem.init(ZipFileSystem.java:84)
       at org.apache.commons.vfs.provider.AbstractVfsContainer.addComponent(AbstractVfsContainer.java:53)
       at org.apache.commons.vfs.provider.AbstractFileProvider.addFileSystem(AbstractFileProvider.java:96)
       at org.apache.commons.vfs.provider.AbstractLayeredFileProvider.createFileSystem(AbstractLayeredFileProvider.java:80)
       at org.apache.commons.vfs.provider.AbstractLayeredFileProvider.findFile(AbstractLayeredFileProvider.java:59)
       at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:641)
       at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:602)
       at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:570)
       at org.richfaces.cdk.rd.mojo.ResourceDependencyMojo.resolveArtifact(ResourceDependencyMojo.java:434)
       at org.richfaces.cdk.rd.mojo.ResourceDependencyMojo.execute(ResourceDependencyMojo.java:248)
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
       at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
       at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
       at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
       at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
       at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$2.execute(MavenEmbedderWrapper.java:85)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$7.execute(MavenEmbedderWrapper.java:184)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$7.execute(MavenEmbedderWrapper.java:181)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$8.run(MavenEmbedderWrapper.java:197)
       at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
       at java.util.concurrent.FutureTask.run(FutureTask.java:166)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
       at java.lang.Thread.run(Thread.java:636)
       at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)
      Caused by: java.util.zip.ZipException: error in opening zip file
       at java.util.zip.ZipFile.open(Native Method)
       at java.util.zip.ZipFile.<init>(ZipFile.java:131)
       at java.util.jar.JarFile.<init>(JarFile.java:150)
       at java.util.jar.JarFile.<init>(JarFile.java:114)
       at org.apache.commons.vfs.provider.jar.JarFileSystem.createZipFile(JarFileSystem.java:58)
       ... 35 more
      [ERROR] Error generate resource
      
      java.lang.NullPointerException
       at org.richfaces.cdk.rd.mojo.ResourceDependencyMojo.execute(ResourceDependencyMojo.java:249)
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
       at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
       at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
       at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
       at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
       at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$2.execute(MavenEmbedderWrapper.java:85)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$7.execute(MavenEmbedderWrapper.java:184)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$7.execute(MavenEmbedderWrapper.java:181)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$8.run(MavenEmbedderWrapper.java:197)
       at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
       at java.util.concurrent.FutureTask.run(FutureTask.java:166)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
       at java.lang.Thread.run(Thread.java:636)
       at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)
      [ERROR] BUILD FAILED
      [ERROR] Mojo execution failed.
      
      org.apache.maven.plugin.PluginExecutionException: Mojo execution failed.
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:601)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
       at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
       at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
       at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
       at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
       at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$2.execute(MavenEmbedderWrapper.java:85)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$7.execute(MavenEmbedderWrapper.java:184)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$7.execute(MavenEmbedderWrapper.java:181)
       at org.jetbrains.idea.maven.embedder.MavenEmbedderWrapper$8.run(MavenEmbedderWrapper.java:197)
       at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
       at java.util.concurrent.FutureTask.run(FutureTask.java:166)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
       at java.lang.Thread.run(Thread.java:636)
       at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)
      Caused by: org.apache.maven.plugin.MojoExecutionException
       at org.richfaces.cdk.rd.mojo.ResourceDependencyMojo.execute(ResourceDependencyMojo.java:321)
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
       ... 22 more
      Caused by: java.lang.NullPointerException
       at org.richfaces.cdk.rd.mojo.ResourceDependencyMojo.execute(ResourceDependencyMojo.java:249)
       ... 23 more