Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当使用Spring数据JPA-org.eclipse.persistence时,Ivy未解析的依赖项_Spring_Maven_Ant_Ivy_Spring Data Jpa - Fatal编程技术网

当使用Spring数据JPA-org.eclipse.persistence时,Ivy未解析的依赖项

当使用Spring数据JPA-org.eclipse.persistence时,Ivy未解析的依赖项,spring,maven,ant,ivy,spring-data-jpa,Spring,Maven,Ant,Ivy,Spring Data Jpa,在将以下行添加到ivy.xml文件之前,我的构建运行良好: <dependency org="org.springframework.data" name="spring-data-jpa" rev="1.1.0.RELEASE"/> 我似乎在Maven回购协议中找不到这种依赖性。当不使用Ivy时,我能够使用以下jar成功编译我的项目: com.springsource.javax.persistence-2.0.0.jar 然而,我在Maven回购协议中也找不到这一点的参考 我

在将以下行添加到ivy.xml文件之前,我的构建运行良好:

<dependency org="org.springframework.data" name="spring-data-jpa" rev="1.1.0.RELEASE"/>
我似乎在Maven回购协议中找不到这种依赖性。当不使用Ivy时,我能够使用以下jar成功编译我的项目:

com.springsource.javax.persistence-2.0.0.jar
然而,我在Maven回购协议中也找不到这一点的参考


我错过了什么或做错了什么?对使用Ivy很陌生,因此非常感谢您的任何帮助。

默认情况下,Ivy将删除所有依赖项。很可能这是一个可选的Maven依赖项,在中不存在

您需要做的是为每个依赖项设置常春藤配置映射,如下所示:

<configurations>
    <conf name="compile" description="Compile classpath"/>
    <conf name="runtime" description="Runtime classpath" extends="compile"/>
    <conf name="test" description="Test classpath" extends="runtime"/>
</configurations>

<dependencies>
    <!-- compile dependencies -->
    <dependency org="org.springframework.data" name="spring-data-jpa" rev="1.1.0.RELEASE" conf="compile->default"/>
</dependencies>

映射“compile->default”意味着从远程模块中下拉默认依赖项(这将排除选项),并将它们放入本地编译配置中

有关ivy如何翻译远程Maven模块的更多信息,请参阅:


这帮了大忙。谢谢
<configurations>
    <conf name="compile" description="Compile classpath"/>
    <conf name="runtime" description="Runtime classpath" extends="compile"/>
    <conf name="test" description="Test classpath" extends="runtime"/>
</configurations>

<dependencies>
    <!-- compile dependencies -->
    <dependency org="org.springframework.data" name="spring-data-jpa" rev="1.1.0.RELEASE" conf="compile->default"/>
</dependencies>