Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.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
Xml 人工制品+;Ivy缺失工件org.apache_Xml_Ant_Ivy_Artifactory - Fatal编程技术网

Xml 人工制品+;Ivy缺失工件org.apache

Xml 人工制品+;Ivy缺失工件org.apache,xml,ant,ivy,artifactory,Xml,Ant,Ivy,Artifactory,我在项目中使用Ant+Ivy+Artifactory,我尝试发布自己的存储库,我的build.xml如下所示: <?xml version="1.0" encoding="UTF-8"?> <project name="hello-world-ant" basedir="." default="main" xmlns:ivy="antlib:org.apache.ivy.ant"> <!-- Ant properties --> <property na

我在项目中使用Ant+Ivy+Artifactory,我尝试发布自己的存储库,我的build.xml如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<project name="hello-world-ant" basedir="." default="main" xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- Ant properties -->
<property name="src.dir"     value="src"/>
<property name="lib.dir"     value="lib"/>
<property name="build.dir"   value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir"     value="${build.dir}/jar"/>
<property name="main-class"  value="com.eureka.HelloWorld"/>

<ivy:settings file="./ivysettings.xml" />

<target name="clean">
  <delete dir="${build.dir}"/>
  <delete dir="${lib.dir}"/>
</target>

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

<target name="report" depends="resolve">
  <ivy:report todir="${build.dir}"/>
</target>

<target name="compile" depends="report">
  <mkdir dir="${classes.dir}"/>
  <javac srcdir="${src.dir}" destdir="${classes.dir}"/>
</target>

<target name="jar" depends="compile">
  <mkdir dir="${jar.dir}"/>
  <jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
    <manifest>
      <attribute name="Main-Class" value="${main-class}"/>
    </manifest>
  </jar>
</target>

<target name="run" depends="jar">
  <java jar="${jar.dir}/${ant.project.name}.jar" fork="true"/>
</target>

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

      <!-- Possible ivy:report, ivy:retrieve and other
      elements for managing your dependencies go here -->

      <ivy:deliver conf="*(public)"/> 
  </target>

   <target name="publish" depends="jar">
    <ivy:retrieve/>
      <ivy:publish resolver="publish" overwrite="true"    artifactspattern="${jar.dir}/[artifact].[ext]" />
    </target>

  <target name="clean-build" depends="clean,jar"/>

  <target name="main" depends="clean,run"/>

</project>
<credentials host="localhost" realm="Artifactory Realm" username="admin" passwd="password" />

<resolvers>
<chain name="main">
  <ibiblio name="artifactory" m2compatible="true" root="http://localhost:8081/artifactory/libs-releases" />
  <url name="publish">
    <!-- You can use  m2compatible="true" instead of specifying your own pattern -->
    <ivy pattern="http://localhost:8081/artifactory/test-snapshot-local/[organization]/[module]/[revision]/ivy-[revision].xml" />
    <artifact pattern="http://localhost:8081/artifactory/test-snapshot-local/[organization]/[module]/[revision]/[artifact].[ext]"/>
  </url>
</chain>

我不熟悉使用这些工具,我想知道这里发生了什么…非常感谢~

假设您使用的是常春藤快速入门教程中提到的hello ivy示例,则在
ivy.xml
中定义的模块是hello ivy,而您使用的项目名称是hello world ant。
用于发布的
artifactspatern
${jar.dir}/[artifact].[ext]
,这意味着当您的构建创建名为
hello world ant.jar
${ant.project.name}.jar
)的jar时,Ivy将查找
hello Ivy.jar


ivy.xml
中的模块更改为“hello world ant”将解决此问题。

假设您使用的是ivy快速入门教程中提到的hello ivy示例,则
ivy.xml
中定义的模块是hello ivy,而您使用的项目名称是hello world ant。
用于发布的
artifactspatern
${jar.dir}/[artifact].[ext]
,这意味着当您的构建创建名为
hello world ant.jar
${ant.project.name}.jar
)的jar时,Ivy将查找
hello Ivy.jar


ivy.xml
中的模块更改为“hello world ant”将解决此问题。

假设您使用的是ivy快速入门教程中提到的hello ivy示例,则
ivy.xml
中定义的模块是hello ivy,而您使用的项目名称是hello world ant。
用于发布的
artifactspatern
${jar.dir}/[artifact].[ext]
,这意味着当您的构建创建名为
hello world ant.jar
${ant.project.name}.jar
)的jar时,Ivy将查找
hello Ivy.jar


ivy.xml
中的模块更改为“hello world ant”将解决此问题。

假设您使用的是ivy快速入门教程中提到的hello ivy示例,则
ivy.xml
中定义的模块是hello ivy,而您使用的项目名称是hello world ant。
用于发布的
artifactspatern
${jar.dir}/[artifact].[ext]
,这意味着当您的构建创建名为
hello world ant.jar
${ant.project.name}.jar
)的jar时,Ivy将查找
hello Ivy.jar


ivy.xml
中的模块更改为“hello world ant”将解决此问题。

这正是我真正需要的。谢谢你宝贵的解决方案,这才是我真正需要的。谢谢你宝贵的解决方案,这才是我真正需要的。谢谢你宝贵的解决方案,这才是我真正需要的。感谢您宝贵的解决方案。
BUILD FAILED
/Users/stage/Documents/workspace/test_ivy/build.xml:56: impossible to publish artifacts for org.apache#hello-ivy;working@pro-de-support.density.fr: java.io.IOException: missing artifact org.apache#hello-ivy;20140401102841!hello-ivy.jar