2012-09-25 5 views
1

내 eclipse 프로젝트 (dcmfileer)를 로컬 repo에 설치하고 다른 프로젝트의 리소스를 사용하려고했습니다. maven이 "유물 누락 오류"라고 주장합니다. 나는 pom 의존성 추가 사이트의 검색 대화 상자에서 파일을 찾을 수 있습니다. 레포 안의 파일을 볼 수 있습니다.maven - 아티팩트 오류가 누락되었습니다.

다른 작업 영역에서 구성을 사용하고 싶기 때문에 "작업 환경 프로젝트의 종속성 해결"을 선택 취소했습니다.

Settings.XML의에는 다음이 포함됩니다. $ {user.home의}/m2/저장소

누군가 아이디어가 왜 작동하지 않는 그것? dependencies pom.xml

local repository view

eclipse build path properties

<?xml version="1.0"?> 
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>com.stabilit</groupId> 
    <artifactId>Test</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <name>Test</name> 
    <url>http://maven.apache.org</url> 
    <properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    </properties> 
    <dependencies> 
    <dependency> 
     <groupId>org.dcm</groupId> 
     <artifactId>dcmFileer</artifactId> 
     <version>0.0.1-SNAPSHOT</version> 
     <scope>compile</scope> 
    </dependency> 
    </dependencies> 
    <repositories> 
    <repository> 
     <snapshots> 
     <enabled>false</enabled> 
     </snapshots> 
     <id>central</id> 
     <name>Maven Repository Switchboard</name> 
     <url>http://repo1.maven.org/maven2</url> 
    </repository> 
    </repositories> 
    <pluginRepositories> 
    <pluginRepository> 
     <releases> 
     <updatePolicy>never</updatePolicy> 
     </releases> 
     <snapshots> 
     <enabled>false</enabled> 
     </snapshots> 
     <id>central</id> 
     <name>Maven Plugin Repository</name> 
     <url>http://repo1.maven.org/maven2</url> 
    </pluginRepository> 
    </pluginRepositories> 
    <build> 
    <sourceDirectory>C:\stabilit\projects\EUREX\DCM\java\Test\src\main\java</sourceDirectory> 
    <scriptSourceDirectory>C:\stabilit\projects\EUREX\DCM\java\Test\src\main\scripts</scriptSourceDirectory> 
    <testSourceDirectory>C:\stabilit\projects\EUREX\DCM\java\Test\src\test\java</testSourceDirectory> 
    <outputDirectory>C:\stabilit\projects\EUREX\DCM\java\Test\target\classes</outputDirectory> 
    <testOutputDirectory>C:\stabilit\projects\EUREX\DCM\java\Test\target\test-classes</testOutputDirectory> 
    <resources> 
     <resource> 
     <directory>C:\stabilit\projects\EUREX\DCM\java\Test\src\main\resources</directory> 
     </resource> 
    </resources> 
    <testResources> 
     <testResource> 
     <directory>C:\stabilit\projects\EUREX\DCM\java\Test\src\test\resources</directory> 
     </testResource> 
    </testResources> 
    <directory>C:\stabilit\projects\EUREX\DCM\java\Test\target</directory> 
    <finalName>Test-0.0.1-SNAPSHOT</finalName> 
    <pluginManagement> 
     <plugins> 
     <plugin> 
      <artifactId>maven-antrun-plugin</artifactId> 
      <version>1.3</version> 
     </plugin> 
     <plugin> 
      <artifactId>maven-assembly-plugin</artifactId> 
      <version>2.2-beta-5</version> 
     </plugin> 
     <plugin> 
      <artifactId>maven-dependency-plugin</artifactId> 
      <version>2.1</version> 
     </plugin> 
     <plugin> 
      <artifactId>maven-release-plugin</artifactId> 
      <version>2.0</version> 
     </plugin> 
     </plugins> 
    </pluginManagement> 
    <plugins> 
     <plugin> 
     <artifactId>maven-clean-plugin</artifactId> 
     <version>2.4.1</version> 
     <executions> 
      <execution> 
      <id>default-clean</id> 
      <phase>clean</phase> 
      <goals> 
       <goal>clean</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
     <plugin> 
     <artifactId>maven-install-plugin</artifactId> 
     <version>2.3.1</version> 
     <executions> 
      <execution> 
      <id>default-install</id> 
      <phase>install</phase> 
      <goals> 
       <goal>install</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
     <plugin> 
     <artifactId>maven-resources-plugin</artifactId> 
     <version>2.4.3</version> 
     <executions> 
      <execution> 
      <id>default-resources</id> 
      <phase>process-resources</phase> 
      <goals> 
       <goal>resources</goal> 
      </goals> 
      </execution> 
      <execution> 
      <id>default-testResources</id> 
      <phase>process-test-resources</phase> 
      <goals> 
       <goal>testResources</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
     <plugin> 
     <artifactId>maven-surefire-plugin</artifactId> 
     <version>2.7.1</version> 
     <executions> 
      <execution> 
      <id>default-test</id> 
      <phase>test</phase> 
      <goals> 
       <goal>test</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
     <plugin> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <version>2.3.2</version> 
     <executions> 
      <execution> 
      <id>default-testCompile</id> 
      <phase>test-compile</phase> 
      <goals> 
       <goal>testCompile</goal> 
      </goals> 
      </execution> 
      <execution> 
      <id>default-compile</id> 
      <phase>compile</phase> 
      <goals> 
       <goal>compile</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
     <plugin> 
     <artifactId>maven-jar-plugin</artifactId> 
     <version>2.3.1</version> 
     <executions> 
      <execution> 
      <id>default-jar</id> 
      <phase>package</phase> 
      <goals> 
       <goal>jar</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
     <plugin> 
     <artifactId>maven-deploy-plugin</artifactId> 
     <version>2.5</version> 
     <executions> 
      <execution> 
      <id>default-deploy</id> 
      <phase>deploy</phase> 
      <goals> 
       <goal>deploy</goal> 
      </goals> 
      </execution> 
     </executions> 
     </plugin> 
     <plugin> 
     <artifactId>maven-site-plugin</artifactId> 
     <version>2.0.1</version> 
     <executions> 
      <execution> 
      <id>default-site</id> 
      <phase>site</phase> 
      <goals> 
       <goal>site</goal> 
      </goals> 
      <configuration> 
       <outputDirectory>C:\stabilit\projects\EUREX\DCM\java\Test\target\site</outputDirectory> 
       <reportPlugins> 
       <reportPlugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-project-info-reports-plugin</artifactId> 
       </reportPlugin> 
       </reportPlugins> 
      </configuration> 
      </execution> 
      <execution> 
      <id>default-deploy</id> 
      <phase>site-deploy</phase> 
      <goals> 
       <goal>deploy</goal> 
      </goals> 
      <configuration> 
       <outputDirectory>C:\stabilit\projects\EUREX\DCM\java\Test\target\site</outputDirectory> 
       <reportPlugins> 
       <reportPlugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-project-info-reports-plugin</artifactId> 
       </reportPlugin> 
       </reportPlugins> 
      </configuration> 
      </execution> 
     </executions> 
     <configuration> 
      <outputDirectory>C:\stabilit\projects\EUREX\DCM\java\Test\target\site</outputDirectory> 
      <reportPlugins> 
      <reportPlugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-project-info-reports-plugin</artifactId> 
      </reportPlugin> 
      </reportPlugins> 
     </configuration> 
     </plugin> 
    </plugins> 
    </build> 
    <reporting> 
    <outputDirectory>C:\stabilit\projects\EUREX\DCM\java\Test\target\site</outputDirectory> 
    </reporting> 
</project> 

저장소 내부 POM - 의존성 (dcmFileer)는 우선 들어

<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> 
    <groupId>org.dcm</groupId> 
    <artifactId>dcmFileer</artifactId> 
    <name>dcmFileer</name> 
    <version>0.0.1-SNAPSHOT</version> 
    <url>http://www.stabilit.ch</url> 
    <properties> 
     <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding> 
     <project.reporting.outputEncoding>ISO-8859-1</project.reporting.outputEncoding> 
     <skipTests>true</skipTests> 
    </properties> 
    <issueManagement> 
    </issueManagement> 
    <organization> 
     <name>STABILIT Informatik AG</name> 
     <url>www.stabilit.ch</url> 
    </organization> 
    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>2.3.1</version> 
       <configuration> 
        <source>1.6</source> 
        <target>1.6</target> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-javadoc-plugin</artifactId> 
       <version>2.7</version> 
       <configuration> 
        <!-- switch on dependency-driven aggregation --> 
        <includeDependencySources>true</includeDependencySources> 

        <dependencySourceIncludes> 
         <dependency-source>org.serviceconnector.*</dependency-source> 
        </dependencySourceIncludes> 

        <excludePackageNames>org.serviceconnector.cln</excludePackageNames> 
       </configuration> 
      </plugin> 
      <plugin> 
       <artifactId>maven-source-plugin</artifactId> 
       <version>2.1.2</version> 
       <executions> 
        <execution> 
         <id>attach-sources</id> 
         <phase>verify</phase> 
         <goals> 
          <goal>jar</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </build> 
    <dependencies> 
    </dependencies> 
    <repositories> 
     <repository> 
      <id>repository.jboss.org</id> 
      <url>http://repository.jboss.org/nexus/content/groups/public/</url> 
      <snapshots> 
       <enabled>false</enabled> 
      </snapshots> 
     </repository> 
     <repository> 
      <id>sourceforge-releases</id> 
      <name>Sourceforge Release Repository</name> 
      <url>http://oss.sonatype.org/service/local/staging/deploy/maven2</url> 
     </repository> 
    </repositories> 
</project> 
+0

pom.xml을 공유해주세요. –

+0

방금 ​​2 개 pom을 추가했습니다. 리소스에 의존하는 프로젝트 중 첫 번째 프로젝트, 두 번째 프로젝트는 리소스 저장소에 있습니다. 당신의 도움을 주셔서 감사합니다! – schoeggii

답변

1

, 당신은 (리눅스와 다른 유닉스 변종에) 실현 ${user.home}C:\Documents and Settings\JTraber과 같은 형식으로 확장됩니다. 맞습니까?

나는이 시점에서 실제 사용자 가정 아래에 하나, 프로젝트 작업 공간 아래에 하나씩 리포지셔닝해야한다고 생각합니다. 실제의 저장소를 사용하도록 Eclipse의 Maven 플러그인을 구성해야합니다. ${user.home}

또한 Windows를 사용하고 있습니다. ${} 변수는 운영 체제에 의해 보간되지 않습니다. 대신 Windows 스타일 (예 : %HOMEPATH%)을 사용해야합니다. 귀하의 프로젝트에 실제 디렉토리 ${user.home}을 찾을 것으로 의심됩니다.

+0

argg..yes 사실, 오해해서 죄송합니다. $ {user.home}은 대체 될 수 없으므로 이클립스 폴더에 두 개의 repos가 있고 실제 사용자 홈 아래에 있습니다. $ {user.home} settings.xml에서 승리에 나쁜 생각이다;) .. 정말 고마워 !! – schoeggii

관련 문제