allegro / grunt-maven-plugin

Grunt + Maven integration done right
Other
213 stars 32 forks source link

problems with v1.1.1 create-resources FileAlreadyExistsException.... #18

Closed koraysels closed 10 years ago

koraysels commented 10 years ago

Today i tried updating from v1.0.2 to v1.1.1.

I have problems with maven :

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal pl.allegro:grunt-maven-plugin:1.1.1:create-resources (default) on project m-atable-webapp: Execution default of goal pl.allegro:grunt-maven-plugin:1.1.1:create-resources failed: A required class was missing while executing pl.allegro:grunt-maven-plugin:1.1.1:create-resources: java/nio/file/FileAlreadyExistsException

any suggestions of what may be the cause ? Do I have to remove some files before updating?

adamdubiel commented 10 years ago

Hm, could you run mvn -X grunt:create-resources so we can see full stack trace? Also are you using Windows/Linux/OS X?

It might be helpful to remove target-grunt, but i haven't encountered this issue before and it should not occur.

koraysels commented 10 years ago

I am using OSX, I cut some debug stuff out but this is the stacktrace -->

[DEBUG] Goal:          pl.allegro:grunt-maven-plugin:1.1.1:create-resources (default-cli)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <filteredResources>${filteredResources}</filteredResources>
  <gruntBuildDirectory default-value="${basedir}/target-grunt">${gruntBuildDirectory}</gruntBuildDirectory>
  <jsSourceDirectory default-value="static">static</jsSourceDirectory>
  <mavenProject>${project}</mavenProject>
  <mavenResourcesPluginVersion default-value="2.6">${mavenResourcesPluginVersion}</mavenResourcesPluginVersion>
  <mavenSession>${session}</mavenSession>
  <overwriteResources default-value="true">${overwriteResources}</overwriteResources>
  <sourceDirectory default-value="src/main/webapp/">/Users/koraysels/work/TRUVO/atable_TRUNK/m-atable-webapp/src/main/webapp/</sourceDirectory>
</configuration>
....

[DEBUG] Configuring mojo pl.allegro:grunt-maven-plugin:1.1.1:create-resources from plugin realm ClassRealm[plugin>pl.allegro:grunt-maven-plugin:1.1.1, parent: sun.misc.Launcher$AppClassLoader@1729854]
[DEBUG] Configuring mojo 'pl.allegro:grunt-maven-plugin:1.1.1:create-resources' with basic configurator -->
[DEBUG]   (f) filteredResources = []
[DEBUG]   (f) gruntBuildDirectory = /Users/koraysels/work/TRUVO/atable_TRUNK/m-atable-webapp/target-grunt
[DEBUG]   (f) jsSourceDirectory = static
[DEBUG]   (f) mavenProject = MavenProject: com.truvo.m-atable:m-atable-webapp:13.8.0-RC3-SNAPSHOT @ /Users/koraysels/work/TRUVO/atable_TRUNK/m-atable-webapp/pom.xml
[DEBUG]   (f) mavenResourcesPluginVersion = 2.6
[DEBUG]   (f) mavenSession = org.apache.maven.execution.MavenSession@4ec1429c
[DEBUG]   (f) overwriteResources = true
[DEBUG]   (f) sourceDirectory = /Users/koraysels/work/TRUVO/atable_TRUNK/m-atable-webapp/src/main/webapp/
[DEBUG] -- end configuration --
...

[ERROR] Failed to execute goal pl.allegro:grunt-maven-plugin:1.1.1:create-resources (default-cli) on project m-atable-webapp: Execution default-cli of goal pl.allegro:grunt-maven-plugin:1.1.1:create-resources failed: A required class was missing while executing pl.allegro:grunt-maven-plugin:1.1.1:create-resources: java/nio/file/FileAlreadyExistsException
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>pl.allegro:grunt-maven-plugin:1.1.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/koraysels/work/TRUVO/repository/pl/allegro/grunt-maven-plugin/1.1.1/grunt-maven-plugin-1.1.1.jar
[ERROR] urls[1] = file:/Users/koraysels/work/TRUVO/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
[ERROR] urls[2] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/aether/aether-spi/0.9.0.M2/aether-spi-0.9.0.M2.jar
[ERROR] urls[3] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/aether/aether-impl/0.9.0.M2/aether-impl-0.9.0.M2.jar
[ERROR] urls[4] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/aether/aether-api/0.9.0.M2/aether-api-0.9.0.M2.jar
[ERROR] urls[5] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
[ERROR] urls[6] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/sisu/org.eclipse.sisu.plexus/0.0.0.M5/org.eclipse.sisu.plexus-0.0.0.M5.jar
[ERROR] urls[7] = file:/Users/koraysels/work/TRUVO/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[8] = file:/Users/koraysels/work/TRUVO/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
[ERROR] urls[9] = file:/Users/koraysels/work/TRUVO/repository/javax/inject/javax.inject/1/javax.inject-1.jar
[ERROR] urls[10] = file:/Users/koraysels/work/TRUVO/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar
[ERROR] urls[11] = file:/Users/koraysels/work/TRUVO/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
[ERROR] urls[12] = file:/Users/koraysels/work/TRUVO/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
[ERROR] urls[13] = file:/Users/koraysels/work/TRUVO/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[14] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M5/org.eclipse.sisu.inject-0.0.0.M5.jar
[ERROR] urls[15] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-interpolation/1.19/plexus-interpolation-1.19.jar
[ERROR] urls[16] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar
[ERROR] urls[17] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[18] = file:/Users/koraysels/work/TRUVO/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[19] = file:/Users/koraysels/work/TRUVO/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[20] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugin-tools/maven-plugin-tools-annotations/3.2/maven-plugin-tools-annotations-3.2.jar
[ERROR] urls[21] = file:/Users/koraysels/work/TRUVO/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[22] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.2/maven-plugin-tools-api-3.2.jar
[ERROR] urls[23] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.2/maven-plugin-annotations-3.2.jar
[ERROR] urls[24] = file:/Users/koraysels/work/TRUVO/repository/asm/asm/3.3.1/asm-3.3.1.jar
[ERROR] urls[25] = file:/Users/koraysels/work/TRUVO/repository/asm/asm-commons/3.3.1/asm-commons-3.3.1.jar
[ERROR] urls[26] = file:/Users/koraysels/work/TRUVO/repository/asm/asm-tree/3.3.1/asm-tree-3.3.1.jar
[ERROR] urls[27] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
[ERROR] urls[28] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
[ERROR] urls[29] = file:/Users/koraysels/work/TRUVO/repository/com/thoughtworks/qdox/qdox/1.12.1/qdox-1.12.1.jar
[ERROR] urls[30] = file:/Users/koraysels/work/TRUVO/repository/org/twdata/maven/mojo-executor/2.1.0/mojo-executor-2.1.0.jar
[ERROR] urls[31] = file:/Users/koraysels/work/TRUVO/repository/com/pyx4j/maven-junction-plugin/1.0.3/maven-junction-plugin-1.0.3.jar
[ERROR] urls[32] = file:/Users/koraysels/work/TRUVO/repository/sysinternals/junction/1.04/junction-1.04.exe
[ERROR] urls[33] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.jar
[ERROR] urls[34] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/shared/maven-filtering/1.1/maven-filtering-1.1.jar
[ERROR] urls[35] = file:/Users/koraysels/work/TRUVO/repository/org/sonatype/plexus/plexus-build-api/0.0.4/plexus-build-api-0.0.4.jar
[ERROR] urls[36] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar
[ERROR] urls[37] = file:/Users/koraysels/work/TRUVO/repository/org/testng/testng/6.8.7/testng-6.8.7.jar
[ERROR] urls[38] = file:/Users/koraysels/work/TRUVO/repository/junit/junit/4.10/junit-4.10.jar
[ERROR] urls[39] = file:/Users/koraysels/work/TRUVO/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar
[ERROR] urls[40] = file:/Users/koraysels/work/TRUVO/repository/com/beust/jcommander/1.27/jcommander-1.27.jar
[ERROR] urls[41] = file:/Users/koraysels/work/TRUVO/repository/org/yaml/snakeyaml/1.12/snakeyaml-1.12.jar
[ERROR] urls[42] = file:/Users/koraysels/work/TRUVO/repository/org/assertj/assertj-core/1.5.0/assertj-core-1.5.0.jar
[ERROR] urls[43] = file:/Users/koraysels/work/TRUVO/repository/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.jar
[ERROR] urls[44] = file:/Users/koraysels/work/TRUVO/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar
[ERROR] urls[45] = file:/Users/koraysels/work/TRUVO/repository/org/objenesis/objenesis/1.0/objenesis-1.0.jar
[ERROR] urls[46] = file:/Users/koraysels/work/TRUVO/repository/com/googlecode/catch-exception/catch-exception/1.2.0/catch-exception-1.2.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: java.nio.file.FileAlreadyExistsException
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal pl.allegro:grunt-maven-plugin:1.1.1:create-resources (default-cli) on project m-atable-webapp: Execution default-cli of goal pl.allegro:grunt-maven-plugin:1.1.1:create-resources failed: A required class was missing while executing pl.allegro:grunt-maven-plugin:1.1.1:create-resources: java/nio/file/FileAlreadyExistsException
-----------------------------------------------------
realm =    plugin>pl.allegro:grunt-maven-plugin:1.1.1
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/koraysels/work/TRUVO/repository/pl/allegro/grunt-maven-plugin/1.1.1/grunt-maven-plugin-1.1.1.jar
urls[1] = file:/Users/koraysels/work/TRUVO/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
urls[2] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/aether/aether-spi/0.9.0.M2/aether-spi-0.9.0.M2.jar
urls[3] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/aether/aether-impl/0.9.0.M2/aether-impl-0.9.0.M2.jar
urls[4] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/aether/aether-api/0.9.0.M2/aether-api-0.9.0.M2.jar
urls[5] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
urls[6] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/sisu/org.eclipse.sisu.plexus/0.0.0.M5/org.eclipse.sisu.plexus-0.0.0.M5.jar
urls[7] = file:/Users/koraysels/work/TRUVO/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
urls[8] = file:/Users/koraysels/work/TRUVO/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
urls[9] = file:/Users/koraysels/work/TRUVO/repository/javax/inject/javax.inject/1/javax.inject-1.jar
urls[10] = file:/Users/koraysels/work/TRUVO/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar
urls[11] = file:/Users/koraysels/work/TRUVO/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
urls[12] = file:/Users/koraysels/work/TRUVO/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
urls[13] = file:/Users/koraysels/work/TRUVO/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
urls[14] = file:/Users/koraysels/work/TRUVO/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M5/org.eclipse.sisu.inject-0.0.0.M5.jar
urls[15] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-interpolation/1.19/plexus-interpolation-1.19.jar
urls[16] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar
urls[17] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[18] = file:/Users/koraysels/work/TRUVO/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[19] = file:/Users/koraysels/work/TRUVO/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[20] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugin-tools/maven-plugin-tools-annotations/3.2/maven-plugin-tools-annotations-3.2.jar
urls[21] = file:/Users/koraysels/work/TRUVO/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
urls[22] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.2/maven-plugin-tools-api-3.2.jar
urls[23] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.2/maven-plugin-annotations-3.2.jar
urls[24] = file:/Users/koraysels/work/TRUVO/repository/asm/asm/3.3.1/asm-3.3.1.jar
urls[25] = file:/Users/koraysels/work/TRUVO/repository/asm/asm-commons/3.3.1/asm-commons-3.3.1.jar
urls[26] = file:/Users/koraysels/work/TRUVO/repository/asm/asm-tree/3.3.1/asm-tree-3.3.1.jar
urls[27] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
urls[28] = file:/Users/koraysels/work/TRUVO/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
urls[29] = file:/Users/koraysels/work/TRUVO/repository/com/thoughtworks/qdox/qdox/1.12.1/qdox-1.12.1.jar
urls[30] = file:/Users/koraysels/work/TRUVO/repository/org/twdata/maven/mojo-executor/2.1.0/mojo-executor-2.1.0.jar
urls[31] = file:/Users/koraysels/work/TRUVO/repository/com/pyx4j/maven-junction-plugin/1.0.3/maven-junction-plugin-1.0.3.jar
urls[32] = file:/Users/koraysels/work/TRUVO/repository/sysinternals/junction/1.04/junction-1.04.exe
urls[33] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.jar
urls[34] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/shared/maven-filtering/1.1/maven-filtering-1.1.jar
urls[35] = file:/Users/koraysels/work/TRUVO/repository/org/sonatype/plexus/plexus-build-api/0.0.4/plexus-build-api-0.0.4.jar
urls[36] = file:/Users/koraysels/work/TRUVO/repository/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar
urls[37] = file:/Users/koraysels/work/TRUVO/repository/org/testng/testng/6.8.7/testng-6.8.7.jar
urls[38] = file:/Users/koraysels/work/TRUVO/repository/junit/junit/4.10/junit-4.10.jar
urls[39] = file:/Users/koraysels/work/TRUVO/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar
urls[40] = file:/Users/koraysels/work/TRUVO/repository/com/beust/jcommander/1.27/jcommander-1.27.jar
urls[41] = file:/Users/koraysels/work/TRUVO/repository/org/yaml/snakeyaml/1.12/snakeyaml-1.12.jar
urls[42] = file:/Users/koraysels/work/TRUVO/repository/org/assertj/assertj-core/1.5.0/assertj-core-1.5.0.jar
urls[43] = file:/Users/koraysels/work/TRUVO/repository/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.jar
urls[44] = file:/Users/koraysels/work/TRUVO/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar
urls[45] = file:/Users/koraysels/work/TRUVO/repository/org/objenesis/objenesis/1.0/objenesis-1.0.jar
urls[46] = file:/Users/koraysels/work/TRUVO/repository/com/googlecode/catch-exception/catch-exception/1.2.0/catch-exception-1.2.0.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

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

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal pl.allegro:grunt-maven-plugin:1.1.1:create-resources failed: A required class was missing while executing pl.allegro:grunt-maven-plugin:1.1.1:create-resources: java/nio/file/FileAlreadyExistsException
-----------------------------------------------------

and this same error keeps repeating...

also tried removing target-grunt and also tried deleting the contents of my static folder

adamdubiel commented 10 years ago

okay, i think i got it. i guess you are using JDK 1.6? because this FileAlreadyExistsException is from JDK 1.7.. i havent checked the compatibility when i was implementing it. im planning on releasing 1.1.2 today, so i can chnage it to JDK 1.6/5 compatible exception

(sorry for spelling but i got this idea in cafe and im writing it from my cellphone)

koraysels commented 10 years ago

this project uses jdk 1.6 indeed

adamdubiel commented 10 years ago

I just uploaded 1.1.2-SNAPSHOT version to Sonatype Snapshot repository:

<snapshotRepository>
    <id>sonatype-nexus-snapshots</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>

It fixes JDK compatibility issue. I still have one more issue for 1.1.2 release, if i won't make it today, you could test if snapshot works for you.

I also added openjdk6 build on Travis, so this kind of compatibility issues should never happen again.