3

私はJavaプロジェクトをセットアップしていて、依存関係管理ツールとしてivyを使用したいと考えていました。しかし、私は最も単純なものを動作させることができませんでした。

これが私が持っているコードです:

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="de.fau.fsahoy"
        module="de.fau.fsahoy.android.api15"
        status="integration">
    </info>

    <dependencies>
        <dependency org="org.restlet.android" name="org.restlet" rev="2.1-RC5"/>
    </dependencies>
</ivy-module>

ivysettings.xml

<?xml version="1.0"?>
<ivysettings >
    <settings defaultResolver="maven" />
    <resolvers>
        <chain name="maven" returnFirst="true">
            <ibiblio name="restlet" m2compatible="true" root="http://maven.restlet.org/" />
        </chain>
    </resolvers>

</ivysettings>

私が得るエラーは次のとおりです。

Impossible to resolve dependencies of de.fau.fsahoy#de.fau.fsahoy.android.api15;working@JonasErl-PC

Failed to load the descriptor for ivysettings.xml[*] in fsahoy-team-d-gitThe ivy file 'C:\Users\JonasErl\Code\fsahoy-team-d-git\ivysettings.xml' could not be parsed: null in file:/C:/Users/JonasErl/Code/fsahoy-team-d-git/ivysettings.xml


org.apache.ivyde.eclipse.IvyDEException: The ivy file 'C:\Users\JonasErl\Code\fsahoy-team-d-git\ivysettings.xml' could not be parsed: null in file:/C:/Users/JonasErl/Code/fsahoy-team-d-git/ivysettings.xml
    at org.apache.ivyde.eclipse.CachedIvy.getModuleDescriptor(CachedIvy.java:376)
    at org.apache.ivyde.eclipse.resolve.IvyResolveJob.run(IvyResolveJob.java:137)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.text.ParseException: null in file:/C:/Users/JonasErl/Code/fsahoy-team-d-git/ivysettings.xml
    at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:301)
    at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:116)
    at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:88)
    at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
    at org.apache.ivyde.eclipse.CachedIvy.getModuleDescriptor(CachedIvy.java:368)
    ... 2 more
Caused by: java.lang.NullPointerException

maven.restlet.orgでリポジトリ構造を見ることができます

残念ながら、これらのエラーメッセージは最適ではありません。どうすればこれを修正できますか?

4

1 に答える 1

1

エラーを再現できませんでした。

  • どのバージョンのツタを使用していますか?
  • ツタのタスクをどのように呼び出していますか?

テスト

build.xml

<project name="demo" default="init" xmlns:ivy="antlib:org.apache.ivy.ant">

    <target name="init">
        <ivy:resolve/>
    </target>

    <target name="clean">
        <ivy:cleancache/>
    </target>

</project>

出力を作成する

init:
[ivy:resolve] :: Apache Ivy 2.3.0-rc1 - 20120416000235 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file = /home/mark/tmp/ivysettings.xml
[ivy:resolve] :: resolving dependencies :: de.fau.fsahoy#de.fau.fsahoy.android.api15;working@mark-laptop
[ivy:resolve]   confs: [default]
[ivy:resolve]   found org.restlet.android#org.restlet;2.1-RC5 in restlet
[ivy:resolve] downloading http://maven.restlet.org/org/restlet/android/org.restlet/2.1-RC5/org.restlet-2.1-RC5.jar ...
[ivy:resolve] ..............................................................................................................................................................................................................................................................................................................................................................................................
[ivy:resolve] ................ (699kB)
[ivy:resolve] .. (0kB)
[ivy:resolve]   [SUCCESSFUL ] org.restlet.android#org.restlet;2.1-RC5!org.restlet.jar (1880ms)
[ivy:resolve] downloading http://maven.restlet.org/org/restlet/android/org.restlet/2.1-RC5/org.restlet-2.1-RC5-sources.jar ...
[ivy:resolve] ............................................................................................................................................................................................................................................................................................................................................................................................................................................................... (738kB)
[ivy:resolve] .. (0kB)
[ivy:resolve]   [SUCCESSFUL ] org.restlet.android#org.restlet;2.1-RC5!org.restlet.jar(source) (971ms)
[ivy:resolve] :: resolution report :: resolve 1713ms :: artifacts dl 2864ms
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      default     |   1   |   1   |   1   |   0   ||   2   |   2   |
    ---------------------------------------------------------------------
于 2012-07-08T07:53:42.950 に答える