加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex学习 - 1.flexmojos入门

发布时间:2020-12-15 04:24:35 所属栏目:百科 来源:网络整理
导读:flexmojos现在有啥版本? 点击查看:https://repository.sonatype.org/content/sites/maven-sites/flexmojos/ http://mvnrepository.com/artifact/org.sonatype.flexmojos/flexmojos-maven-plugin ? 4.0-RC版本的功能浏览表: https://repository.sonatype.org/

flexmojos现在有啥版本?

点击查看:https://repository.sonatype.org/content/sites/maven-sites/flexmojos/

http://mvnrepository.com/artifact/org.sonatype.flexmojos/flexmojos-maven-plugin

?

4.0-RC版本的功能浏览表:

https://repository.sonatype.org/content/sites/maven-sites/flexmojos/4.0-RC2/plugin-info.html

?

官方flexmojos的主页功能介绍:

https://docs.sonatype.org/display/FLEXMOJOS/Index

?

flexmojos插件github地址:

https://github.com/velo/flexmojos

?

一篇flexmojos基础入门教程:

http://hegang793901.blog.163.com/blog/static/65143168201202915259711/

?

在命令行中创建flexmojos的archetype:

?

?E:_Project_flex>mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.org/content/groups/flexgroup/ -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-application -DarchetypeVersion=4.2-beta

[INFO] Scanning for projects...
[INFO]??????????????????????????????????????????????????????????????????????? ?
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
Define value for property 'groupId': : com.mtea
Define value for property 'artifactId': : flexmojos-temp1
Define value for property 'version':? 1.0-SNAPSHOT: :
Define value for property 'package':? com.mtea: :
Confirm properties configuration:
groupId: com.mtea
artifactId: flexmojos-temp1
version: 1.0-SNAPSHOT
package: com.mtea
?Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: flexmojos-archetypes-application:4.2-beta
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId,Value: com.mtea
[INFO] Parameter: packageName,Value: com.mtea
[INFO] Parameter: package,Value: com.mtea
[INFO] Parameter: artifactId,Value: flexmojos-temp1
[INFO] Parameter: basedir,Value: E:_Project_flex
[INFO] Parameter: version,Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: E:_Project_flexflexmojos-temp1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.244s
[INFO] Finished at: Mon Apr 08 18:43:24 CST 2013
[INFO] Final Memory: 12M/989M
[INFO] ------------------------------------------------------------------------
E:_Project_flex>dir
?驱动器 E 中的卷是 Workplace
?卷的序列号是 1251-EC3E

?E:_Project_flex 的目录

2013/04/08 周一? 18:43??? <DIR>????????? .
2013/04/08 周一? 18:43??? <DIR>????????? ..
2013/03/31 周日? 20:36??? <DIR>????????? cairngorm-2.2.2
2013/03/31 周日? 21:01??? <DIR>????????? cairngorm-src
2013/04/08 周一? 16:21??? <DIR>????????? flex-gather
2013/03/31 周日? 19:17??? <DIR>????????? flexblog
2013/03/16 周六? 18:33??? <DIR>????????? flexmojos-docs
2013/03/27 周三? 23:34??? <DIR>????????? flexmojos-introduction
2013/03/27 周三? 23:34??? <DIR>????????? flexmojos-project-creator
2013/04/08 周一? 18:43??? <DIR>????????? flexmojos-temp1
2013/04/01 周一? 10:47??? <DIR>????????? sems-data-import-flex
?????????????? 0 个文件????????????? 0 字节
????????????? 11 个目录 167,929,352,192 可用字节

E:_Project_flex>cd flexmojos-temp1

E:_Project_flexflexmojos-temp1>dir
?驱动器 E 中的卷是 Workplace
?卷的序列号是 1251-EC3E

?E:_Project_flexflexmojos-temp1 的目录

2013/04/08 周一? 18:43??? <DIR>????????? .
2013/04/08 周一? 18:43??? <DIR>????????? ..
2013/04/08 周一? 18:43???????????? 2,682 pom.xml
2013/04/08 周一? 18:43??? <DIR>????????? src
?????????????? 1 个文件????????? 2,682 字节
?????????????? 3 个目录 167,192 可用字节

E:_Project_flexflexmojos-temp1>mvn org.sonatype.flexmojos:flexmojos-maven-plugin:4.2-beta:flashbuilder

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.713s
[INFO] Finished at: Mon Apr 08 18:44:26 CST 2013
[INFO] Final Memory: 12M/989M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'flashbuilder' in plugin org.sonatype.flexmojos:flexmojos-maven-plugin:4.2-beta among available goals coverage-report,test-compile,compile-swc,wrapper,font2swf,test-run,cc-swc,generate,asdoc-report,dita-asdoc,manifest,compile-swf,cc,asdoc,configurator,trust,create-rsl,optimize-swf,copy-flex-resources,test-swc,sign-air,test-swf,source-view,sources -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException
E:_Project_flexflexmojos-temp1>

?

好尴尬! 为啥4.2-beta没有flashbuilder 的goal

?

再试下RC版本:

?

E:_Project_flex>mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.org/content/groups/flexgroup/ -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-application -DarchetypeVersion=4.0-RC2


[INFO] Scanning for projects...
[INFO]????????????????????????????????????????????????????????????????????????
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
Define value for property 'groupId': : com.mtea
Define value for property 'artifactId': : flexmojos-temp2
Define value for property 'version':? 1.0-SNAPSHOT: :
Define value for property 'package':? com.mtea: :
Confirm properties configuration:
groupId: com.mtea
artifactId: flexmojos-temp2
version: 1.0-SNAPSHOT
package: com.mtea
?Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: flexmojos-archetypes-application:4.0-RC2
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId,Value: flexmojos-temp2
[INFO] Parameter: basedir,Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: E:_Project_flexflexmojos-temp2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.046s
[INFO] Finished at: Mon Apr 08 18:49:34 CST 2013
[INFO] Final Memory: 12M/989M
[INFO] ------------------------------------------------------------------------
E:_Project_flex>cd flexmojos-temp2

E:_Project_flexflexmojos-temp2>dir
?驱动器 E 中的卷是 Workplace
?卷的序列号是 1251-EC3E

?E:_Project_flexflexmojos-temp2 的目录

2013/04/08 周一? 18:49??? <DIR>????????? .
2013/04/08 周一? 18:49??? <DIR>????????? ..
2013/04/08 周一? 18:49???????????? 1,937 pom.xml
2013/04/08 周一? 18:49??? <DIR>????????? src
?????????????? 1 个文件????????? 1,937 字节
?????????????? 3 个目录 167,339,904 可用字节

E:_Project_flexflexmojos-temp2>mvn org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC2:flashbuilder

[INFO] Scanning for projects...
[WARNING] The POM for com.adobe.flex:compiler:pom:4.5.1.21328 is missing,no dependency information available
[WARNING] The POM for com.adobe.flex.compiler:mxmlc:jar:4.5.1.21328 is missing,no dependency information available
[WARNING] The POM for com.adobe.flex.compiler:digest:jar:4.5.1.21328 is missing,no dependency information available
[WARNING] The POM for com.adobe.flex.compiler:optimizer:jar:4.5.1.21328 is missing,no dependency information available
[WARNING] The POM for com.adobe.flex.compiler:asdoc:jar:4.5.1.21328 is missing,no dependency information available
[WARNING] The POM for com.adobe.flex.compiler:swcdepends:jar:4.5.1.21328 is missing,no dependency information available
[WARNING] The POM for net.sf.saxon:saxon-dom:jar:9.0 is missing,no dependency information available
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]??
[ERROR]?? The project com.mtea:flexmojos-temp2:1.0-SNAPSHOT (E:_Project_flexflexmojos-temp2pom.xml) has 2 errors
[ERROR]???? Unresolveable build extension: Plugin org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.adobe.flex.compiler:mxmlc:jar:4.5.1.21328,com.adobe.flex.compiler:digest:jar:4.5.1.21328,com.adobe.flex.compiler:optimizer:jar:4.5.1.21328,com.adobe.flex.compiler:asdoc:jar:4.5.1.21328,com.adobe.flex.compiler:swcdepends:jar:4.5.1.21328,net.sf.saxon:saxon-dom:jar:9.0,com.adobe.flex:compiler:pom:4.5.1.21328: Failure to find com.adobe.flex.compiler:mxmlc:jar:4.5.1.21328 in http://repo.maven.apache.org/maven2 was cached in the local repository,resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 2]
[ERROR]???? Unknown packaging: swf @ line 24,column 14
[ERROR]
[ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
E:_Project_flexflexmojos-temp2>mvn org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC2:flashbuilder -e
[INFO] Error stacktraces are turned on.

[INFO] Scanning for projects...
[WARNING] The POM for com.adobe.flex:compiler:pom:4.5.1.21328 is missing,no dependency information available
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.adobe.flex.compiler:mxmlc:jar:4.5.1.21328,resolution will not be reattempted until the update interval of central has elapsed or updates are forced @
[ERROR] Unknown packaging: swf @ line 24,column 14

??? at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
??? at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
??? at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
??? at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
??? at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
??? at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
??? at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
??? at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
??? at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
??? at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
??? at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
??? at java.lang.reflect.Method.invoke(Method.java:597)
??? at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
??? at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
??? at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
??? at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[ERROR]??
[ERROR]?? The project com.mtea:flexmojos-temp2:1.0-SNAPSHOT (E:_Project_flexflexmojos-temp2pom.xml) has 2 errors
[ERROR]???? Unresolveable build extension: Plugin org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.adobe.flex.compiler:mxmlc:jar:4.5.1.21328,resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 2]
org.apache.maven.plugin.PluginResolutionException: Plugin org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.adobe.flex.compiler:mxmlc:jar:4.5.1.21328,resolution will not be reattempted until the update interval of central has elapsed or updates are forced
??? at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:215)
??? at org.apache.maven.project.DefaultProjectBuildingHelper.resolveExtensionArtifacts(DefaultProjectBuildingHelper.java:377)
??? at org.apache.maven.project.DefaultProjectBuildingHelper.createProjectRealm(DefaultProjectBuildingHelper.java:237)
??? at org.apache.maven.project.DefaultModelBuildingListener.buildExtensionsAssembled(DefaultModelBuildingListener.java:106)
??? at org.apache.maven.model.building.ModelBuildingEventCatapult$1.fire(ModelBuildingEventCatapult.java:43)
??? at org.apache.maven.model.building.DefaultModelBuilder.fireEvent(DefaultModelBuilder.java:1053)
??? at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:388)
??? at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:371)
??? at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:560)
??? at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:352)
??? at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
??? at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
??? at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
??? at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
??? at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
??? at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
??? at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
??? at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
??? at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
??? at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
??? at java.lang.reflect.Method.invoke(Method.java:597)
??? at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
??? at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
??? at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
??? at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: com.adobe.flex.compiler:mxmlc:jar:4.5.1.21328,resolution will not be reattempted until the update interval of central has elapsed or updates are forced
??? at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
??? at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
??? at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358)
??? at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:207)
??? ... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find com.adobe.flex.compiler:mxmlc:jar:4.5.1.21328 in http://repo.maven.apache.org/maven2 was cached in the local repository,resolution will not be reattempted until the update interval of central has elapsed or updates are forced
??? at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:230)
??? at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:204)
??? at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:427)
??? ... 27 more
[ERROR]???? Unknown packaging: swf @ line 24,column 14
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
E:_Project_flexflexmojos-temp2>

?

这又是啥原因呢? 又尴尬了!

?

一不小心发现 Github 上的某项目介绍: https://github.com/justinjmoses/flexmojos-introduction

?

mvn org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:flashbuilder

?

那尝试下3.9吧:

?

E:_Project_flex>mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.org/content/groups/flexgroup/ -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-application -DarchetypeVersion=4.0-RC2

[INFO] Scanning for projects...
[INFO]????????????????????????????????????????????????????????????????????????
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
Define value for property 'groupId': : com.mtea
Define value for property 'artifactId': : flexmojos-flex-env
Define value for property 'version':? 1.0-SNAPSHOT: :
Define value for property 'package':? com.mtea: :
Confirm properties configuration:
groupId: com.mtea
artifactId: flexmojos-flex-env
version: 1.0-SNAPSHOT
package: com.mtea
?Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: flexmojos-archetypes-application:4.0-RC2
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId,Value: flexmojos-flex-env
[INFO] Parameter: basedir,Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: E:_Project_flexflexmojos-flex-env
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.750s
[INFO] Finished at: Mon Apr 08 19:39:07 CST 2013
[INFO] Final Memory: 12M/989M
[INFO] ------------------------------------------------------------------------

E:_Project_flex>cd flexmojos-flex-env

E:_Project_flexflexmojos-flex-env>dir
?驱动器 E 中的卷是 Workplace
?卷的序列号是 1251-EC3E

?E:_Project_flexflexmojos-flex-env 的目录

2013/04/08 周一? 19:39??? <DIR>????????? .
2013/04/08 周一? 19:39??? <DIR>????????? ..
2013/04/08 周一? 19:39???????????? 1,943 pom.xml
2013/04/08 周一? 19:39??? <DIR>????????? src
?????????????? 1 个文件????????? 1,943 字节
?????????????? 3 个目录 167,972,134,912 可用字节

E:_Project_flexflexmojos-flex-env>mvn org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:flashbuilder

[INFO] Scanning for projects...
[WARNING] The POM for com.adobe.flex:compiler:pom:4.5.1.21328 is missing,no dependency information available
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]??
[ERROR]?? The project com.mtea:flexmojos-flex-env:1.0-SNAPSHOT (E:_Project_flexflexmojos-flex-envpom.xml) has 2 errors
[ERROR]???? Unresolveable build extension: Plugin org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.adobe.flex.compiler:mxmlc:jar:4.5.1.21328,column 14
[ERROR]
[ERROR] To see the full stack trace of the errors,please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

?

有问题,需要在pom中添加:

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

?

再来:


E:_Project_flexflexmojos-flex-env>mvn org.sonatype.flexmojos:flexmojos-maven-plugin:3.9:flashbuilder

[INFO] Scanning for projects...
[INFO]????????????????????????????????????????????????????????????????????????
[INFO] ------------------------------------------------------------------------
[INFO] Building flexmojos-flex-env Flex 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> flexmojos-maven-plugin:3.9:flashbuilder (default-cli) @ flexmojos-flex-env >>>
[INFO]
[INFO] <<< flexmojos-maven-plugin:3.9:flashbuilder (default-cli) @ flexmojos-flex-env <<<
[INFO]
[INFO] --- flexmojos-maven-plugin:3.9:flashbuilder (default-cli) @ flexmojos-flex-env ---
[INFO] Using as WTP server : null
[INFO] Adding default classpath contaigner: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkflex-framework4.5.1.21328flex-framework-4.5.1.21328.pom
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkcommon-framework4.5.1.21328common-framework-4.5.1.21328.pom
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkadvancedgrids4.5.1.21328advancedgrids-4.5.1.21328.rb.swc
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkcharts4.5.1.21328charts-4.5.1.21328.rb.swc
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkframework4.5.1.21328framework-4.5.1.21328.rb.swc
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkmx4.5.1.21328mx-4.5.1.21328.rb.swc
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkosmf4.5.1.21328osmf-4.5.1.21328.rb.swc
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkrpc4.5.1.21328rpc-4.5.1.21328.rb.swc
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkspark4.5.1.21328spark-4.5.1.21328.rb.swc
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworktextLayout4.5.1.21328textLayout-4.5.1.21328.rb.swc
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkflash-integration4.5.1.21328flash-integration-4.5.1.21328.rb.swc
[INFO] Unable to read jar manifest from E:m2repositorycomadobeflexframeworkplayerglobal4.5.1.21328playerglobal-4.5.1.21328.rb.swc
[INFO] Using source status cache: E:_Project_flexflexmojos-flex-envtargetmvn-eclipse-cache.properties
[INFO] Not writing settings - defaults suffice
[INFO] Wrote Eclipse project for "flexmojos-flex-env" to E:_Project_flexflexmojos-flex-env.
[INFO]
?????? Sources for some artifacts are not available.
?????? Please run the same goal with the -DdownloadSources=true parameter in order to check remote repositories for sources.
?????? List of artifacts without a source archive:
???????? o com.adobe.flex.framework:flex-framework:4.5.1.21328
???????? o com.adobe.flex.framework:common-framework:4.5.1.21328
???????? o com.adobe.flex.framework:advancedgrids:4.5.1.21328
???????? o com.adobe.flex.framework:authoringsupport:4.5.1.21328
???????? o com.adobe.flex.framework:charts:4.5.1.21328
???????? o com.adobe.flex.framework:core:4.5.1.21328
???????? o com.adobe.flex.framework:flash-integration:4.5.1.21328
???????? o com.adobe.flex.framework:framework:4.5.1.21328
???????? o com.adobe.flex.framework:mx:4.5.1.21328
???????? o com.adobe.flex.framework:osmf:4.5.1.21328
???????? o com.adobe.flex.framework:rpc:4.5.1.21328
???????? o com.adobe.flex.framework:spark:4.5.1.21328
???????? o com.adobe.flex.framework:sparkskins:4.5.1.21328
???????? o com.adobe.flex.framework:spark_dmv:4.5.1.21328
???????? o com.adobe.flex.framework:textLayout:4.5.1.21328
???????? o com.adobe.flex.framework:framework:4.5.1.21328
???????? o com.adobe.flex.framework:playerglobal:4.5.1.21328
???????? o com.adobe.flex.framework:playerglobal:4.5.1.21328
???????? o com.adobe.flexunit:flexunit:0.85

?????? Javadoc for some artifacts is not available.
?????? Please run the same goal with the -DdownloadJavadocs=true parameter in order to check remote repositories for javadoc.
?????? List of artifacts without a javadoc archive:
???????? o com.adobe.flex.framework:flex-framework:4.5.1.21328
???????? o com.adobe.flex.framework:common-framework:4.5.1.21328
???????? o com.adobe.flex.framework:advancedgrids:4.5.1.21328
???????? o com.adobe.flex.framework:authoringsupport:4.5.1.21328
???????? o com.adobe.flex.framework:charts:4.5.1.21328
???????? o com.adobe.flex.framework:core:4.5.1.21328
???????? o com.adobe.flex.framework:flash-integration:4.5.1.21328
???????? o com.adobe.flex.framework:framework:4.5.1.21328
???????? o com.adobe.flex.framework:mx:4.5.1.21328
???????? o com.adobe.flex.framework:osmf:4.5.1.21328
???????? o com.adobe.flex.framework:rpc:4.5.1.21328
???????? o com.adobe.flex.framework:spark:4.5.1.21328
???????? o com.adobe.flex.framework:sparkskins:4.5.1.21328
???????? o com.adobe.flex.framework:spark_dmv:4.5.1.21328
???????? o com.adobe.flex.framework:textLayout:4.5.1.21328
???????? o com.adobe.flex.framework:framework:4.5.1.21328
???????? o com.adobe.flex.framework:playerglobal:4.5.1.21328
???????? o com.adobe.flex.framework:playerglobal:4.5.1.21328
???????? o com.adobe.flexunit:flexunit:0.85

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.221s
[INFO] Finished at: Mon Apr 08 19:40:52 CST 2013
[INFO] Final Memory: 14M/989M
[INFO] ------------------------------------------------------------------------
E:_Project_flexflexmojos-flex-env>

?

--------------------------------华丽分割线-----------------------------------------

?

通过flash goal生成的项目如下:

?

?

导入maven项目:
?


?

出错,不理:?


?

修改项目的属性:


?

无视,点击确定:
?

?

有错,等等处理:

?

?

选中错误,删除它,不影响,虽然我不知道怎么解决:
?

?

发现设计视图可以使用:
?

?

对项目进行maven clean:
?

?

在项目下新建一个文件夹,放入独立版本的debug版本的flash player,因为当你install的时候需要进行test:
?

?

当install完毕之后,尝试打开swf来跑跑看,看看是否能成功


?

总结: flexmojos的接触过程中很多碰壁,需要有耐心和精力去慢慢解决问题 !?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读