When I run copy-flex-resources goal in maven via the command line,
everything executes perfectly and the war is built in a good state.
However, in Eclipse, when I selected the war project, select Run As ->
maven build -> mvn clean install, Eclipse attempts to run the maven
build and it fails, when flexmojos runs, with the following error:

[DEBUG] Configuring mojo 'org.sonatype.flexmojos:flexmojos-maven-
plugin:3.5.0:copy-flex-resources' -->
[DEBUG]   (f) copyRSL = true
[DEBUG]   (f) copyRuntimeLocales = true
[DEBUG]   (f) localRepository = Repository[local|file://C:\Documents
and Settings\[user]\.m2\repository]
[DEBUG]   (f) project = MavenProject: test-war:0.0.1-SNAPSHOT @ C:\svn
\trunk\testProjects\test-war\pom.xml
[DEBUG]   (f) remoteRepositories = [repos go here]
[DEBUG]   (f) skip = false
[DEBUG]   (f) stripVersion = false
[DEBUG]   (f) useFinalName = true
[DEBUG]   (f) webappDirectory = C:\svn\trunk\testProjects\test-war
\target\test-war
[DEBUG] -- end configuration --
[INFO] [flexmojos:copy-flex-resources {execution: default}]
[INFO] Flexmojos 3.5.0
[INFO]   Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT
file
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to copy C:\svn\trunk\core\Module\core.flex-module\target
\classes

Embedded error: C:\svn\trunk\core\Module\core.flex-module\target
\classes (Access is denied)
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to copy
C:\svn\trunk\core\Module\core.flex-module\target\classes
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
719)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:
556)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:
535)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:
387)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:
348)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:
180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:
60)
        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.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
copy C:\svn\trunk\core\Module\core.flex-module\target\classes
        at org.sonatype.flexmojos.war.CopyMojo.copy(CopyMojo.java:362)
        at org.sonatype.flexmojos.war.CopyMojo.execute(CopyMojo.java:160)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:
490)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
694)
        ... 17 more
Caused by: java.io.FileNotFoundException: C:\svn\trunk\core\Module
\core.flex-module\target\classes (Access is denied)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:820)
        at org.sonatype.flexmojos.war.CopyMojo.copy(CopyMojo.java:358)
        ... 20 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Thu Mar 11 16:23:32 EST 2010
[INFO] Final Memory: 30M/86M
[INFO]
------------------------------------------------------------------------


Here is the part of my pom where I'm using flexmojos.  I'm using it to
copy swf dependencies into the war:

                        <plugin>
                                <groupId>org.sonatype.flexmojos</groupId>
                                <artifactId>flexmojos-maven-plugin</artifactId>
                                <version>3.5.0</version>
                                <executions>
                                        <execution>
                                                <goals>
                                                        
<goal>copy-flex-resources</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin>

Further information:
Windows XP Professional SP3
Eclipse 3.4.2
Maven 2.1.1
Ant 1.7.1


Questions:
Why is flexmojos seemingly trying to access the maven build directory
of a project elsewhere?

Why would this build fail in Eclipse but not at the command-line?


Please let me know if you need further information.

-- 
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos?hl=en?hl=en

http://flexmojos.sonatype.org/

Reply via email to