Hi all,
I have seen a few resources about building a theme SWF with FlexMojos (most
notably FlexMojos runtime
CSS<https://github.com/Flexmojos/flexmojos/tree/flexmojos-4.x/flexmojos-testing/flexmojos-test-harness/projects/concept/runtime-css>example).
I have yet to find an example that includes a skin class in the SWF. We
have a project that works when we use the mxmlc compiler:
(names changed to protect the innocent)
mxmlc -output styles.swf style.css
But when we try to build from Maven, we get an exception (it seems to not be
loading the Flex framework). Any help would be appreciated!
directory structure:
src
- main
- flex
- themes
- defaults.css (refers to image.png
and MyButtonSkin.mxml)
- images
image.png
- skins
MyButtonSkin.mxml
pom.xml:
...
<build>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<configuration>
<sourceFile>defaults.css</sourceFile>
</configuration>
</plugin>
</plugins>
</build>
...
This is the error I get
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building [project] 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ brand-brand ---
[INFO] Deleting C:\Projects\Workspace\brand\target
[INFO] Deleting C:\Projects\Workspace\brand\src\main\flex (includes =
[FlexUnitApplication.mxml], excludes = [])
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
brand-brand ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- flexmojos-maven-plugin:4.0-beta-7:compile-swf
(default-compile-swf) @ brand-brand ---
[INFO] Flexmojos 4.0-beta-7
[INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[WARNING] No themes are explicitly defined in the <theme> section or in any
scope="theme" dependencies. Flexmojos is now attempting to figure out which
themes to include. (to avoid this warning you should explicitly state your
theme dependencies)
[WARNING] Added the spark.css theme because spark.swc was included as a
dependency
[WARNING] Added the halo.swc theme because mx.swc was included as a
dependency
Writing configuration dump to
C:\Projects\Workspace\brand\target\brand-brand-1.0-SNAPSHOT-configs.xml
C:\Projects\Workspace\brand\src\main\flex\theme\skins\MyButtonSkin.mxml(34):
Error: [HostComponent] class 'spark.components.Button' not found.
[HostComponent("spark.components.Button")]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 5.800s
[INFO] Finished at: Tue May 24 17:15:30 EDT 2011
[INFO] Final Memory: 11M/69M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-beta-7:compile-swf
(default-compile-swf) on project brand-brand: Got 1 errors building project,
check logs -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-beta-7:compile-swf
(default-compile-swf) on project brand-brand: Got 1 errors building project,
check logs
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
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:319)
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.MojoFailureException: Got 1 errors
building project, check logs
at
org.sonatype.flexmojos.plugin.AbstractMavenMojo.checkResult(AbstractMavenMojo.java:292)
at
org.sonatype.flexmojos.plugin.compiler.AbstractFlexCompilerMojo.executeCompiler(AbstractFlexCompilerMojo.java:1649)
at
org.sonatype.flexmojos.plugin.compiler.MxmlcMojo.execute_aroundBody0(MxmlcMojo.java:152)
at
org.sonatype.flexmojos.plugin.compiler.MxmlcMojo.execute_aroundBody1$advice(MxmlcMojo.java:36)
at
org.sonatype.flexmojos.plugin.compiler.MxmlcMojo.execute_aroundBody2(MxmlcMojo.java:146)
at
org.sonatype.flexmojos.plugin.compiler.MxmlcMojo.execute_aroundBody3$advice(MxmlcMojo.java:14)
at
org.sonatype.flexmojos.plugin.compiler.MxmlcMojo.execute_aroundBody4(MxmlcMojo.java:1)
at
org.sonatype.flexmojos.plugin.compiler.MxmlcMojo.execute_aroundBody5$advice(MxmlcMojo.java:17)
at
org.sonatype.flexmojos.plugin.compiler.MxmlcMojo.execute(MxmlcMojo.java:1)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 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/MojoFailureException
--
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
http://flexmojos.sonatype.org/