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>

-----Message d'origine----- From: Dan Rollo
Sent: Tuesday, April 30, 2013 1:53 AM
To: [email protected]
Subject: Re: how to setup and use maven-flex-plugin

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

Reply via email to