[
http://jira.codehaus.org/browse/MOJO-956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xuhuisheng closed MOJO-956.
---------------------------
Resolution: Fixed
> Failed to extract javascript artifact
> -------------------------------------
>
> Key: MOJO-956
> URL: http://jira.codehaus.org/browse/MOJO-956
> Project: Mojo
> Issue Type: Bug
> Components: javascript-tools
> Environment: windows
> jdk-1.5.0_12
> maven-2.0.7
> Reporter: Xuhuisheng
> Attachments: build.log, JavascriptUnArchiver.diff
>
>
> Hi,
>
> I have a problem when I use WarPackageMojo in javascript-maven-tools.
>
> I have just attached the lastest source files from svn, and try the
> war-project in the javascript-maven-plugin/src/it/ directory.
>
> When I executed the "mvn compile -e", the following problem occured:
>
>
> F:\jsar\javascript-maven-tools\samples\war-project>mvn compile -e
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] Building war Project built by Maven with javascripts
> [INFO] task-segment: [compile]
> [INFO]
> -------------------------------------------------------------------------
> ---
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [javascript:war-package {execution: default}]
> [INFO] No default assembler descriptor - just copy scripts
> [INFO] Unpack javascript dependency
> [org.prototypejs:prototype:javascript:1.5.1.
> 1:compile]
> [INFO] Expanding: C:\Documents and
> Settings\Administrator\.m2\repository\org\pro
> totypejs\prototype\1.5.1.1\prototype-1.5.1.1.jar into
> F:\jsar\javascript-maven-t
> ools\samples\war-project\target\war-project-1\scripts\lib
> - META-INF/maven/org.prototypejs/prototype/pom.xml
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to unpack javascript dependencies
>
> Embedded error: Failed to extract javascript artifact to
> F:\jsar\javascript-mave
> n-tools\samples\war-project\target\war-project-1\scripts\lib
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to unpack
> javascr
> ipt dependencies
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:564)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> fecycle(DefaultLifecycleExecutor.java:480)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:459)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:311)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:278)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to unpack
> java
> script dependencies
> at
> org.codehaus.mojo.javascript.WarPackageMojo.execute(WarPackageMojo.ja
> va:91)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:443)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:539)
> ... 16 more
> Caused by: org.codehaus.plexus.archiver.ArchiverException: Failed to extract
> jav
> ascript artifact to
> F:\jsar\javascript-maven-tools\samples\war-project\target\wa
> r-project-1\scripts\lib
> at
> org.codehaus.mojo.javascript.archive.JavascriptArtifactManager.unpack
> (JavascriptArtifactManager.java:101)
> at
> org.codehaus.mojo.javascript.archive.JavascriptArtifactManager.unpack
> (JavascriptArtifactManager.java:74)
> at
> org.codehaus.mojo.javascript.WarPackageMojo.execute(WarPackageMojo.ja
> va:86)
> ... 18 more
> Caused by: java.lang.NullPointerException
> at
> org.codehaus.plexus.archiver.util.FilterSupport.include(FilterSupport
> .java:38)
> at
> org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.extractFileIfI
> ncluded(AbstractZipUnArchiver.java:121)
> at
> org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.execute(Abstra
> ctZipUnArchiver.java:87)
> at
> org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArc
> hiver.java:85)
> at
> org.codehaus.mojo.javascript.archive.JavascriptArtifactManager.unpack
> (JavascriptArtifactManager.java:97)
> ... 20 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Tue Nov 27 14:28:44 CST 2007
> [INFO] Final Memory: 4M/10M
> [INFO]
> ------------------------------------------------------------------------
>
> F:\jsar\javascript-maven-tools\samples\war-project>
>
>
>
> Then I changed the
> org.codehaus.mojo.javascript.archive.JavascriptUnArchiver.java in
> javascript-maven-archive, deleted 'return !entryName.startsWith( "META-INF"
> );', let it alway return true.
>
> After installed the changed javascript-maven-archive, the problem was solved,
> but the META-INF directory also extract to the scripts/lib/ directory.
>
> How can I changed the source file to make it run the right way? Actually I
> didn't want the META-INF directory and the files under it.
>
>
> Best Regards.
>
> 2007-11-27
> --------------------------------------------------------------------------------
> xyz20003
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email