Hi Fred,

That was a huge help. Thanks!

Adding the new repo containing flexunit (and changing the dep config back to it's original form) worked great. Project builds, and unit test succeeds.

Now I need to undo the unholy mess I made in our repo: I published a bunch of "fake" 4.6 artifacts/poms using modifed 4.9.1 poms. I did this because I could not find any place where the 4.6 artifacts (that FM 6.0.0 was trying to resolve) were publicly published. Maybe you know of another repository URL I could use?

When I removed the "fake 4.6" artifacts, my project give this error:

[ERROR] Unresolveable build extension: Plugin net.flexmojos.oss:flexmojos-maven-plugin:6.0.0 or one of its dependencies could not be resolved: Failed to collect dependencies for net.flexmojos.oss:flexmojos-maven-plugin:jar:6.0.0 (): Failed to read artifact descriptor for net.flexmojos.oss:flexmojos-maven-plugin:jar:6.0.0: Failure to find com.adobe.flex:framework:pom:4.6.0.23201 in http://repository.sonatype.org/content/groups/flexgroup was cached in the local repository, resolution will not be reattempted until the update interval of flex-mojos-plugin-repository has elapsed or updates are forced -> [Help 2]
[ERROR]     Unknown packaging: swc @ line 28, column 16


Notice this: Failure to find com.adobe.flex:framework:pom:4.6.0.23201

This error is what led me to think I can't use FM 6 with FDK 4.9.1 (unless I also already had FDK 4.6). When I put up some fake 4.6 items, things clearly worked, but I really would like to find a cleaner solution.

Latest pom.xml attached.

Thanks again.
Dan


-----------------------------
Hi Dan,

- The 4.10.0-SNAPSHOT is the one I built on top of the develop branch of the
Sdk, indeed, use the release version you like :)
- There are some issues using the Apache group, so I use the Adobe one to
mavenized the Sdk.
- You don't need the adt dependency if your project is not for Air.
- IIRC, for a library, you can declare the playerglobal as external.
- The FU version to use is 4.1.0 and can be found here [1], so, the repo is
https://oss.sonatype.org/content/repositories/releases and the artifact can
be declared like that[2], AFAIK, remove flexmojos-unittest-flexunit4.

Tell me how it goes.

-Fred

[1]
https://oss.sonatype.org/content/repositories/releases/org/flexunit/flexunit/4.1.0/
[2]
<dependency>
    <groupId>org.flexunit</groupId>
    <artifactId>flexunit</artifactId>
    <version>4.1.0</version>
    <classifier>flex4</classifier>
    <type>swc</type>
</dependency>
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Flexmojos is a set of maven goals to allow maven users to compile, optimize and test Flex SWF, Flex SWC, Air SWF and Air SWC.
    Copyright (C) 2008-2012  Marvin Froeder <[email protected]>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

-->
<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>test.com.percro.model</groupId>
    <artifactId>lib-model</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>swc</packaging>

    <name>lib-model Flex</name>

    <properties>
        <flexmojos.version>6.0.0</flexmojos.version>
        <flex.version>4.9.1.1447119</flex.version>

        <!-- Point to standalone flashplayer -->
        <flex.flashPlayer.command>/home/dan/downloads/flashplayerdebugger</flex.flashPlayer.command>
    </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>
                <dependencies>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>${flex.version}</version>
                        <type>pom</type>
                    </dependency>

                    <!-- only need adt dep for AIR project -->
<!--
                    <dependency>
                        <groupId>com.adobe.air.compiler</groupId>
                        <artifactId>adt</artifactId>
                        <version>3.4</version>
                        <type>jar</type>
                    </dependency>
-->
                </dependencies>
                <configuration>
                    <storepass/>
                    <debug>true</debug>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <!--<groupId>org.apache.flex.framework</groupId>-->
            <artifactId>flex-framework</artifactId>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>com.adobe.flash.framework</groupId>
            <artifactId>playerglobal</artifactId>
            <type>rb.swc</type>
            <version>11.4</version>
            <!-- external scope when used in a library project -->
            <scope>external</scope>
        </dependency>


        <!-- flexunit is published in 'flex-unit-repository':https://oss.sonatype.org/content/repositories/releases -->
        <dependency>
            <groupId>org.flexunit</groupId>
            <artifactId>flexunit</artifactId>
            <version>4.1.0</version>
            <classifier>flex4</classifier>
            <type>swc</type>
            <scope>test</scope>
        </dependency>

    </dependencies>

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

    <!-- 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>

        <repository>
            <id>flex-unit-repository</id>
            <url>https://oss.sonatype.org/content/repositories/releases</url>
        </repository>
    </repositories>

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

        <pluginRepository>
            <id>flex-unit-repository</id>
            <url>https://oss.sonatype.org/content/repositories/releases</url>
        </pluginRepository>
    </pluginRepositories>

</project>

Reply via email to