代码之家  ›  专栏  ›  技术社区  ›  Lydon Ch

Maven jetty下载依赖项

  •  3
  • Lydon Ch  · 技术社区  · 15 年前

    [INFO] Scanning for projects..    
    [INFO] Searching repository for plugin with prefix: 'jetty'.
    [INFO] ------------------------------------------------------------------------
    [INFO] Building infolitReport
    [INFO]    task-segment: [jetty:run]
    [INFO] ------------------------------------------------------------------------
    [INFO] Preparing jetty:run
    Downloading: http://repository.springsource.com/maven/bundles/release/org/apache/poi/com.springsource.org.apache.poi/3.6/com.springsource.org.apache.poi-3.6.pom
    Downloading: http://repository.springsource.com/maven/bundles/external/org/apache/poi/com.springsource.org.apache.poi/3.6/com.springsource.org.apache.poi-3.6.pom
    Downloading: http://repository.springsource.com/maven/bundles/milestone/org/apache/poi/com.springsource.org.apache.poi/3.6/com.springsource.org.apache.poi-3.6.pom
    Downloading: http://repository.springsource.com/maven/bundles/snapshot/org/apache/poi/com.springsource.org.apache.poi/3.6/com.springsource.org.apache.poi-3.6.pom
    Downloading: http://repo1.maven.org/maven2/org/apache/poi/com.springsource.org.apache.poi/3.6/com.springsource.org.apache.poi-3.6.pom
    Downloading: http://repository.springsource.com/maven/bundles/release/com/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2.pom
    Downloading: http://repository.springsource.com/maven/bundles/external/com/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2.pom
    Downloading: http://repository.springsource.com/maven/bundles/milestone/com/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2.pom
    Downloading: http://repository.springsource.com/maven/bundles/snapshot/com/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2.pom
    Downloading: http://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2.pom
    [INFO] [aspectj:compile {execution: default}]
    
    4 回复  |  直到 15 年前
        1
  •  4
  •   Pascal Thivent    15 年前

    如本章所述 3.5.5. Maven's Dependency Management

    Maven中的依赖项不仅仅是一个JAR文件;它是一个POM文件,反过来,它可以声明对其他工件的依赖关系。依赖项的这些依赖项称为传递依赖项,它们之所以成为可能,是因为Maven存储库存储的不仅仅是字节码;它存储有关工件的元数据。

    这里有4个选项:

    1. 使用存储库管理器创建并上载POM文件。
    2. install:install-file ).
    3. 带着它生活(叹息)然后跑 mvn -o 减少痛苦的选择。
        2
  •  0
  •   ant    15 年前

    你为什么要阻止它?您可以在不下载依赖项的情况下运行它吗?如果你还想这么做,就把这件事解决掉

    http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html

    看看exlude标签

        3
  •  0
  •   virsir    15 年前

    如果您并不总是有internet连接,或者只是想缩短构建时间,您可以附加 -o 参数,表示 比如说跑步 mvn jetty:run -o

        4
  •  0
  •   sjngm quinti    13 年前

    Pascal Thivent的回答示例

    在本地存储库中创建POM文件(例如使用 install:install-file )

    mvn install:install-file -DgroupId=org.apache.commons -DartifactId=codec -Dversion=1.3 -Dpackaging=jar -Dfile=lib/commons-codec-1.3.jar -DgeneratePom=true
    mvn install:install-file -DgroupId=org.apache.commons -DartifactId=httpclient -Dversion=3.1 -Dpackaging=jar -Dfile=lib/commons-httpclient-3.1.jar -DgeneratePom=true
    mvn install:install-file -DgroupId=org.apache.commons -DartifactId=logging -Dversion=1.1 -Dpackaging=jar -Dfile=lib/commons-logging-1.1.jar -DgeneratePom=true