Jaa*_*nus 0 java ant jar build ivy
似乎Apache ivy仅从http://mvnrepository.com/和其他几个地方下载工件,但所有的jar都在那里过时了.
所以我想为Ivy添加自定义存储库.我正在使用存储库Ivy RoundUp:http://code.google.com/p/ivyroundup/
这是我的配置,但收到错误:
build.xml文件:
<target name="update" depends="init-ivy" description="Download project dependencies">
<!-- edited for brevity -->
<ivy:settings file="ivysettings.xml" />
<ivy:retrieve pattern="war/WEB-INF/lib/[artifact]-[revision].[ext]" />
<!-- edited for brevity -->
</target>
Run Code Online (Sandbox Code Playgroud)
ivy.xml:
<ivy-module version="2.0">
<info organisation="org.apache" module="hello-ivy"/>
<dependencies>
<dependency org="org.springframework" name="spring" rev="3.0.6" conf="default->master"/>
</dependencies>
</ivy-module>
Run Code Online (Sandbox Code Playgroud)
ivysettings.xml:
<ivysettings>
<resolvers>
<packager name="roundup" buildRoot="${user.home}/.ivy2/packager/build" resourceCache="${user.home}/.ivy2/packager/cache">
<ivy pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/ivy.xml"/>
<artifact pattern="http://ivyroundup.googlecode.com/svn/trunk/repo/modules/[organisation]/[module]/[revision]/packager.xml"/>
</packager>
</resolvers>
</ivysettings>
Run Code Online (Sandbox Code Playgroud)
错误:
Buildfile: C:\Users\Jansu\workspace\HibernateSpring\build.xml
build:
deploywar:
[war] Building war: C:\Users\Jansu\workspace\HibernateSpring\hibernate.war
[copy] Copying 1 file to C:\apache-tomcat-7.0.20\webapps
download-ivy:
[get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
[get] To: C:\Users\Jansu\.ant\lib\ivy-2.2.0.jar
[get] Not modified - so not downloaded
init-ivy:
update:
[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: file = C:\Users\Jansu\workspace\HibernateSpring\ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: org.apache#hello-ivy;working@Jansu-PC
[ivy:retrieve] confs: [default]
[ivy:retrieve] :: resolution report :: resolve 110ms :: artifacts dl 0ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 1 | 0 | 0 | 0 || 0 | 0 |
---------------------------------------------------------------------
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: UNRESOLVED DEPENDENCIES ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: org.springframework#spring;3.0.6: no resolver found for org.springframework#spring: check your configuration
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve] :::: ERRORS
[ivy:retrieve] unknown resolver null
[ivy:retrieve] no resolver found for org.springframework#spring: check your configuration
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
BUILD FAILED
C:\Users\Jansu\workspace\HibernateSpring\build.xml:177: impossible to resolve dependencies:
resolve failed - see output for details
Total time: 2 seconds
Run Code Online (Sandbox Code Playgroud)
所以它似乎找不到我的解析器.我确实配置了解析器,就像自定义存储库要求我:http://code.google.com/p/ivyroundup/wiki/HowToConfigureIvy
这里是该repo中所有工件的列表,因此您可以看到Spring 3.0.6存在于其中:http://ivyroundup.googlecode.com/svn/trunk/repo/modules.xml
有什么建议?随意询问更多信息.
编辑:
build.properties:
ivy.install.version=2.2.0
ivy.home=${user.home}/.ant
ivy.jar.dir=${ivy.home}/lib
ivy.jar.file=${ivy.jar.dir}/ivy-${ivy.install.version}.jar
Run Code Online (Sandbox Code Playgroud)
Mar*_*nor 10
Ivyroundup是围绕常春藤包装工具解析器而设计的.这个解析器非常聪明,展示了常春藤的真正力量,但世界上大部分都使用Maven存储库来托管他们的软件.事实很快,Maven Central将包含全球近90%的Java开源组件.
值得庆幸的是,ivy完全理解Maven存储库,这意味着我们可以将常春藤用作客户端,并让像Nexus这样的非常好的产品托管存储库.这是启用Maven Central的设置文件:
<ivysettings>
<settings defaultResolver='central'/>
<resolvers>
<ibiblio name='central' m2compatible='true'/>
</resolvers>
</ivysettings>
Run Code Online (Sandbox Code Playgroud)
我强烈建议您考虑设置自己的本地Nexus实例(或Artifactory,或Archiva ......).然后,由于许可限制(JDBC jar),您可以缓存Maven中心工件(更高效),搜索软件组件以及上载和托管无法下载的工件.
启用本地存储库管理器也使用ibiblio解析程序,如下所示:
<ivysettings>
<settings defaultResolver='nexus'/>
<resolvers>
<ibiblio name='nexus' m2compatible='true' root='https://nexus.mydomain.com:8081/nexus/content/groups/central/' />
</resolvers>
</ivysettings>
Run Code Online (Sandbox Code Playgroud)
您正在寻找Spring 3.0.6版本吗?它已经在Maven Central:
http://search.maven.org/#search|ga|1|g%3A%22org.springframework%22%20AND%20v%3A%223.0.6.RELEASE%22
Spring核心工件的详细信息如下:
http://search.maven.org/#artifactdetails|org.springframework|spring-core|3.0.6.RELEASE|jar
现在,搜索页面可以方便地为您提供Maven和ivy客户端声明,以便复制到您的构建中:
<dependency org="org.springframework" name="spring-core" rev="3.0.6.RELEASE" >
<artifact name="spring-core" type="jar" />
</dependency>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8873 次 |
| 最近记录: |