I am having a problem compiling a swc using an embedded font in a
stylesheet.

Here is the exception I am getting:

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error compiling!
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error
compiling!
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:583)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:499)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(DefaultLifecycleExecutor.java:478)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
(DefaultLifecycleExecutor.java:291)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        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: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: Error
compiling!
        at
org.sonatype.flexmojos.compiler.AbstractFlexCompilerMojo.build
(AbstractFlexCompilerMojo.java:2275)
        at org.sonatype.flexmojos.compiler.AbstractFlexCompilerMojo.run
(AbstractFlexCompilerMojo.java:1152)
        at org.sonatype.flexmojos.AbstractIrvinMojo.execute
(AbstractIrvinMojo.java:169)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(DefaultLifecycleExecutor.java:558)

Here is the compiler configuration output I get prior to the error:

Min version:  Max version: 2 Current version: 3.2.0.3958
[INFO] Flex compiler configurations:
-compiler.accessible=false
-compiler.actionscript-file-encoding UTF-8
-compiler.allow-source-path-overlap=false
-compiler.as3=true
-compiler.debug=true
-compiler.es=false
-compiler.external-library-path /Users/kldavis/projects/Flex Builder 3/
FontLibTest/target/classes/libraries/playerglobal.swc
-compiler.fonts.advanced-anti-aliasing=true
-compiler.fonts.local-fonts-snapshot /Users/kldavis/projects/Flex
Builder 3/FontLibTest/target/classes/fonts.ser
-compiler.fonts.managers flash.fonts.AFEFontManager
-compiler.fonts.max-cached-fonts 20
-compiler.fonts.max-glyphs-per-face 1000
-compiler.headless-server=false
-compiler.include-libraries=
-compiler.keep-all-type-selectors=false
-compiler.keep-generated-actionscript=false
-compiler.library-path /Users/devuser/.m2/repository/com/adobe/flex/
framework/flex/3.2.0.3958/flex-3.2.0.3958.swc /Users/devuser/.m2/
repository/com/adobe/flex/framework/framework/3.2.0.3958/
framework-3.2.0.3958.swc /Users/devuser/.m2/repository/com/adobe/flex/
framework/rpc/3.2.0.3958/rpc-3.2.0.3958.
swc /Users/devuser/.m2/repository/com/adobe/flex/framework/utilities/
3.2.0.3958/utilities-3.2.0.3958.swc
-compiler.locale=
-compiler.namespaces.namespace http://www.adobe.com/2006/mxml /Users/
kldavis/projects/Flex Builder 3/FontLibTest/target/classes/configs/
mxml-manifest.
xml
-compiler.optimize=true
-compiler.source-path /Users/kldavis/projects/Flex Builder 3/
FontLibTest/src/main/flex
-compiler.strict=true
-compiler.use-resource-bundle-metadata=true
-compiler.verbose-stacktraces=true
-compute-digest=true
-default-background-color 8821927
-default-frame-rate 24
-default-script-limits 1000 60
-default-size 500 375
-licenses.license flexbuilder3 X
-licenses.license flexbuilder3.displayedFirstLaunchMessage true
-licenses.license flexbuilder3.displayedStartPageAtLeastOneTime true
-metadata.date Mon Aug 17 10:19:20 EDT 2009
-target-player 9.0.0
-use-network=true
-verify-digests=true -load-config=
/Users/kldavis/projects/Flex Builder 3/FontLibTest/target/FontLib-1.0-
SNAPSHOT.swc

Here is the project structure:

pom.xml
src\
----main\
--------flex\
------------styles.css
------------Test.mxml
--------resources\
------------arial.ttf

Here is the pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>

  <groupId>foo</groupId>
  <artifactId>FontLib</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>swc</packaging>
  <name>Font Library</name>
  <build>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <version>3.2.0</version>
        <extensions>true</extensions>
        <dependencies>
          <dependency>
            <groupId>com.adobe.flex</groupId>
            <artifactId>compiler</artifactId>
            <version>3.2.0.3958</version>
            <type>pom</type>
          </dependency>
        </dependencies>
        <configuration>
          <verboseStacktraces>true</verboseStacktraces>
          <includeStylesheet>
            <stylesheet>
              <name>styles.css</name>
              <path>src/main/flex/styles.css</path>
            </stylesheet>
          </includeStylesheet>
          <fonts>
            <advanced-anti-aliasing>true</advanced-anti-aliasing>
            <max-cached-fonts>20</max-cached-fonts>
            <max-glyphs-per-face>1000</max-glyphs-per-face>
            <managers>
              <manager-class>flash.fonts.AFEFontManager</manager-
class>
            </managers>
          </fonts>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <version>3.2.0.3958</version>
      <type>pom</type>
    </dependency>

     <dependency>
         <groupId>com.adobe.flex</groupId>
         <artifactId>flex-fontkit</artifactId>
          <version>3.2.0.3958</version>
          <type>jar</type>
      </dependency>
      <dependency>
           <groupId>com.adobe.flex</groupId>
           <artifactId>afe</artifactId>
           <version>3.2.0.3958</version>
           <type>jar</type>
       </dependency>
       <dependency>
            <groupId>com.adobe.flex</groupId>
            <artifactId>aglj32</artifactId>
            <version>3.2.0.3958</version>
            <type>jar</type>
        </dependency>
        <dependency>
             <groupId>com.adobe.flex</groupId>
              <artifactId>rideau</artifactId>
              <version>3.2.0.3958</version>
              <type>jar</type>
        </dependency>
  </dependencies>
</project>

Here is the stylesheets (styles.css):

@font-face {
    src: url("../resources/arial.ttf");
    fontFamily: arial;
}

I have tried a number of variations of the url for the font with the
same results. The only thing that does work is if I embed a local font
instead of referring directly to the font file.

--~--~---------~--~----~------------~-------~--~----~
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://blog.flex-mojos.info/
-~----------~----~----~----~------~----~------~--~---

Reply via email to