Hi Fred,
Thanks for responding.
The [1] link you sent appears to require different versions of Flex
(4.10.0-SNAPSHOT) and Flexmojos (6.0-SNAPSHOT), and I can't see from the
pom where these are published.
I was able to publish mavenized Apache FDK 4.9.1 artifacts using both
Apache groupId and Adobe groupId to my corporate repo.
I managed to get a test project build further, but had to do some awful
hacks to our repo (publishing 4.9.1 FDK artifacts under modified poms
with a 4.6 version). Without those hacked artifacts, Flexmojos 6.0.0 was
always trying to resolve (and not finding) some 4.6 FDK artifacts. (I
will probably ask for more help when I get around to cleaning up this
mess I've made).
My simple test project (built from flexmojos 6.0.0 archetype) uses Flex
4.9.1.1447119 (published under both Apache groupId and Adobe groupId)
and Flexmojos 6.0.0.
I have managed to get the project to compile, but it fails when trying
to build the tests (and -DskipTests doesn't seem to help):
[ERROR] Failed to execute goal
net.flexmojos.oss:flexmojos-maven-plugin:6.0.0:test-compile
(default-test-compile) on project lib-model:
java.lang.reflect.InvocationTargetException: Not found any compatible
unit test framework
When I add in a test scoped dependency,
<dependency>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-unittest-flexunit4</artifactId>
<version>${flexmojos.version}</version>
<classifier>flex4</classifier>
<type>swc</type>
<scope>test</scope>
</dependency>
the build will not resolve:
[ERROR] Failed to execute goal on project lib-model: Could not resolve
dependencies for project
test.com.percro.model:lib-model:swc:1.0.0-SNAPSHOT: The following
artifacts could not be resolved:
net.flexmojos.oss:flexmojos-unittest-flexunit4:swc:flex4:6.0.0,
org.flexunit:flexunit:swc:flex4:4.1.0: Failure to find
net.flexmojos.oss:flexmojos-unittest-flexunit4:swc:flex4:6.0.0 in
http://repository.spardev.com/sparrowdev/libs-releases-local/ was cached
in the local repository, resolution will not be reattempted until the
update interval of percero-releases has elapsed or updates are forced ->
[Help 1]
It feels like I'm heading down the wrong road trying to force the
released versions of FM 9 and FDK 4.9.1, and maybe I should use newer
snapshots of either?
pom.xml attached.
Any pointers are welcome!
Thanks,
Dan
PS: Would it help if I put my test project on github?
Von: Frédéric THOMAS [[email protected]]
Gesendet: Freitag, 26. April 2013 12:18
An: [email protected]
Betreff: Re: how to setup and use maven-flex-plugin
Hi Dan,
I'm not sure the maven flex plugin is completely implemented, what I do is I
used Flexmojo 6.0 and it works pretty well (an example of pom for an Air
project can be found here [1]).
The Flexmojo 6.x doc here [2] which I built from the sources [3]
Apparently, you've successfully been able to mavenized the Apache Flex Sdk
and deployed it, if you need more help on this, don't hesitate to ask.
Thanks,
-Fred
[1]
https://git-wip-us.apache.org/repos/asf?p=flex-whiteboard.git;a=blob;f=fthomas/developerToolSuite/trunk/pom.xml;h=75e5aaec3a837f96c815d472d741c8eccc054132;hb=HEAD
[2] https://flexmojos.atlassian.net/wiki/display/FLEXMOJOS/Flexmojos+6.x
[3] https://github.com/chrisdutz/flexmojos.git
<?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>
</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>
<dependency>
<groupId>com.adobe.air.compiler</groupId>
<artifactId>adt</artifactId>
<version>3.4</version>
<type>jar</type>
</dependency>
</dependencies>
<!--
<configuration>
<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>
</dependency>
<!--<groupId>org.flexunit</groupId>-->
<!--<artifactId>flexunit</artifactId>-->
<!--<version>4.1.0</version>-->
<dependency>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-unittest-flexunit4</artifactId>
<version>${flexmojos.version}</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>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>flex-mojos-plugin-repository</id>
<url>http://repository.sonatype.org/content/groups/flexgroup</url>
</pluginRepository>
</pluginRepositories>
</project>