Deal of the Day

Home » Main » Manning Forums » 2008 » Flex on Java

Thread: Flex-Mojos Maven Plugin 1.0 final released

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 19 - Pages: 2 [ 1 2 | Next ] - Last Post: Aug 17, 2009 3:27 AM by: wberkel Threads: [ Previous | Next ]
jeremy.anderson


Posts: 62
From: Grand Rapids, MI
Registered: 5/28/08
Flex-Mojos Maven Plugin 1.0 final released
Posted: Jun 18, 2008 5:23 AM
  Click to reply to this thread Reply

The Maven plugin that we'll be using in the book has released it's 1.0 version (http://blog.flex-mojos.info/2008/06/16/10-final/).

joetopshot

Posts: 12
From: Baltimore, MD
Registered: 6/25/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jun 25, 2008 3:20 PM   in response to: jeremy.anderson in response to: jeremy.anderson
  Click to reply to this thread Reply

Too bad you're using maven. I tried using maven twice for projects at work. The only thing I can think of that's worse that maven is Clearcase (totally different classes of applications but I ended up hating both of them). I'm sure part of the problem is me. Nevertheless, I prefer the simplicity of ant even if it doesn't do nearly as much as maven does.

jeremy.anderson


Posts: 62
From: Grand Rapids, MI
Registered: 5/28/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jun 25, 2008 6:14 PM   in response to: joetopshot in response to: joetopshot
  Click to reply to this thread Reply

I realize Maven is not for everyone, and I agree the simplicity of Ant is one of it's strong points, but hopefully this book will help show you how much easier it is to do Flex development with Maven.

sandyboy44


Posts: 33
From: St Louis, MO
Registered: 5/12/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 5, 2008 10:47 AM   in response to: jeremy.anderson in response to: jeremy.anderson
  Click to reply to this thread Reply

I am very pleased with the focus of this book. What is lacking on the internet is a systematic way to tie Java and Flex together using standard build process and Java app servers. This book I hope will fill that gap. I am a die-hard IntelliJ IDEA fan so building with Ant/Maven helps me a lot as it is not tied to any other IDEs like Eclipse or FB3.

The idea of FleXPlanner rocks! We are currently using XPlanner and seriously the UI could use some interactivity.

sandyboy44


Posts: 33
From: St Louis, MO
Registered: 5/12/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 5, 2008 10:50 AM   in response to: jeremy.anderson in response to: jeremy.anderson
  Click to reply to this thread Reply

By the way, I am getting an error in Maven:

[FATAL_ERROR] Maven Embedder execution error: Cannot resolve pre-scanned plugin artifact (for use as an extension): info.rvin.mojo:flex-compiler-mojo: Failed to resolve extension plugin: info.rvin.mojo:flex-compiler-mojo:maven-plugin:1.0-alpha7

Do I need to change something in my POM to get around this plugin issue?

jeremy.anderson


Posts: 62
From: Grand Rapids, MI
Registered: 5/28/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 5, 2008 11:02 AM   in response to: sandyboy44 in response to: sandyboy44
  Click to reply to this thread Reply

Yes, you want to change the version of the flex-compiler-mojo from 1.0-alpha7 to just 1.0

sandyboy44


Posts: 33
From: St Louis, MO
Registered: 5/12/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 6, 2008 9:59 AM   in response to: jeremy.anderson in response to: jeremy.anderson
  Click to reply to this thread Reply

It's either not that simple or I am doing something wrong. There's not much documentation available for the mojo (or at least it not easily accessible). I read as much as possible based on discussion groups and I still cannot get mine to work. I am trying to build the simplest HelloWorld project using Maven based on Ch 2 of your book. As a background, this is very critical to me as I am trying to sell Flex as a UI development technology to my IT organization and am working on a management dashboard application. So naturally things like TFD, Maven, Continuous Integration, Agile, etc, are paramount to my success.

I am now getting the message: (please ignore <my company>)

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: info.rvin.mojo
ArtifactId: flex-compiler-mojo
Version: 1.0

Reason: Unable to download the artifact from any repository

info.rvin.mojo:flex-compiler-mojo:pom:1.0

from the specified remote repositories:
central (<my company> central repository),
epseelon-repository (http://m2repo.epseelon.org/),
flex-mojos-repository (http://svn.sonatype.org/flexmojos/)


Here's my POM:

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.<my company>.commercial</groupId>
<artifactId>commercial-pom</artifactId>
<version>1.0.4</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>HelloWorld</artifactId>
<version>1.0-SNAPSHOT</version>
<name>HelloWorld</name>
<packaging>swf</packaging>
<build>
<finalName>HelloWorld</finalName>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
<plugins>
<plugin>
<groupId>info.rvin.mojo</groupId>
<artifactId>flex-compiler-mojo</artifactId>
<version>1.0</version>
<extensions>true</extensions>
<configuration>
<!--put your configurations here -->
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>flex-mojos-repository</id>
<url>http://svn.sonatype.org/flexmojos/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>epseelon-repository</id>
<url>http://m2repo.epseelon.org/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>flex-mojos-repository</id>
<url>http://svn.sonatype.org/flexmojos/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>epseelon-repository</id>
<url>http://m2repo.epseelon.org/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>com.adobe.flex.sdk</groupId>
<artifactId>playerglobal</artifactId>
<version>3.0.0.3.0.0.477</version>
<type>swc</type>
<scope>external</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.sdk</groupId>
<artifactId>flex</artifactId>
<version>3.0.0.3.0.0.477</version>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.sdk</groupId>
<artifactId>framework</artifactId>
<version>3.0.0.3.0.0.477</version>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.sdk</groupId>
<artifactId>framework</artifactId>
<version>3.0.0.3.0.0.477</version>
<type>resource-bundle</type>
<classifier>en_US</classifier>
</dependency>
<dependency>
<groupId>com.adobe.flex.sdk</groupId>
<artifactId>rpc</artifactId>
<version>3.0.0.3.0.0.477</version>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.sdk</groupId>
<artifactId>rpc</artifactId>
<version>3.0.0.3.0.0.477</version>
<type>resource-bundle</type>
<classifier>en_US</classifier>
</dependency>
<dependency>
<groupId>com.adobe.flex.sdk</groupId>
<artifactId>utilities</artifactId>
<version>3.0.0.3.0.0.477</version>
<type>swc</type>
</dependency>
</dependencies>
</project>

jeremy.anderson


Posts: 62
From: Grand Rapids, MI
Registered: 5/28/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 6, 2008 10:24 AM   in response to: sandyboy44 in response to: sandyboy44
  Click to reply to this thread Reply
Attachment pom.xml (4.2 K)

Ok, it looks like the first problem you're having is the repository location is wrong. It should be http://svn.sonatype.org/flexmojos/repository instead of http://svn.sonatype.org/flexmojos. You also need to update the versions for your Flex dependencies to be 3.0.0.477 instead of 3.0.0.3.0.0.477 otherwise you're likely to run into problems later. I've attached a current copy of the pom that I'm using to develop the sample application, that should help.

sandyboy44


Posts: 33
From: St Louis, MO
Registered: 5/12/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 6, 2008 6:36 PM   in response to: jeremy.anderson in response to: jeremy.anderson
  Click to reply to this thread Reply

Thanks for the file. I did try it out after making changes for my project. Still getting an error as shown below. I rebooted just to make sure and also tried independently at the command prompt and IDEA.

Command prompt error:

[INFO] -----------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] -----------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: info.rvin.mojo
ArtifactId: flex-compiler-mojo
Version: 1.0

Reason: Unable to download the artifact from any repository

info.rvin.mojo:flex-compiler-mojo:pom:1.0

from the specified remote repositories:
central (central repository),
flex-mojos-repository (http://svn.sonatype.org/flexmojos/repository/)


[INFO] -----------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] -----------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sun Jul 06 18:32:14 CDT 2008
[INFO] Final Memory: 1M/2M
[INFO] -----------------------------------------------------------------------


IDEA error (Diana EAP Build #8493):

[FATAL_ERROR] Maven Embedder execution error: Cannot resolve pre-scanned plugin artifact (for use as an extension): info.rvin.mojo:flex-compiler-mojo: Failed to resolve extension plugin: info.rvin.mojo:flex-compiler-mojo:maven-plugin:1.0
org.apache.maven.extension.DefaultExtensionManager.addPluginAsExtension(DefaultExtensionManager.java:239)
org.apache.maven.extension.DefaultBuildExtensionScanner.checkModelBuildForExtensions(DefaultBuildExtensionScanner.java:389)
org.apache.maven.extension.DefaultBuildExtensionScanner.scanInternal(DefaultBuildExtensionScanner.java:187)
org.apache.maven.extension.DefaultBuildExtensionScanner.scanForBuildExtensions(DefaultBuildExtensionScanner.java:107)

sandyboy44


Posts: 33
From: St Louis, MO
Registered: 5/12/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 6, 2008 9:46 PM   in response to: sandyboy44 in response to: sandyboy44
  Click to reply to this thread Reply

I followed this example, http://sebastien-arbogast.com/2008/04/11/flex-spring-and-blazeds-the-full-stack-part-2/ in a fresh directory after clearing my local repo. I changed all the places I needed to based on your POM file attached above (new sonatype repository, etc). I got through all the steps upto the last step when I had to run "mvn install" and then I got this again:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: info.rvin.mojo
ArtifactId: flex-compiler-mojo
Version: 1.0

Reason: Unable to download the artifact from any repository

info.rvin.mojo:flex-compiler-mojo:pom:1.0

from the specified remote repositories:
central (central repository),
epseelon-repository (http://m2repo.epseelon.org/),
flex-mojos-repository (http://svn.sonatype.org/flexmojos/repository/)


Frustrating long weekend and nothing to show for it. I am this close to saying "Maven sucks" but holding it back because it works fine for all my other projects except this one. There's got to be something else and I just cannot figure it out.

bjallmon

Posts: 21
From: Columbus, Ohio
Registered: 5/29/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 7, 2008 8:33 AM   in response to: sandyboy44 in response to: sandyboy44
  Click to reply to this thread Reply

Sorry you are having difficulties with the build and thank you for your feedback and willingness to try it out and share your pain with us. We will try to help you but may need more time and more information. We'll touch base again.

jeremy.anderson


Posts: 62
From: Grand Rapids, MI
Registered: 5/28/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 7, 2008 8:38 AM   in response to: sandyboy44 in response to: sandyboy44
  Click to reply to this thread Reply

It appears to be a network issue. Are you behind a proxy or firewall by chance? When I browse out to the repository I see the artifacts where I would expect to see them (http://svn.sonatype.org/flexmojos/repository/info/rvin/mojo/flex-compiler-mojo/1.0/). Another option is to download the above jar and manually install it to your local repository using this as a guideline (http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html). There is also a mailing list on Google Groups where you could seek help with this (http://groups.google.com/group/flex-mojos).

sandyboy44


Posts: 33
From: St Louis, MO
Registered: 5/12/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 7, 2008 9:36 AM   in response to: jeremy.anderson in response to: jeremy.anderson
  Click to reply to this thread Reply

The first thing I suspected was the network issue but I was able to browse the repository in FireFox since two days. I did download the jar file and installed it manually yesterday (got a BUILD SUCCESSFUL too). I am still getting the same message. Today I will try to see if any of my colleagues can do it. If they are, then I suspect my Maven settings.xml is messed up (I doubt it but cannot rule it out) and will try to replace it with theirs.

Thanks a lot for trying to help but you guys are no way obliged to. I am very much committed to the success of your book since I see a tremendous value in it.

bjallmon

Posts: 21
From: Columbus, Ohio
Registered: 5/29/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 7, 2008 12:17 PM   in response to: sandyboy44 in response to: sandyboy44
  Click to reply to this thread Reply

Thank you for both your patience and your persistence. Keep us posted and we'll definitely let you know if we find anything else.

sandyboy44


Posts: 33
From: St Louis, MO
Registered: 5/12/08
Re: Flex-Mojos Maven Plugin 1.0 final released
Posted: Jul 7, 2008 1:25 PM   in response to: bjallmon in response to: bjallmon
  Click to reply to this thread Reply

I am so embarrassed. It turns out that my company Maven 2.0.8 installation has a modified conf/settings.xml to connect to enterprise central repository. I am not sure if that will conflict with other repositories like the Sonatype one though that seems unlikely. Especially considering that I got a success message when I installed the flex compiler mojo manually. So I am not sure what's with the company's Maven installation 2.0.8. I downloaded and installed 2.0.9 in a different directory and started building with that. Now everything works fine.

Thanks for all your help. I am good to go now (hopefully).

Legend
Gold: 300 + pts
Silver: 100 - 299 pts
Bronze: 25 - 99 pts
Manning Author
Manning Staff
Manning Developmental Editor