ivy 기반 빌드 프로젝트는 ~/.ivy 디렉토리를 사용한다. 

예를 들어, play1 framework는 ~/.ivy/cache 디렉토리에 저장된 의존 lib가 저장된다. 


예를 들어, org.apache.httpcomponents.httpcore는 아래와 같이 저장된다.

~/.ivy2/cache/org.apache.httpcomponents/httpcore


$ ls

ivy-4.2.4.xml            ivy-4.3.3.xml.original   ivy-4.4.4.xml            ivydata-4.3.3.properties jars

ivy-4.2.4.xml.original   ivy-4.4.1.xml            ivy-4.4.4.xml.original   ivydata-4.4.1.properties sources

ivy-4.3.3.xml            ivy-4.4.1.xml.original   ivydata-4.2.4.properties ivydata-4.4.4.properties



디렉토리에는 버전 별 xml 파일, xml.original 파일, jars, sources가 있다.


xml.original 파일은 pom 다음과 같다. 


$ cat ivy-4.4.4.xml.original


<?xml version="1.0" encoding="UTF-8"?>

<!--

   ====================================================================

   Licensed to the Apache Software Foundation (ASF) under one

   or more contributor license agreements.  See the NOTICE file

   distributed with this work for additional information

   regarding copyright ownership.  The ASF licenses this file

   to you under the Apache License, Version 2.0 (the

   "License"); you may not use this file except in compliance

   with the License.  You may obtain a copy of the License at


     http://www.apache.org/licenses/LICENSE-2.0


   Unless required by applicable law or agreed to in writing,

   software distributed under the License is distributed on an

   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

   KIND, either express or implied.  See the License for the

   specific language governing permissions and limitations

   under the License.

   ====================================================================


   This software consists of voluntary contributions made by many

   individuals on behalf of the Apache Software Foundation.  For more

   information on the Apache Software Foundation, please see

   <http://www.apache.org />.

 --><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>

    <groupId>org.apache.httpcomponents</groupId>

    <artifactId>httpcomponents-core</artifactId>

    <version>4.4.4</version>

  </parent>

  <artifactId>httpcore</artifactId>

  <name>Apache HttpCore</name>

  <inceptionYear>2005</inceptionYear>

  <description>

   Apache HttpComponents Core (blocking I/O)

  </description>

  <url>http://hc.apache.org/httpcomponents-core-ga</url>

  <packaging>jar</packaging>

...




ivy는 ivy 기반의 xml로 변경한다.


$ cat ivy-4.4.4.xml

<?xml version="1.0" encoding="UTF-8"?>

<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">

<info organisation="org.apache.httpcomponents"

module="httpcore"

revision="4.4.4"

status="release"

publication="20151027021814"

>

<description homepage="http://hc.apache.org/httpcomponents-core-ga">

Apache HttpComponents Core (blocking I/O)

</description>

<m:properties__api.comparison.version>4.4</m:properties__a

...


메타정보는 properties에 정의된다.


$ cat ivydata-4.4.4.properties

#ivy cached data file for org.apache.httpcomponents#httpcore;4.4.4

#Mon Jun 13 22:10:57 KST 2016

artifact\:httpcore\#pom.original\#pom\#-401045955.exists=true

artifact\:httpcore\#jar\#jar\#-2053608617.original=artifact\:httpcore\#jar\#jar\#-2053608617

artifact\:httpcore\#pom.original\#pom\#-401045955.original=artifact\:httpcore\#pom.original\#pom\#-401045955

artifact\:ivy\#ivy\#xml\#-726796163.location=https\://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.pom

artifact\:httpcore\#pom.original\#pom\#-401045955.is-local=false

resolver=mavenCentral

artifact\:ivy\#ivy\#xml\#-726796163.exists=true

artifact\:httpcore\#pom.original\#pom\#-401045955.location=https\://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.pom

artifact\:httpcore\#jar\#jar\#-2053608617.location=https\://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar

artifact\:ivy\#ivy\#xml\#-726796163.is-local=false

artifact\:httpcore\#source\#jar\#-410049307.original=artifact\:httpcore\#source\#jar\#-410049307

artifact\:httpcore\#jar\#jar\#-2053608617.exists=true

artifact\:httpcore\#jar\#jar\#-2053608617.is-local=false

artifact\:ivy\#ivy\#xml\#-726796163.original=artifact\:httpcore\#pom.original\#pom\#-401045955

artifact\:httpcore\#source\#jar\#-410049307.exists=true

artifact\:httpcore\#source\#jar\#-410049307.is-local=false

artifact.resolver=mavenCentral

artifact\:httpcore\#source\#jar\#-410049307.location=https\://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4-sources.ja



만약 ivy 컴파일일 실패하면, jars에 jar가 있는지. properties,xml, xml.original 파일이 존재하는지 확인해본다.


참고

ivy 파일 이슈를 해결해도

컴파일 안되면, maven repository 이슈이다.



참고

https://theholyjava.wordpress.com/2011/01/26/using-ivy-with-pom-xml/

Posted by '김용환'
,