flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject AW: Flex 4.12 with flexmojos-maven-plugin
Date Sat, 29 Mar 2014 23:26:52 GMT
Hi,

you need to specify the compiler the plugin should use, by adding a plugin dependency:
<build>
        <sourceDirectory>src/main/flex</sourceDirectory>
        <testSourceDirectory>src/test/flex</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>net.flexmojos.oss</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>${flexmojos.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <debug>true</debug>
                </configuration>
                    <dependencies>
                        <!-- This handles a bug in maven which causes problems with flex
resources -->
                        <dependency>
                            <groupId>net.flexmojos.oss</groupId>
                            <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
                            <version>${flexmojos.version}</version>
                        </dependency>
                        <!-- Without this FM will use the compiler configured in its
                        master pom, which will result in version conflicts -->
                        <dependency>
                            <groupId>org.apache.flex</groupId>
                            <artifactId>compiler</artifactId>
                            <version>${flex.version}</version>
                            <type>pom</type>
                        </dependency>
                    </dependencies>
            </plugin>
        </plugins>
    </build>

Without this, the default is used, which is currently still 4.11

I am successfully compiling a lot of stuff with 4.12 and it works nicely. And some bugs were
fixed, that were causing a little trouble .. and 4.12 seems to be compiling slightly faster.

Chris


-----Ursprüngliche Nachricht-----
Von: marstonstudio [mailto:jon@marstonstudio.com] 
Gesendet: Samstag, 29. März 2014 21:14
An: users@flex.apache.org
Betreff: Flex 4.12 with flexmojos-maven-plugin

Hello,

I have downloaded the Apache Flex 4.12 binaries and mavenized them, and installed into my
local repository. I have looked through the repository, and the compiler classes are there.

I'd like to use them to compile a simple helloworld project using flexmojos-maven-plugin 7.0.0-SNAPSHOT,
but i get the following error

[ERROR]   The project com.babelcentral:recorder:1.0-SNAPSHOT
(/Users/jon/Workspace/apacheflex/recorder/pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin
net.flexmojos.oss:flexmojos-maven-plugin:7.0.0-SNAPSHOT or one of its dependencies could not
be resolved: The following artifacts could not be
resolved: org.apache.flex.compiler:mxmlc:jar:4.11.0.20131017,
org.apache.flex.compiler:digest:jar:4.11.0.20131017,
org.apache.flex.compiler:optimizer:jar:4.11.0.20131017,
org.apache.flex.compiler:asdoc:jar:4.11.0.20131017,
org.apache.flex.compiler:swcdepends:jar:4.11.0.20131017,
org.apache.flex:compiler:pom:4.11.0.20131017: Could not find artifact
org.apache.flex.compiler:mxmlc:jar:4.11.0.20131017 in release.nexus.babelcentral.com
(http://admin.babelcentral.com:10080/content/groups/public) -> [Help 2]
[ERROR]     Unknown packaging: swf @ line 28, column 16

My questions:

1) How can I set the flexmojos-maven-plugin to look for 4.12 compiler instead of 4.11? My
pom.xml file is below

2) Is 7.0.0-SNAPSHOT a good choice or should I stick with 6.0.1? How would I use Flex 4.12
with 6.0.1?

thanks for the guidance.

<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>mygroup</groupId>
    <artifactId>myartifact</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>swf</packaging>
    <name>Recorder Flex</name>

	<properties>
		<flex.version>4.12.0.20140303</flex.version>
		<flexmojos.version>7.0.0-SNAPSHOT</flexmojos.version>
		<flexmojos.groupId>org.apache.flex</flexmojos.groupId>
	</properties>

    <build>
        <sourceDirectory>src/main/flex</sourceDirectory>
        <testSourceDirectory>src/test/flex</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>net.flexmojos.oss</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>${flexmojos.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <debug>true</debug>
                </configuration>
            </plugin>
        </plugins>
    </build>

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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.flex.framework</groupId>
                <artifactId>framework</artifactId>
                <version>${flex.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

</project>



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-4-12-with-flexmojos-maven-plugin-tp5855.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message