2013-02-07 4 views
1

wso2에 대한 프로젝트를 Maven에 패키징하고 싶습니다. 첫 번째 단계는 WSO2 샘플을 Maven 빌드에 배치 한 다음 빌드하는 것입니다. 그러나 pom.xml을 만들 수 없습니다. 지금까지 샘플 코드를 컴파일합니다.WSO2 샘플 Maven pom.xml

온라인 어떤 흔적을 다음과 후 : WSO2 BAM 2.0 libraries in Maven 다운로드하고, WSO2 저장소에 존재 여전히 점점 오류하지 않았기 때문에 로컬 저장소로 치어를 설치를 포함

...

감사를 어떤 지원이나 최선

<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/xsd/maven-4.0.0.xsd"> 

<parent> 
    <groupId>org.wso2.carbon</groupId> 
    <artifactId>carbon-components</artifactId> 
    <version>3.2.0</version> 
</parent> 


<repositories> 
    <repository> 
     <id>wso2-maven2-repository</id> 
     <name>WSO2 Maven2 Repository</name> 
     <url>http://dist.wso2.org/maven2</url> 
     <snapshots> 
     <enabled>true</enabled> 
     </snapshots> 
     <releases> 
     <enabled>true</enabled> 
     <updatePolicy>never</updatePolicy> 
     <checksumPolicy>fail</checksumPolicy> 
     </releases> 
    </repository> 
</repositories> 



<modelVersion>4.0.0</modelVersion> 
<groupId>acme</groupId> 
<artifactId>acme.wso2</artifactId> 
<version>1.0-SNAPSHOT</version> 

<dependencies> 

    <dependency> 
     <groupId>org.wso2.carbon</groupId> 
     <artifactId>org.wso2.carbon.bam.agent</artifactId> 
     <version>3.2.4</version> 
    </dependency> 

    <dependency> 
     <groupId>javax</groupId> 
     <artifactId>javaee-api</artifactId> 
     <version>6.0</version> 
     <scope>provided</scope> 
    </dependency> 

    <dependency> 
     <groupId>org.apache.axis2</groupId> 
     <artifactId>axis2</artifactId> 
     <version>1.5.1</version> 
    </dependency> 

    <dependency> 
     <groupId>org.apache.ws.commons.axiom</groupId> 
     <artifactId>axiom-api</artifactId> 
     <version>1.2.11</version> 
    </dependency> 


</dependencies> 

</project> 
: 누군가가 ... WSO2 샘플에 대한 pom.xml 파일을 가지고 있으며, 공유 할 수 있다면 아직 여기

는 현재의 치어입니다 691,363,210

는 여기에 내가 빌드에 수신 오류입니다 :

c:\projects\acme.wso2> mvn compile 

[INFO] Scanning for projects... 
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for acme:acme.wso2:jar:1.0-SNAPSHOT 
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.wso2.carbon:org.wso2.carbon.core.common:jar -> duplicate declaration of version ${carbon.platform.version} @ org.wso2.carbon:c 
arbon-components:3.2.0, C:\Users\Tony\.m2\repository\org\wso2\carbon\carbon-components\3.2.0\carbon-components-3.2.0.pom, line 1025, column 25 
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.wso2.carbon:org.wso2.carbon.mashup.jsservices.stub:jar -> duplicate declaration of version ${carbon.platform.version} @ org.ws 
o2.carbon:carbon-components:3.2.0, C:\Users\Tony\.m2\repository\org\wso2\carbon\carbon-components\3.2.0\carbon-components-3.2.0.pom, line 2128, column 25 
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. 
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. 
[WARNING] 
[INFO] 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building acme.wso2 1.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[WARNING] The POM for net.sf.saxon:saxon:jar:8.9 is missing, no dependency information available 
Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/eclipse/osgi/org.eclipse.osgi.services/3.2.0.v20 
090520-1800/org.eclipse.osgi.services-3.2.0.v20090520-1800.pom 
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 8edc83998e0bf2a8867395883f3853eb901be267 for http://maven.wso2.org/nexus/content/groups/wso2-public/org/eclipse/osgi/org.eclipse.osgi.services/3.2.0.v20090520-1800/org.eclipse.osgi.services-3.2.0.v20090520-1800.pom 
Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/bsf/bsf-all/3.0/bsf-all-3.0.pom 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 11.956s 
[INFO] Finished at: Thu Feb 07 16:43:12 EST 2013 
[INFO] Final Memory: 12M/161M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal on project acme.wso2: Could not resolve dependencies for project acme:acme.wso2:jar:1.0-SNAPSHOT: 
    Failed to collect dependencies for [org.wso2.carbon:org.wso2.carbon.bam.agent:jar:3.2.4 (compile), 
    javax:javaee-api:jar:6.0 (provided), 
    org.apache.axis2:axis2:jar:1.5.1 (compile), 
    org.apache.ws.commons.axiom:axiom-api:jar:1.2.11 (compile)]: 
    Failed to read artifact descriptor for org.eclipse.osgi:org.eclipse.osgi.services:jar:3.2.0.v20090520-1800: 
    Could not transfer artifact org.eclipse.osgi:org.eclipse.osgi.services:pom:3.2.0.v20090520-1800 from/to wso2-nexus 
    (http://maven.wso2.org/nexus/content/groups/wso2-public/): 
    Checksum validation failed, expected <!DOCTYPE but is 8edc83998e0bf2a8867395883f3853eb901be267 -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 

답변

1

방금 ​​같은이 치어 파일을 구축 할 수 있습니다, 깨끗한

MVN이

이것은 checkssum 오류를 무시합니다 -c 설치합니다.

0

repositories 태그를 다음으로 대체하십시오. 종속성은이 저장소 중 하나에서 사용할 수 있습니다. 체크섬 오류가 지속되는 경우 @ Harsha의 대답을 참조하십시오.

<repositories> 
    <repository> 
     <id>wso2-nexus</id> 
     <name>WSO2 internal Repository</name> 
     <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url> 
     <releases> 
      <enabled>true</enabled> 
      <updatePolicy>daily</updatePolicy> 
      <checksumPolicy>ignore</checksumPolicy> 
     </releases> 
    </repository> 
    <repository> 
     <id>wso2.releases</id> 
     <name>WSO2 internal Repository</name> 
     <url>http://maven.wso2.org/nexus/content/repositories/releases/</url> 
     <releases> 
      <enabled>true</enabled> 
      <updatePolicy>daily</updatePolicy> 
      <checksumPolicy>ignore</checksumPolicy> 
     </releases> 
    </repository> 
    <repository> 
     <id>wso2.snapshots</id> 
     <name>WSO2 Snapshot Repository</name> 
     <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url> 
     <snapshots> 
      <enabled>true</enabled> 
      <updatePolicy>daily</updatePolicy> 
     </snapshots> 
     <releases> 
      <enabled>false</enabled> 
     </releases> 
    </repository> 
</repositories> 
관련 문제