• Maven环境配置


    1.Android Maven Plugin 参考网站

    http://code.google.com/p/maven-android-plugin/

    2.下载maven  http://maven.apache.org/ 下载最新的Maven

    3.解压放到你想放的位置(例如:D:/Maven 目录)

    4.配置环境变量 MAVEN_HOME=D:Maven  把MAVEN_HOME加入到PATH中 %MAVEN_HOME%in

    5.在D:Mavenconf下面找到settings.xml 配置maven的仓库(当然可以默认)

    <!-- localRepository
    | The path to the local repository maven will use to store artifacts.
    |
    | Default: ${user.home}/.m2/repository
    <localRepository>/path/to/local/repo</localRepository>
    -->
    <localRepository>D:/Maven/repositories</localRepository>

    6.在cmd中输入 mvn -version 查看是否配置成功,如果显示maven版本信息和javaJDK相关信息表示配置成功

    7.配置Maven系统相关 在cmd输入 mvn help:system等带安装系统默认需要的文件(下面是命令行输出内容)

    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-d
    escriptor/2.0.6/maven-plugin-descriptor-2.0.6.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-de
    scriptor/2.0.6/maven-plugin-descriptor-2.0.6.pom (2 KB at 4.8 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
    s/1.5.6/plexus-utils-1.5.6.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils
    /1.5.6/plexus-utils-1.5.6.pom (6 KB at 13.4 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.
    12/plexus-1.0.12.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.1
    2/plexus-1.0.12.pom (10 KB at 16.7 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/jtidy/jtidy/4aug2000r7-dev/jtid
    y-4aug2000r7-dev.pom
    Downloaded: http://repo.maven.apache.org/maven2/jtidy/jtidy/4aug2000r7-dev/jtidy
    -4aug2000r7-dev.pom (2 KB at 3.2 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-cont
    ainer-default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-conta
    iner-default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.pom (2 KB at 2.8 K
    B/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-cont
    ainer-default/1.0-alpha-7/plexus-container-default-1.0-alpha-7.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-conta
    iner-default/1.0-alpha-7/plexus-container-default-1.0-alpha-7.pom (2 KB at 3.2 K
    B/sec)
    Downloading: http://repo.maven.apache.org/maven2/plexus/plexus-containers/1.0.2/
    plexus-containers-1.0.2.pom
    Downloaded: http://repo.maven.apache.org/maven2/plexus/plexus-containers/1.0.2/p
    lexus-containers-1.0.2.pom (471 B at 1.1 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/plexus/plexus-root/1.0.3/plexus
    -root-1.0.3.pom
    Downloaded: http://repo.maven.apache.org/maven2/plexus/plexus-root/1.0.3/plexus-
    root-1.0.3.pom (6 KB at 4.9 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
    s/1.5.7/plexus-utils-1.5.7.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils
    /1.5.7/plexus-utils-1.5.7.pom (8 KB at 13.7 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/jdom/jdom/1.0/jdom-1.0.pom
    Downloaded: http://repo.maven.apache.org/maven2/jdom/jdom/1.0/jdom-1.0.pom (2 KB
    at 3.0 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstrea
    m/1.4.3/xstream-1.4.3.pom
    Downloaded: http://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstream
    /1.4.3/xstream-1.4.3.pom (9 KB at 14.6 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstrea
    m-parent/1.4.3/xstream-parent-1.4.3.pom
    Downloaded: http://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstream
    -parent/1.4.3/xstream-parent-1.4.3.pom (19 KB at 23.8 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/codehaus-parent/3/
    codehaus-parent-3.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/codehaus-parent/3/c
    odehaus-parent-3.pom (5 KB at 10.4 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/xmlpull/xmlpull/1.1.3.1/xmlpull
    -1.1.3.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/xmlpull/xmlpull/1.1.3.1/xmlpull-
    1.1.3.1.pom (386 B at 1.0 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/xpp3/xpp3_min/1.1.4c/xpp3_min-1
    .1.4c.pom
    Downloaded: http://repo.maven.apache.org/maven2/xpp3/xpp3_min/1.1.4c/xpp3_min-1.
    1.4c.pom (2 KB at 4.1 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.4/c
    ommons-lang-2.4.pom
    Downloaded: http://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.4/co
    mmons-lang-2.4.pom (14 KB at 23.9 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/commons/commons-pare
    nt/9/commons-parent-9.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/commons/commons-paren
    t/9/commons-parent-9.pom (22 KB at 28.3 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/1.5.6/slf
    4j-jdk14-1.5.6.jar
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/mave
    n-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-si
    nk-api/1.1/doxia-sink-api-1.1.jar
    Downloading: http://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/1.5.6/
    jcl-over-slf4j-1.5.6.jar
    Downloading: http://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.5.6/slf4j
    -api-1.5.6.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/1.5.6/slf4
    j-jdk14-1.5.6.jar (9 KB at 22.5 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-lo
    gging-api/1.1/doxia-logging-api-1.1.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-log
    ging-api/1.1/doxia-logging-api-1.1.jar (12 KB at 19.5 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/commons-cli/commons-cli/1.2/com
    mons-cli-1.2.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/1.5.6/j
    cl-over-slf4j-1.5.6.jar (17 KB at 13.7 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/backport-util-concurrent/backpo
    rt-util-concurrent/3.1/backport-util-concurrent-3.1.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven
    -reporting-api/2.2.1/maven-reporting-api-2.2.1.jar (10 KB at 6.9 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/sonatype/plexus/plexus-sec-
    dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sin
    k-api/1.1/doxia-sink-api-1.1.jar (13 KB at 9.0 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/sonatype/plexus/plexus-ciph
    er/1.4/plexus-cipher-1.4.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.5.6/slf4j-
    api-1.5.6.jar (22 KB at 15.6 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-inte
    rpolation/1.11/plexus-interpolation-1.11.jar
    Downloaded: http://repo.maven.apache.org/maven2/commons-cli/commons-cli/1.2/comm
    ons-cli-1.2.jar (41 KB at 35.5 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/m
    aven-plugin-tools-api/2.4.3/maven-plugin-tools-api-2.4.3.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/sonatype/plexus/plexus-sec-d
    ispatcher/1.3/plexus-sec-dispatcher-1.3.jar (28 KB at 37.0 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/jtidy/jtidy/4aug2000r7-dev/jtid
    y-4aug2000r7-dev.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/sonatype/plexus/plexus-ciphe
    r/1.4/plexus-cipher-1.4.jar (14 KB at 17.4 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.j
    ar
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-inter
    polation/1.11/plexus-interpolation-1.11.jar (50 KB at 44.0 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-inte
    ractivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-inter
    activity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar (14 KB at 34.3
    KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
    s/1.5.7/plexus-utils-1.5.7.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/ma
    ven-plugin-tools-api/2.4.3/maven-plugin-tools-api-2.4.3.jar (51 KB at 38.0 KB/se
    c)
    Downloading: http://repo.maven.apache.org/maven2/jdom/jdom/1.0/jdom-1.0.jar
    Downloaded: http://repo.maven.apache.org/maven2/jtidy/jtidy/4aug2000r7-dev/jtidy
    -4aug2000r7-dev.jar (135 KB at 65.1 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstrea
    m/1.4.3/xstream-1.4.3.jar
    Downloaded: http://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.ja
    r (119 KB at 35.0 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/xmlpull/xmlpull/1.1.3.1/xmlpull
    -1.1.3.1.jar
    Downloaded: http://repo.maven.apache.org/maven2/backport-util-concurrent/backpor
    t-util-concurrent/3.1/backport-util-concurrent-3.1.jar (324 KB at 67.4 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/xpp3/xpp3_min/1.1.4c/xpp3_min-1
    .1.4c.jar
    Downloaded: http://repo.maven.apache.org/maven2/xmlpull/xmlpull/1.1.3.1/xmlpull-
    1.1.3.1.jar (8 KB at 12.3 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.4/c
    ommons-lang-2.4.jar
    Downloaded: http://repo.maven.apache.org/maven2/xpp3/xpp3_min/1.1.4c/xpp3_min-1.
    1.4c.jar (25 KB at 64.6 KB/sec)
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils
    /1.5.7/plexus-utils-1.5.7.jar (260 KB at 62.9 KB/sec)
    Downloaded: http://repo.maven.apache.org/maven2/jdom/jdom/1.0/jdom-1.0.jar (150
    KB at 39.9 KB/sec)
    Downloaded: http://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.4/co
    mmons-lang-2.4.jar (256 KB at 52.4 KB/sec)
    Downloaded: http://repo.maven.apache.org/maven2/com/thoughtworks/xstream/xstream
    /1.4.3/xstream-1.4.3.jar (471 KB at 48.2 KB/sec)
    [INFO]
    ===============================================================================
    ========================= Platform Properties Details =========================
    ===============================================================================

    ===============================================================================
    System Properties
    ===============================================================================

    java.runtime.name=Java(TM) SE Runtime Environment
    sun.boot.library.path=D:Program Files (x86)Javajdk1.6.0_20jrein
    java.vm.version=16.3-b01
    java.vm.vendor=Sun Microsystems Inc.
    java.vendor.url=http://java.sun.com/
    guice.disable.misplaced.annotation.check=true
    path.separator=;
    java.vm.name=Java HotSpot(TM) Client VM
    file.encoding.pkg=sun.io
    sun.java.launcher=SUN_STANDARD
    user.country=CN
    sun.os.patch.level=Service Pack 1
    java.vm.specification.name=Java Virtual Machine Specification
    user.dir=C:UsersAdministrator
    java.runtime.version=1.6.0_20-b02
    java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
    java.endorsed.dirs=D:Program Files (x86)Javajdk1.6.0_20jrelibendorsed
    os.arch=x86
    java.io.tmpdir=C:UsersADMINI~1AppDataLocalTemp
    line.separator=

    java.vm.specification.vendor=Sun Microsystems Inc.
    user.variant=
    os.name=Windows 7
    classworlds.conf=D:Mavenin..inm2.conf
    sun.jnu.encoding=GBK
    java.library.path=D:Program Files (x86)Javajdk1.6.0_20in;.;C:WindowsSunJ
    avain;C:Windowssystem32;C:Windows;D:Program Files (x86)Javajdk1.6.0_20
    in;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32W
    indowsPowerShellv1.0;C:Program Files (x86)Windows7Master;D:Program FilesTo
    rtoiseSVNin;D:android_Devsdk ools;D:android_Devsdkplatform-tools;D:Prog
    ram Files (x86)Gitin;D:Program Filesapache-antin;D:Mavenin
    java.specification.name=Java Platform API Specification
    java.class.version=50.0
    sun.management.compiler=HotSpot Client Compiler
    os.version=6.1
    user.home=C:UsersAdministrator
    user.timezone=Asia/Shanghai
    java.awt.printerjob=sun.awt.windows.WPrinterJob
    file.encoding=GBK
    java.specification.version=1.6
    java.class.path=D:Mavenin..ootplexus-classworlds-2.5.1.jar
    user.name=Administrator
    org.slf4j.simpleLogger.defaultLogLevel=info
    java.vm.specification.version=1.0
    java.home=D:Program Files (x86)Javajdk1.6.0_20jre
    sun.arch.data.model=32
    user.language=zh
    java.specification.vendor=Sun Microsystems Inc.
    awt.toolkit=sun.awt.windows.WToolkit
    java.vm.info=mixed mode, sharing
    java.version=1.6.0_20
    java.ext.dirs=D:Program Files (x86)Javajdk1.6.0_20jrelibext;C:WindowsSun
    Javalibext
    sun.boot.class.path=D:Program Files (x86)Javajdk1.6.0_20jrelib esources.ja
    r;D:Program Files (x86)Javajdk1.6.0_20jrelib t.jar;D:Program Files (x86)
    Javajdk1.6.0_20jrelibsunrsasign.jar;D:Program Files (x86)Javajdk1.6.0_20
    jrelibjsse.jar;D:Program Files (x86)Javajdk1.6.0_20jrelibjce.jar;D:Prog
    ram Files (x86)Javajdk1.6.0_20jrelibcharsets.jar;D:Program Files (x86)Jav
    ajdk1.6.0_20jreclasses
    java.vendor=Sun Microsystems Inc.
    maven.home=D:Mavenin..
    file.separator=
    java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
    sun.io.unicode.encoding=UnicodeLittle
    sun.cpu.endian=little
    sun.desktop=windows
    sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86

    ===============================================================================
    Environment Variables
    ===============================================================================

    CLASSWORLDS_JAR="D:Mavenin..ootplexus-classworlds-2.5.1.jar"
    PSMODULEPATH=C:Windowssystem32WindowsPowerShellv1.0Modules
    PROGRAMW6432=C:Program Files
    COMMONPROGRAMW6432=C:Program FilesCommon Files
    PROCESSOR_ARCHITECTURE=x86
    CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
    FP_NO_HOST_CHECK=NO
    PATH=D:Program Files (x86)Javajdk1.6.0_20in;C:Windowssystem32;C:Windows;
    C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program
    Files (x86)Windows7Master;D:Program FilesTortoiseSVNin;D:android_Devsdk
    ools;D:android_Devsdkplatform-tools;D:Program Files (x86)Gitin;D:Program
    Filesapache-antin;D:Mavenin
    PROGRAMDATA=C:ProgramData
    ANT_HOME=D:Program Filesapache-ant
    SYSTEMROOT=C:Windows
    TMP=C:UsersADMINI~1AppDataLocalTemp
    PROGRAMFILES(X86)=C:Program Files (x86)
    COMPUTERNAME=2013-20130621YO
    OS=Windows_NT
    PROMPT=$P$G
    WINDIR=C:Windows
    SYSTEMDRIVE=C:
    MAVEN_HOME=D:Maven
    PROCESSOR_ARCHITEW6432=AMD64
    COMSPEC=C:Windowssystem32cmd.exe
    HOMEDRIVE=C:
    LOGONSERVER=\2013-20130621YO
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
    COMMONPROGRAMFILES=C:Program Files (x86)Common Files
    PROGRAMFILES=C:Program Files (x86)
    COMMONPROGRAMFILES(X86)=C:Program Files (x86)Common Files
    TEMP=C:UsersADMINI~1AppDataLocalTemp
    NUMBER_OF_PROCESSORS=4
    USERDOMAIN=2013-20130621YO
    M2_HOME=D:Mavenin..
    HOME=C:UsersAdministrator
    PROCESSOR_LEVEL=6
    ERROR_CODE=0
    SESSIONNAME=Console
    USERNAME=Administrator
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    WINDOWS_TRACING_FLAGS=3
    JAVA_HOME1=D:Program Files (x86)Javajdk1.6.0_20
    PUBLIC=C:UsersPublic
    PROCESSOR_REVISION=3a09
    USERPROFILE=C:UsersAdministrator
    APPDATA=C:UsersAdministratorAppDataRoaming
    HOMEPATH=UsersAdministrator
    LOCALAPPDATA=C:UsersAdministratorAppDataLocal
    JAVA_HOME=D:Program Files (x86)Javajdk1.6.0_20
    CLASSPATH=D:Program Files (x86)Javajdk1.6.0_20libdt.jar;D:Program Files (x
    86)Javajdk1.6.0_20lib ools.jar;
    MAVEN_CMD_LINE_ARGS=help:system
    ALLUSERSPROFILE=C:ProgramData
    MAVEN_JAVA_EXE="D:Program Files (x86)Javajdk1.6.0_20injava.exe"

    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1:27.982s
    [INFO] Finished at: Thu Nov 07 09:59:38 CST 2013
    [INFO] Final Memory: 5M/15M
    [INFO] ------------------------------------------------------------------------
    C:UsersAdministrator>

    表示电脑的Maven环境配置成功!

    eclipse配置Maven环境

    我是eclipse是android官方网站下载的集成环境

    在help-->install new software 输入http://download.eclipse.org/technology/m2e/releases

    选择全部 一路安装下去

    重启eclipse在window-->prefrences能看到Maven表示maven安装eclipse插件成功!

    配置eclipse的Maven-->User settings(如下图),点击apply,OK配置完成成功!!!

    Maven Integration for Android Development Tools安装方法为: Work with中输入https://svn.codespot.com/a/eclipselabs.org/m2eclipse-android-integration/updates/m2eclipse-android-integration/

  • 相关阅读:
    [BZOJ1415]聪聪和可可
    [POJ2096]Collecting Bugs
    开博第一天
    实现CSS样式垂直水平完全居中
    Vue中独立组件之间数据交互
    python Template中substitute()的使用
    eclipse 编辑 python 中文乱码的解决方案
    java Math.random()随机数的产生
    java文件读写的两种方式
    My way on Linux
  • 原文地址:https://www.cnblogs.com/jason-star/p/3411941.html
Copyright © 2020-2023  润新知