When compiling using flexmojos I get the warning:
[WARNING] No themes are explicitly defined in the 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] Adding spark.css theme because spark.swc was included as a dependency
I have tried adding:
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>spark</artifactId>
<type>swc</type>
<scope>theme</scope>
<version>${flex.sdk.version}</version>
</dependency>
But I just get an error:
com.adobe.flex.framework:spark:swc must be one of [compile, runtime, system] but is 'theme'
I just want to use the standard Spark theme.
Thanks
I had the same issue (adding theme worked but it produces ugly warnings). I fixed it by explicitly referencing the theme's CSS file by:
Add the following to your flexmojos configuration:
<themes>
<theme>spark-theme-${flex.sdk.version}.css</theme>
</themes>
Add the theme as a dependency:
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>spark-theme</artifactId>
<version>${flex.sdk.version}</version>
<type>css</type>
</dependency>
pull the dependency in to your output directory. There are several ways to do this, including a simple ant copy. I chose to use the maven dependency plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-theme-file</id>
<phase>process-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<includeArtifactIds>spark-theme</includeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
Following these steps copies the spark-theme's CSS file to the output directory (/target/classes in most cases) and explicitly refers to the CSS file in in the flexmojos configuration.
This completely got rid of all theme warnings for me. I hope this helps someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With