Thursday, August 12, 2010

Roo Flex errors - maven dependencies

So, I followed the instructions to setup the Spring Roo Flex 1.5M, so I can type things like:
flex scaffold all

And cool mxml and .as code is made. @Service and @RemotingDestination happen.
BUT, I get a boat-load of maven dependencies squawking at me.

What worked. I finally took the build advice to go hunt down these .jar and .zip files it's after, then ran the correct maven command like:
mvn install:install-file -DgroupId=com.adobe.flex.compiler -DartifactId=asdoc -Dversion=3.2.0.3958 -Dclassifier=template -Dpackaging=zip -Dfile=c:\Temp\asdoc-3.2.0.3958-template.zip

Here are the other errors I'm going to download all the dependencies for. What I don't understand, is that my pom.xml has the repository I'm getting these from. It seems to be grabbing these from the wrong repository!

Is there a button I can hit to cause maven to try again, or try a certain repository?? I'm wondering if my switching from sprint card to LAN caused the problem and it doesn't know that it can try again...

Here are the problems I'm fixing...
8/12/10 5:16:12 PM CDT: Build errors for MyRoo1; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1:compile-swf (compile-scaffold-swf) on project MyRoo1: Execution compile-scaffold-swf of goal org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1:compile-swf failed: Plugin org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1 or one of its dependencies could not be resolved: Missing:
----------
1) com.adobe.flex.compiler:asdoc:zip:template:3.2.0.3958

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.adobe.flex.compiler -DartifactId=asdoc -Dversion=3.2.0.3958 -Dclassifier=template -Dpackaging=zip -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.adobe.flex.compiler -DartifactId=asdoc -Dversion=3.2.0.3958 -Dclassifier=template -Dpackaging=zip -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.sonatype.flexmojos:flexmojos-maven-plugin:maven-plugin:3.7.1
2) com.adobe.flex.compiler:asdoc:zip:template:3.2.0.3958

2) org.jvnet:animal-sniffer-annotation:jar:1.0

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.jvnet -DartifactId=animal-sniffer-annotation -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.jvnet -DartifactId=animal-sniffer-annotation -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.sonatype.flexmojos:flexmojos-maven-plugin:maven-plugin:3.7.1
2) org.jvnet:animal-sniffer-annotation:jar:1.0

3) net.sf.saxon:saxon-dom:jar:9.0

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=net.sf.saxon -DartifactId=saxon-dom -Dversion=9.0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=net.sf.saxon -DartifactId=saxon-dom -Dversion=9.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.sonatype.flexmojos:flexmojos-maven-plugin:maven-plugin:3.7.1
2) net.sf.saxon:saxon-dom:jar:9.0

4) jgoogleanalytics:jgoogleanalytics:jar:0.2

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=jgoogleanalytics -DartifactId=jgoogleanalytics -Dversion=0.2 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=jgoogleanalytics -DartifactId=jgoogleanalytics -Dversion=0.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.sonatype.flexmojos:flexmojos-maven-plugin:maven-plugin:3.7.1
2) jgoogleanalytics:jgoogleanalytics:jar:0.2

5) com.adobe.flex:compiler:pom:4.0.0.14159
Path to dependency:
1) org.sonatype.flexmojos:flexmojos-maven-plugin:maven-plugin:3.7.1
2) com.adobe.flex:compiler:pom:4.0.0.14159

----------
5 required artifacts are missing.

for artifact:
org.sonatype.flexmojos:flexmojos-maven-plugin:maven-plugin:3.7.1

from the specified remote repositories:
central (http://repo1.maven.org/maven2, releases=true, snapshots=false)


2 comments:

Unknown said...

Ok, so I am a complete noob to maven. I got the very same error. Could you tell me WHERE to get these jar/zip files.

Thanks,
Abraham.

Unknown said...

1) com.adobe.flex:compiler:pom:4.0.0.14159
Path to dependency:
1) org.sonatype.flexmojos:flexmojos-maven-plugin:maven-plugin:3.7.1
2) com.adobe.flex:compiler:pom:4.0.0.14159

Does this mean I need to go to flexmojos.. i.e inver the org. stuff?