2014-02-21 4 views
-1

전문 프로그래머가 아닙니다. "mvn clean install"을 실행할 때이 오류가 발생합니다. 아무도 나를 설명 할 수 있다면이 오류를 해결하는 것이 좋을 것입니다.Maven 명령을 실행할 수 없습니다.

[INFO] Scanning for projects... 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building erp-web Maven Webapp 
[INFO] task-segment: [clean, install] 
[INFO] ------------------------------------------------------------------------ 
[INFO] [clean:clean {execution: default-clean}] 
[INFO] Deleting file set: /home/server/Desktop/Hospital project/Healthcare/Source/erp-web/target (included: [**], excluded: []) 
[INFO] [resources:resources {execution: default-resources}] 
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] Copying 3 resources 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD ERROR 
[INFO] ------------------------------------------------------------------------ 
[INFO] Failed to resolve artifact. 

Missing: 
---------- 
1) com.erp:erp:jar:1.0-SNAPSHOT 

    Try downloading the file manually from the project website. 

    Then, install it using the command: 
     mvn install:install-file -DgroupId=com.erp -DartifactId=erp -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file 

    Alternatively, if you host your own repository you can deploy the file there: 
     mvn deploy:deploy-file -DgroupId=com.erp -DartifactId=erp -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] 

    Path to dependency: 
    1) com.erp:erp-web:war:1.0-SNAPSHOT 
    2) com.erp:erp:jar:1.0-SNAPSHOT 

---------- 
1 required artifact is missing. 

for artifact: 
    com.erp:erp-web:war:1.0-SNAPSHOT 

from the specified remote repositories: 
    central (http://repo1.maven.org/maven2) 

은 여기에 등록 된 모든 저장소에서 발견되지 않는 내 pom.xml 파일

<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>com.erp</groupId> 
    <artifactId>erp-web</artifactId> 
    <packaging>war</packaging> 
    <version>1.0-SNAPSHOT</version> 
    <name>erp-web Maven Webapp</name> 
    <url>http://maven.apache.org</url> 

    <!-- Shared version number properties --> 
    <properties> 
     <org.springframework.version>3.0.5.RELEASE</org.springframework.version> 
    </properties> 

    <dependencies> 
     <!-- Backend API project --> 
     <dependency> 
      <groupId>com.erp</groupId> 
      <artifactId>erp</artifactId> 
      <version>1.0-SNAPSHOT</version> 
     </dependency> 

     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>javax.servlet-api</artifactId> 
      <version>3.0.1</version> 
      <scope>provided</scope> 
     </dependency> 

     <dependency> 
      <groupId>org.apache.tiles</groupId> 
      <artifactId>tiles-jsp</artifactId> 
      <version>2.2.2</version> 
     </dependency> 

     <dependency> 
      <groupId>org.apache.tiles</groupId> 
      <artifactId>tiles-servlet</artifactId> 
      <version>2.2.2</version> 
     </dependency> 

     <dependency> 
      <groupId>org.apache.tiles</groupId> 
      <artifactId>tiles-extras</artifactId> 
      <version>2.2.2</version> 
     </dependency> 

     <!-- Web application development utilities applicable to both Servlet and 
      Portlet Environments (depends on spring-core, spring-beans, spring-context) 
      Define this if you use Spring MVC, or wish to use Struts, JSF, or another 
      web framework with Spring (org.springframework.web.*) --> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-web</artifactId> 
      <version>${org.springframework.version}</version> 
     </dependency> 

     <!-- Spring MVC for Servlet Environments (depends on spring-core, spring-beans, 
      spring-context, spring-web) Define this if you use Spring MVC with a Servlet 
      Container such as Apache Tomcat (org.springframework.web.servlet.*) --> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-webmvc</artifactId> 
      <version>${org.springframework.version}</version> 
     </dependency> 

     <!-- Spring MVC for Portlet Environments (depends on spring-core, spring-beans, 
      spring-context, spring-web) Define this if you use Spring MVC with a Portlet 
      Container (org.springframework.web.portlet.*) --> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-webmvc-portlet</artifactId> 
      <version>${org.springframework.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-web</artifactId> 
      <version>3.1.0.RELEASE</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-config</artifactId> 
      <version>3.1.0.RELEASE</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-taglibs</artifactId> 
      <version>3.1.0.RELEASE</version> 
     </dependency> 

     <dependency> 
      <groupId>org.apache.httpcomponents</groupId> 
      <artifactId>httpclient</artifactId> 
      <version>4.1.2</version> 
     </dependency> 

     <dependency> 
      <groupId>commons-httpclient</groupId> 
      <artifactId>commons-httpclient</artifactId> 
      <version>3.0</version> 
      <exclusions> 
       <exclusion> 
        <groupId>commons-codec</groupId> 
        <artifactId>commons-codec</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 
     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>jstl</artifactId> 
      <version>1.2</version> 
     </dependency> 

     <dependency> 
      <groupId>commons-fileupload</groupId> 
      <artifactId>commons-fileupload</artifactId> 
      <version>1.2.1</version> 
      <exclusions> 
       <exclusion> 
        <groupId>commons-logging</groupId> 
        <artifactId>commons-logging</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 
     <dependency> 
      <groupId>commons-io</groupId> 
      <artifactId>commons-io</artifactId> 
      <version>1.4</version> 
     </dependency> 

     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-log4j12</artifactId> 
      <version>1.4.3</version> 
     </dependency> 
    </dependencies> 
    <build> 
     <finalName>mycode</finalName> 

    </build> 
</project> 
+1

pom 파일을 첨부 할 수 있습니까? 어떤 dependecies가 누락 된 것 같습니다, 어떤 플러그인을 사용하고 있습니까? – user902383

+0

아마 erp jar 모듈이 Maven 프로젝트의 종속성 관리에 없으므로 war 모듈은 현재이를 해결할 수 없습니다. – Gimby

+0

답장을 보내 주셔서 감사합니다. 내 POM 파일 내용을 복사하여 붙여 넣으십시오. –

답변

0

귀하의 유물 com.erp:erp:jar:1.0-SNAPSHOT에서이 붙여 넣기 복사 .. 내 POM 파일 내용입니다. 따라서 JAR을 제공하는 저장소가 이미 있으면 추가 저장소를 등록하십시오. 아직 libs와 서비스를 제공 아무 저장소가없는 경우

후 다음 방법 중 하나를 사용 mvn install:install-file ... : 위의 메이븐 주석에 명시된 바와 같이

  • 지역 저장소에 libs와 설치합니다. install:install-filehere에 대한 자세한 정보를 찾아보십시오.
  • Nexus과 같은 저장소 원격을 사용 (또는 처음 설치)하고 위의 Maven 주석에도 설명한대로 명령을 사용하여 JAR 파일을 배치하십시오. deploy:deploy-filehere에 대한 자세한 정보를 찾아보십시오.

저장소에 대한 자세한 정보는 Maven website에서 찾으십시오.

+0

괜찮아요. –

관련 문제