flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gautam Pandey <gkpte...@gmail.com>
Subject Re: Need help on flexmojo
Date Mon, 13 Oct 2014 06:34:01 GMT
Thank you Chris,
    Still its not going through. Build is failing with same error. My new
pom.xml is :

<?xml version="1.0" encoding="UTF-8"?>
  <!--

    Copyright 2008 Marvin Herman Froeder
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>com.gkp.app</groupId>
  <artifactId>MyProject</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>swf</packaging>

  <name>MyProject Flex</name>
  <properties>
<flexmojos.version>6.0.1</flexmojos.version>
<flex.version>4.6.0.23201</flex.version>
<flash.version>11.1</flash.version>
  </properties>

  <build>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <plugins>
      <plugin>

        <groupId>net.flexmojos.oss</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <version>${flexmojos.version}</version>
        <extensions>true</extensions>
<configuration>
<sourceFile>Main.mxml</sourceFile>
<sourcePaths>
<path>src/main/flex</path>
<path>src/main/resources</path>
</sourcePaths>
<debug>true</debug>
</configuration>
<dependencies>
<dependency>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
<version>${flexmojos.version}</version>
</dependency>
<dependency>
  <groupId>com.adobe.flex</groupId>
  <artifactId>compiler</artifactId>
  <version>${flex.version}</version>
  <type>pom</type>
</dependency>
        </dependencies>

      </plugin>
    </plugins>
  </build>

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

    <dependency>
      <groupId>com.adobe.flash.framework</groupId>
      <artifactId>playerglobal</artifactId>
      <version>${flash.version}</version>
      <type>swc</type>
    </dependency>
  </dependencies>

  <!-- Repository and PluginRepository section for Flex SDK and compiler
dependencies.
       Note: instead of including this in every POM, you can append it to
your user (~/.m2/settings.xml) or global
  (M2_HOME/conf/settings.xml) settings file.
    -->
  <repositories>
     <repository>
        <id>flex-mojos-repository</id>
        <url>http://repository.sonatype.org/content/groups/flexgroup</url>
     </repository>
  </repositories>

  <pluginRepositories>
     <pluginRepository>
        <id>flex-mojos-plugin-repository</id>
        <url>http://repository.sonatype.org/content/groups/flexgroup</url>
     </pluginRepository>
  </pluginRepositories>
</project>

Did I miss anything?

-- 
*Thanks & Regards*
*Gautam Pandey*
*Tegile Systems*
*Ph : 9243014820*


On Mon, Oct 13, 2014 at 11:44 AM, Christofer Dutz <christofer.dutz@c-ware.de
> wrote:

> When embedding fonts and images I have found that you need to add the
> threadlocal toolkit dependency before the compiler artifact in the plugin
> configuration ... just search for "threadlocal toolkit".
>
> Chris
> ________________________________________
> Von: Gautam Pandey <gkptechi@gmail.com>
> Gesendet: Montag, 13. Oktober 2014 08:00
> An: users@flex.apache.org
> Betreff: Re: Need help on flexmojo
>
> Hi Chris,
>    Now I am trying to build the sample application with 4.6 SDK. Without
> adding any image, build is going fine but when I add an image to the
> Main.mxml, it is throwing error* Unable to transcode add.png.* Error stack
> is as follow:
>
> *Writing configuration dump to
> D:\FlexMavenTest\MyProject\target\MyProject-1.0-SNAPSHOT-configs.xml*
> *D:\FlexMavenTest\MyProject\src\main\flex\Main.mxml(17): Error: unable to
> resolve 'add.png' for transcoding*
>
> *                        [Embed(source="add.png")]*
>
> *D:\FlexMavenTest\MyProject\src\main\flex\Main.mxml(17): Error: Unable to
> transcode add.png.*
>
> *                        [Embed(source="add.png")]*
>
> *[INFO]
> ------------------------------------------------------------------------*
> *[INFO] BUILD FAILURE*
> *[INFO]
> ------------------------------------------------------------------------*
> *[INFO] Total time: 7.396s*
> *[INFO] Finished at: Mon Oct 13 11:22:31 IST 2014*
> *[INFO] Final Memory: 35M/495M*
> *[INFO]
> ------------------------------------------------------------------------*
> *[ERROR] Failed to execute goal
> net.flexmojos.oss:flexmojos-maven-plugin:6.0.1:compile-swf
> (default-compile-swf) on project MyProject: Got 2*
> * errors building project, check logs -> [Help 1]*
> *org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal net.flexmojos.oss:flexmojos-maven-plugin:6.0.1:compile-swf (*
> *default-compile-swf) on project MyProject: Got 2 errors building project,
> check logs*
> *        at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)*
> *        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:317)*
> *        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)*
> *        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)*
> *        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)*
> *        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)*
> *        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
> *        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)*
> *        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)*
> *        at java.lang.reflect.Method.invoke(Method.java:606)*
> *        at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)*
> *        at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)*
> *        at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)*
> *        at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)*
> *Caused by: org.apache.maven.plugin.MojoFailureException: Got 2 errors
> building project, check logs*
> *        at
>
> net.flexmojos.oss.plugin.AbstractMavenMojo.checkResult(AbstractMavenMojo.java:314)*
> *        at
>
> net.flexmojos.oss.plugin.compiler.AbstractFlexCompilerMojo.executeCompiler(AbstractFlexCompilerMojo.java:1691)*
> *        at
>
> net.flexmojos.oss.plugin.compiler.MxmlcMojo.execute_aroundBody0(MxmlcMojo.java:169)*
> *        at
>
> net.flexmojos.oss.plugin.compiler.MxmlcMojo.execute_aroundBody1$advice(MxmlcMojo.java:53)*
> *        at
>
> net.flexmojos.oss.plugin.compiler.MxmlcMojo.execute_aroundBody2(MxmlcMojo.java:163)*
> *        at
>
> net.flexmojos.oss.plugin.compiler.MxmlcMojo.execute_aroundBody3$advice(MxmlcMojo.java:31)*
> *        at
>
> net.flexmojos.oss.plugin.compiler.MxmlcMojo.execute_aroundBody4(MxmlcMojo.java:1)*
> *        at
>
> net.flexmojos.oss.plugin.compiler.MxmlcMojo.execute_aroundBody5$advice(MxmlcMojo.java:34)*
> *        at
> net.flexmojos.oss.plugin.compiler.MxmlcMojo.execute(MxmlcMojo.java:1)*
> *        at
>
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)*
> *        at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)*
> *        ... 19 more*
> *[ERROR]*
> *[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
> <http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException>*
> *D:\FlexMavenTest\MyProject>*
>
>
> Do you have any idea how this can be resolved ? I am able to run the
> application from my Flash Builder without any problem. It will be great
> help if you can point out the issue.
>
> *My pom.xml  is :*
>
> *<?xml version="1.0" encoding="UTF-8"?>*
> *  <!--*
>
> *    Copyright 2008 Marvin Herman Froeder*
> *    Licensed under the Apache License, Version 2.0 (the "License");*
> *    you may not use this file except in compliance with the License.*
> *    You may obtain a copy of the License at*
>
> *        http://www.apache.org/licenses/LICENSE-2.0
> <http://www.apache.org/licenses/LICENSE-2.0>*
>
> *    Unless required by applicable law or agreed to in writing, software*
> *    distributed under the License is distributed on an "AS IS" BASIS,*
> *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.*
> *    See the License for the specific language governing permissions and*
> *    limitations under the License.*
>
> *-->*
> *<project xmlns="http://maven.apache.org/POM/4.0.0
> <http://maven.apache.org/POM/4.0.0>"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> <http://www.w3.org/2001/XMLSchema-instance>"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> <http://maven.apache.org/POM/4.0.0>
> http://maven.apache.org/maven-v4_0_0.xsd
> <http://maven.apache.org/maven-v4_0_0.xsd>">*
> *  <modelVersion>4.0.0</modelVersion>*
>
> *  <groupId>com.gkp.app</groupId>*
> *  <artifactId>MyProject</artifactId>*
> *  <version>1.0-SNAPSHOT</version>*
> *  <packaging>swf</packaging>*
>
> *  <name>MyProject Flex</name>*
> *  <properties>*
> * <flexmojos.version>6.0.1</flexmojos.version>*
> * <flex.version>4.6.0.23201</flex.version>*
> * <flash.version>11.1</flash.version>*
> *  </properties>*
>
> *  <build>*
> *    <sourceDirectory>src/main/flex</sourceDirectory>*
> *    <plugins>*
> *      <plugin>*
>
> *        <groupId>net.flexmojos.oss</groupId>*
> *        <artifactId>flexmojos-maven-plugin</artifactId>*
> *        <version>${flexmojos.version}</version>*
> *        <extensions>true</extensions>*
> * <configuration>*
> * <sourceFile>Main.mxml</sourceFile>*
> * <sourcePaths>*
> * <path>src/main/flex</path>*
> * <path>src/main/resources</path>*
> * </sourcePaths> *
> * <debug>true</debug>*
> * </configuration>*
> * <dependencies>*
> * <dependency>*
> * <groupId>net.flexmojos.oss</groupId>*
> * <artifactId>flexmojos-maven-plugin</artifactId>*
> * <version>${flexmojos.version}</version>*
> * </dependency>*
> * <dependency>*
> *  <groupId>com.adobe.flex</groupId>*
> *  <artifactId>compiler</artifactId>*
> *  <version>${flex.version}</version>*
> *  <type>pom</type>*
> * </dependency>*
> *        </dependencies>*
>
> *      </plugin>*
> *    </plugins>*
> *  </build>*
>
> *  <dependencies>*
> * <dependency>*
> * <groupId>net.flexmojos.oss</groupId>*
> * <artifactId>flexmojos-maven-plugin</artifactId>*
> * <version>${flexmojos.version}</version>*
> * </dependency>*
> * <dependency>*
> *      <groupId>com.adobe.flex.framework</groupId>*
> *      <artifactId>flex-framework</artifactId>*
> *      <version>${flex.version}</version>*
> *      <type>pom</type>*
> *    </dependency>*
>
> *    <dependency>*
> *      <groupId>com.adobe.flash.framework</groupId>*
> *      <artifactId>playerglobal</artifactId>*
> *      <version>${flash.version}</version>*
> *      <type>swc</type>*
> *    </dependency>*
> *  </dependencies>*
>
> *  <!-- Repository and PluginRepository section for Flex SDK and compiler
> dependencies. *
> *       Note: instead of including this in every POM, you can append it to
> your user (~/.m2/settings.xml) or global *
> *  (M2_HOME/conf/settings.xml) settings file. *
> *    -->*
> *  <repositories>*
> *     <repository>*
> *        <id>flex-mojos-repository</id>*
> *        <url>http://repository.sonatype.org/content/groups/flexgroup
> <http://repository.sonatype.org/content/groups/flexgroup></url>*
> *     </repository>*
> *  </repositories>*
>
> *  <pluginRepositories>*
> *     <pluginRepository>*
> *        <id>flex-mojos-plugin-repository</id>*
> *        <url>http://repository.sonatype.org/content/groups/flexgroup
> <http://repository.sonatype.org/content/groups/flexgroup></url>*
> *     </pluginRepository>*
> *  </pluginRepositories>*
> *</project>*
>
> *And Main.mxml is :*
>
> <?xml version="1.0" encoding="utf-8"?>
> <!--
>
>      Copyright 2008 Marvin Herman Froeder
>      Licensed under the Apache License, Version 2.0 (the "License"); you
> may not use this file except in compliance with the License. You may obtain
> a copy of the License at
>      http://www.apache.org/licenses/LICENSE-2.0
>      Unless required by applicable law or agreed to in writing, software
> distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
> WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
> License for the specific language governing permissions and limitations
> under the License.
>
>
> -->
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>    xmlns:s="library://ns.adobe.com/flex/spark"
>    xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
> minHeight="600">
> <fx:Script>
> <![CDATA[
> [Bindable]
> [Embed(source="add.png")]
> private var imgclass : Class;
> ]]>
> </fx:Script>
> <fx:Declarations>
> <!-- Place non-visual elements (e.g., services, value objects) here -->
> </fx:Declarations>
> <s:Label text="Hello World." left="60" top="20"/>
> <s:Image source="{imgclass}" left="20" top="20"/>
> </s:Application>
>
> --
> *Thanks & Regards*
> *Gautam Pandey*
> *Tegile Systems*
> *Ph : 9243014820*
>
>
> On Thu, Oct 9, 2014 at 7:07 PM, Gautam Pandey <gkptechi@gmail.com> wrote:
>
> > Thanks Chris,
> >      I have mavenized the 4.13 FDK following the steps given in
> >
> https://cwiki.apache.org/confluence/display/FLEX/Building+Flex+applications+with+Maven
> and
> > copied to my local repo. I never did maven things so I am not sure about
> > the things. Currently learning maven concepts to point out the exact
> cause.
> > Do I need to build flexmojos also and deploy to local repo?
> >
> > Thanks
> > Gautam
> >
> > On Thu, Oct 9, 2014 at 6:20 PM, Christofer Dutz <
> christofer.dutz@c-ware.de
> > > wrote:
> >
> >> Have you manually created the Maven artifacts for Flex 4.13?
> >> If not that's exactly what Maven is complaining about. Currently there
> is
> >> no Apache Flex FDK publicaly available in any public Maven repository.
> We
> >> are working on this, but I't still a mile to go.
> >>
> >> Chris
> >>
> >> ________________________________________
> >> Von: Gautam Pandey <gkptechi@gmail.com>
> >> Gesendet: Mittwoch, 8. Oktober 2014 15:50
> >> An: users@flex.apache.org
> >> Betreff: Re: Need help on flexmojo
> >>
> >> I guess I am missing repositories and pluginRepositories like things. I
> >> don't know what should be added in this section. Can someone confirm
> below
> >> default things will work or not?
> >>
> >>  <!-- Repository and PluginRepository section for Flex SDK and compiler
> >> dependencies.
> >>        Note: instead of including this in every POM, you can append it
> to
> >> your user (~/.m2/settings.xml) or global
> >>   (M2_HOME/conf/settings.xml) settings file.
> >>     -->
> >>   <repositories>
> >>      <repository>
> >>         <id>flex-mojos-repository</id>
> >>         <url>http://repository.sonatype.org/content/groups/flexgroup
> >> </url>
> >>      </repository>
> >>   </repositories>
> >>
> >>   <pluginRepositories>
> >>      <pluginRepository>
> >>         <id>flex-mojos-plugin-repository</id>
> >>         <url>http://repository.sonatype.org/content/groups/flexgroup
> >> </url>
> >>      </pluginRepository>
> >>   </pluginRepositories>
> >>
> >> On Wed, Oct 8, 2014 at 6:52 PM, Tom Chiverton <tc@extravision.com>
> wrote:
> >>
> >> > On 08/10/14 11:23, Gautam Pandey wrote:
> >> >
> >> >> Fai
> >> >> lure to find com.adobe.flash:playerglobal:swc:11.1 in
> >> >> http://repo.maven.apache.org/maven2  was cached in the local
> >> repository,
> >> >> resolution wi
> >> >> ll not be reattempted until the update interval of central has
> elapsed
> >> or
> >> >> updates are forced
> >> >>
> >> > I don't know much Maven, but did you try forcing this update ?
> >> >
> >> > Tom
> >> >
> >>
> >>
> >>
> >> --
> >> *Thanks & Regards*
> >> *Gautam Pandey*
> >> *Tegile Systems*
> >> *Ph : 9243014820*
> >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message