- 浏览: 100437 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
iswiitfk:
真是个好算法
分页算法中总页数的求法 -
chaodilei:
请问楼主从哪里抄过来的?
Eclipse下SSH集成(JPA) -
xiaowugegzh:
写的不错,QQ 418416015,聊聊技术啊,呵呵
计算出给定日期所在周的周一和周日 -
linhao315:
linhao315 写道在oracle 10g下注释没任何变动 ...
ibator改进,生成中文注释 -
linhao315:
在oracle 10g下注释没任何变动,而且1.2.1中去掉d ...
ibator改进,生成中文注释
网址:http://www.sonatype.com/books/maven-book//reference/flex-dev-sect-config-build.html
20.2. Configuring Build Environment for Flexmojos
Before you attempt to compile Flex libraries and applications with Maven, you will need to complete two configuration tasks:
-
Configure your Maven settings to reference a repository which contains the Flex framework
-
Add the Flash Player to your PATH to support Flex unit testing
-
(Optional) Configure your Maven Settings to include the Sonatype plugin group
To setup your Maven environment, you can install a simple
~/.m2/setting.xml
file which references the
Sonatype public repository directly, or you can install Nexus and add
the Sonatype public repository as a proxy repository in your own
repository manager. While the most straightforward option is to use the
Maven Settings shown in section Section 20.2.1.1, “Using Sonatype's Repository Directly”
, downloading and installing Nexus
will give you the control and flexibility you need to cache and manage
artifacts generated by your own build. If you are just interested in
getting up and running with Flexmojos, read Section 20.2.1.1, “Using Sonatype's Repository Directly”
next. If you are interested in a
long-term solution which can be deployed to support a development team,
continue to Section 20.2.1.2, “Proxying Sonatype's Repository with Nexus”
.
If your organization is already using Sonatype Nexus to proxy
remote repositories, you probably already have a customized
~/.m2/settings.xml
file which points to a single
Nexus group. If this is your situation, you should add a Proxy
repository for the Sonatype public repository group at http://repository.sonatype.com/content/groups/public
.
Adding a proxy repository for this remote group and then adding this
group to your Nexus installation's public repository group will give
clients of your Nexus instance access to the artifacts from the Sonatype
repository.sonatype.com Nexus instance.
Before you run Maven against Flexmojos, you need to configure
you ~/.m2/settings.xml
to contain the following
XML:
Example 20.1. Settings XML for Sonatype Repository
<settings> <mirrors> <mirror> <!--This sends everything else to /public --> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://repository.sonatype.org/content/groups/public</url> </mirror> </mirrors> <profiles> <profile> <id>nexus</id> <!—-Enable snapshots for the built in central repo to direct --> <!--all requests to nexus via the mirror --> <repositories> <repository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <!—-make the profile active all the time --> <activeProfile>nexus</activeProfile> </activeProfiles> </settings>
Note
We suggest that you place the contents of Example 20.1, “Settings XML for Sonatype Repository”
in you
~/.m2/settings.xml
because it is the default
location for Maven Settings. But, if you have already customized
your ~/.m2/settings.xml
you can also put the
the contents of this file in another settings file such as
~/.m2/sonatype-settings.xml
. If you do this,
you just have to remember to specify the location of the settings
file on every Maven command line. For example, mvn
install
would become mvn -s
~/.m2/sonatype-settings.xml install
.
The XML shown in Example 20.1, “Settings XML for Sonatype Repository” , will configure Maven to retrieve all artifacts from the Sonatype Nexus installation which is available at http://repository.sonatype.org . This Nexus installation provides a public group which combines a number of different repositories into a single repository group. Instead of configuring your clients to retrieve artifacts from several different repositories, the Sonatype Nexus repository manager allows you centralizing clients to one point of contact: a single Nexus repository group. Builds with use the Flexmojos plugin rely on Flex artifacts which are not yet available from standard repositories like the Central Maven Repository. Pointing your build at the Sonatype repository allows you to retrieve the necessary libraries, SWFs, and SWCs which are required when building Flex applications.
Instead of pointing directly at the Sonatype public repository, Sonatype recommends that you install a repository manager and proxy the Sonatype public repository. When you proxy a remote repository with a repository manager such as Nexus, you gain a level of control and stability not possible when your build relies directly on external resources. In addition to this control and stability, a repository manager also provides you with an deployment target for binary artifacts generated by your own builds. For instructions on downloading, installing, and configuring Nexus, refer to the Installation chapter in Repository Management with Nexus . Once Nexus is installed and started, complete the following steps to add a proxy repository for the Sonatype public repository.
To add a new proxy repository, click on the Repositories link under Views/Repositories in the Nexus menu on the left-hand side of the Nexus user interface. Clicking on Repositories will load the Repositories panel. In the Repositories panel, click on the Add.. button and select Proxy Repository as shown in Figure 20.1, “Adding a Proxy Repository to Sonatype Nexus” .
Figure 20.1. Adding a Proxy Repository to Sonatype Nexus
Once you've created a new Proxy repository, you will need to configure it to point to the Sonatype public repository. Select the new repository, and then select the Configuration tab in the lower half of the window. Populate the following field with the values shown in Figure 20.2, “Configuring the Sonatype Public Proxy Repository” .
-
Repository ID is "sonatype-public"
-
Repository Name is "Sonatype Public Proxy"
-
The Remote Storage Location is http://repository.sonatype.org/content/groups/public
Figure 20.2. Configuring the Sonatype Public Proxy Repository
Once you have populated the fields shown in Figure 20.2, “Configuring the Sonatype Public Proxy Repository” click the Save button to save the proxy repository and start proxying the Sonatype public repository. Nexus ships with a public repository group, which combines several repositories into a single point of contact for Maven clients. To complete our setup of the new proxy repository, you should add this new proxy repository to the Nexus public group. To do this, return to the list of repositories which should now be visible in the upper half of the Repositories panel as shown in Figure 20.2, “Configuring the Sonatype Public Proxy Repository” . Click on the Public Repositories group and then click on the Configuration tab in the lower half of the Repository panel. Clicking the Configuration tab will expose the Group configuration form shown in Figure 20.3, “Adding the Sonatype Public Proxy to the Public Repositories Group” .
Figure 20.3. Adding the Sonatype Public Proxy to the Public Repositories Group
To add the Sonatype Public Proxy to the Public Repositories group simply drag and drop the Sonatype Public Proxy repository from the Available Repositories list to the Ordered Group Repositories list. Click Save , and you have successfully added a proxy of the Sonatype public repository to your Nexus installation. Whenever a client requests an artifact from this repository group, if Nexus has not already cached a matching artifact, it will query the Sonatype public repository at http://repository.sonatype.org/content/groups/public . Your Nexus installation will maintain a local cache of all artifacts retrieved from the Sonatype repository. This local cache gives you more control and contributes to a more stable build environment. If you are setting up a group of developers to rely upon artifacts from the Sonatype public repository, you'll have a completely self-contained build environment that won't be subject to the availability of the Sonatype repository.
The final step to connecting your Maven installation to the
Nexus instance you just configured is to update your Maven Settings to
use your Nexus repository group as a mirror for all repositories. To
do this, you need to put the following XML in your
~/.m2/settings.xml
file.
Example 20.2. Settings XML for Local Nexus Instance
<settings> <mirrors> <mirror> <!--This sends everything else to /public --> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/nexus/content/groups/public</url> </mirror> </mirrors> <profiles> <profile> <id>nexus</id> <!—-Enable snapshots for the built in central repo to direct --> <!--all requests to nexus via the mirror --> <repositories> <repository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <!—-make the profile active all the time --> <activeProfile>nexus</activeProfile> </activeProfiles> </settings>
This XML file configures Maven to consult a single public repository group for all configured repositories and plugin repositories. It is a simple way to guarantee that every request for an artifact is made through your Nexus installation.
Note
The only difference between Example 20.2, “Settings XML for Local Nexus Instance” and Example 20.1, “Settings XML for Sonatype Repository” is the settings/mirrors/mirror/url element. The first example addresses the Sonatype public repository directly which the second example references a public group on a Nexus instance you maintain. You use Nexus because it allows you to control the repositories and artifacts that are used in your build system. You can think of Nexus as something of a firewall or a centralized point of contact between your builds and the external environment.
发表评论
-
Flex4 全屏 焦点 Halo INavigatorContent 错误 creationPolicy="none"
2010-12-31 13:40 38281 .Flex4中全屏: 在页面中(比方头部页面)中添加 ... -
maven 中 flex 编译选项的local
2010-09-01 17:08 1630The flexmojos goal "flexbu ... -
JavaBean到ActionScript的Bean的简单实现
2010-08-06 16:42 1328在开发数据驱动的Flex企业级开发中,会有很多数据通过Java ... -
Flex DataGrid通用查询组件
2010-07-25 00:14 2394本组件需要"Flex翻页控件 ",我的另 ... -
Flex翻页控件
2010-07-24 23:20 2973页面代码(FlexPager.mxml): <?xml ... -
ActionScript Number(NaN) —> java(null) NaN —> null
2010-06-30 00:39 2088blazeds源码: http://opensource ... -
flex开发小工具
2010-06-21 00:19 994[原文地址:http://nealmi.iteye.com/c ... -
FLEX权限--使用RemoteObject交互结合spring AOP控制项目权限教程
2010-06-08 18:51 1405转载:http://blog.csdn.net/h ... -
Flex3+blazeds3 + Spring BlazeDS1.05 + Spring2.5
2010-05-16 19:31 1331Flex3+blazeds3 + Spring BlazeDS ...
相关推荐
### 配置TwinCAT以控制AM335x #### 一、引言 本文主要介绍了如何利用运行在PC上的TwinCAT软件来控制基于AM335x的EtherCAT从控制器,并监控其输入信号。TwinCAT是贝加莱(Beckhoff)公司的一款软件系统,它能够将...
根据给定的文件信息,可以提取以下知识点: 1. 终端服务会话中InTouch应用程序的配置:在终端服务器节点上使用InTouch应用程序时,需要为每个用户配置属性设置。 2. InTouch会话动态分辨率转换:该技术笔记介绍了...
NAV350 报文解析 Telegram_listing_Telegrams_for_Configuring_and_Operating_the_NAV350_
### Cisco配置粘性参数以用于内容规则 #### 粘性概述 在会话期间,Cisco 内容服务交换机(Content Services Switch, CSS)维护客户端与服务器之间的关联,这种关联被称为粘性(Stickiness)。...
Syngress - Configuring IPv6 for Cisco IOS(2002) 配置IPv6
sap press doc 解压密码:abap_developer
The build settings within Xcode are crucial for configuring how your application is built and run. This reference provides an in-depth look at various build settings that can be customized to suit ...
总结起来,西门子技术指导文件《Configuring a TCP Connection for S7-300/S7-400 Industrial Ethernet CPs》为自动化领域工程师和技术人员提供了一套详尽的TCP连接配置指导,不仅包括了基本的网络和通讯处理器设置...
Configuring SAP R3 FICO The Essential Resource for Configuring the Financial and Controlling Modules
Configuring SAP R3 FICO The Essential Resource for Configuring the Financial and Controlling Modules.part3
在介绍如何配置和调整HP ProLiant服务器以用于低延迟应用程序时,文档主要涉及了在金融服务业中常见的高性能需求,尤其是在高频交易、市场数据分发和交易所数据处理等方面。其他需要低延迟响应的行业还包括实时信号...
Prepare for Microsoft Exam 70-410 – and help demonstrate your real-world mastery of implementing and configuring core services in Windows Server 2012 R2. Designed for experienced IT professionals ...
Prepare for Microsoft Exam 70-687 – and help demonstrate your real-world mastery of configuring Windows 8.1 in the enterprise. Designed for experienced IT professionals ready to advance their status...
This course will help you gain a clearer understanding of OpenStack's components and their interaction with each other to build a cloud environment. The first module, Learning OpenStack, starts with...
The book "Spark for Python Developers" by Amit Nandi aims to provide a concise guide for Python developers looking to implement Spark big data analytics and build real-time, insightful trend trackers...