9
我想使用常春藤:發佈發佈我已經構建到.ivy存儲庫的jar,但出現錯誤。我很確定我沒有正確地使用它,所以我希望有人能指出我正確的方向。使用ivy的問題:發佈任務
這個項目的結構是這樣的:
root--|
|--src
|--build
| |
| |--someorganisation-commonlib-1.0.0.jar
|
|--ivy.xml
|--build.xml
的build.xml文件看起來是這樣的:
<target name="publish">
<ivy-publish organisation="someorganisation" resolver="local" module="commonlib" revision="1.0.0">
<artifacts pattern="build/[organisation]-[module](-[revision])(-[type]).[ext]" />
</ivy-publish>
</target>
的ivy.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info
organisation="someorganisation"
module="commonlib"
status="integration">
</info>
<dependencies>
<dependency org="com.thoughtworks.xstream" name="xstream" rev="1.3.1" transitive="false"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.1" transitive="false"/>
<dependency org="org.slf4j" name="slf4j-jdk14" rev="1.6.1" transitive="false"/>
<dependency org="joda-time" name="joda-time" rev="1.6.2" transitive="false"/>
</dependencies>
</ivy-module>
當我運行構建.xml,我收到以下錯誤:
C:\workspaces\wkspc\someproject\build.xml:8: someorganization#commonlib;1.0.0: java.lang.IllegalStateException: ivy file not found in cache for someorganization#commonlib;1.0.0: please resolve dependencies before delivering (C:\Documents and Settings\someuser\.ivy2\cache\resolved-someorganization-commonlib-1.0.0.xml)