Tellurium -待续

http://code.google.com/p/aost/

1.java配置:(这里java安装后路径为d:\program files\java)
   a. 环境变量->用户变量->新建JAVA_HOME变量,值:d:\program files\java\jdk1.6.0
   b. 环境变量->系统变量->CLASSPATH变量,加入:;D:\Program Files\Java\jdk1.6.0\jre\lib
   c. 环境变量->系统变量->path变量,加入:;D:\Program Files\Java\jdk1.6.0\bin

2.maven安装及配置:
   a. 下载:http://maven.apache.org/docs/3.0.3/release-notes.html
   b. 解压:D:\workApps\apache-maven-3.0.4-bin
   c. 环境变量->用户变量->新建M2_HOME变量,值:D:\workApps\apache-maven-3.0.4-bin\apache-maven-3.0.4
   d. 环境变量->系统变量->path变量,加入:;%M2_HOME%\bin

3.修改maven仓库位置:
   a. 修改我们仓库地址,仓库用于存放我们项目所依赖的所有jar包,这里将仓库改为:D:\workApps\apache-maven-3.0.4-bin\apache-maven-3.0.4\localrepository
  b.打开
D:\workApps\apache-maven-3.0.4-bin\apache-maven-3.0.4\lib\settings.xml,将<localRepository>内容变为D:\workApps\apache-maven-3.0.4-bin\apache-maven-3.0.4\localrepository

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository
     -->
  <localRepository>D:\workApps\apache-maven-3.0.4-bin\apache-maven-3.0.4\localrepository</localRepository>

  c. 验证:

     打开cmd,进入D:\workApps\apache-maven-3.0.4-bin\apache-maven-3.0.4\localrepository,输入命令:mvn help:system ,该命令会打印出所有的java系统属性和环境变量。

4.使用maven创建Tellurium Project
  a.打开
D:\workApps\apache-maven-3.0.4-bin\apache-maven-3.0.4\lib\settings.xml,在<profiles>标签下加入如下代码

<profiles>
    <!-- profile
     | Specifies a set of introductions to the build process, to be activated using one or more of the
     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
     | or the command line, profiles have to have an ID that is unique.
     |
     | An encouraged best practice for profile identification is to use a consistent naming convention
     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
     | This will make it more intuitive to understand what the set of introduced profiles is attempting
     | to accomplish, particularly when you only have a list of profile id's for debug.
     |
     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
    <profile>
      <id>jdk-1.4</id>

      <activation>
        <jdk>1.4</jdk>
      </activation>

      <repositories>
        <repository>
          <id>jdk14</id>
          <name>Repository for JDK 1.4 builds</name>
          <url>http://www.myhost.com/maven/jdk14</url>
          <layout>default</layout>
          <snapshotPolicy>always</snapshotPolicy>
        </repository>
      </repositories>
    </profile>
    -->

    <!--
     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
     | might hypothetically look like:
     |
     | ...
     | <plugin>
     |   <groupId>org.myco.myplugins</groupId>
     |   <artifactId>myplugin</artifactId>
     |   
     |   <configuration>
     |     <tomcatLocation>${tomcatPath}</tomcatLocation>
     |   </configuration>
     | </plugin>
     | ...
     |
     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
     |       anything, you could just leave off the <value/> inside the activation-property.
     |
    <profile>
      <id>env-dev</id>

      <activation>
        <property>
          <name>target-env</name>
          <value>dev</value>
        </property>
      </activation>

      <properties>
        <tomcatPath>/path/to/tomcat/instance</tomcatPath>
      </properties>
    </profile>
    -->
        <profile>
        <activation>               
            <activeByDefault>true</activeByDefault>          
        </activation>          
        <repositories>               
            <repository>                    
                <id>kungfuters-public-snapshots-repo</id> 
                <name>Kungfuters.org Public Snapshot Repository</name>    
                <releases>     
                    <enabled>false</enabled>    
                </releases>         
                <snapshots>           
                    <enabled>true</enabled>           
                </snapshots>                        
                <url>http://maven.kungfuters.org/content/repositories/snapshots</url>      
            </repository>          
            <repository>          
                <id>kungfuters-public-releases-repo</id>   
                <name>Kungfuters.org Public Releases Repository</name>       
                <releases>                   
                    <enabled>true</enabled>                
                </releases>                     
                <snapshots>            
                    <enabled>false</enabled>          
                </snapshots>                       
                <url>http://maven.kungfuters.org/content/repositories/releases</url>      
            </repository>        
        </repositories>     
    </profile>
  </profiles>

   c.打开cmd,进入workspace(这里是:D:\automation_try\tellurium\),执行如下命令,创建基于testNG的"demo"项目:
mvn archetype:create -DgroupId=example -DartifactId=demo -DarchetypeArtifactId=tellurium-testng-archetype -DarchetypeGroupId=org.telluriumsource -DarchetypeVersion=0.7.0
 d.进入
D:\automation_try\tellurium\demo\,运行:mvn  eclipse:eclipse   构建成eclipse所能识别的项目结构.

转载于:https://my.oschina.net/hcp/blog/42674

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值