1

wso2 のプロジェクトを Maven にパッケージ化したいと考えています。最初のステップは、WSO2 サンプルを Maven ビルドに配置し、その上にビルドすることです...ただし、サンプル コードをコンパイルする pom.xml を作成することはできません。

オンラインでいくつかのトレイルをたどった後: MavenのWSO2 BAM 2.0ライブラリ

これには、wso2リポジトリに存在しなかったため、pomをダウンロードしてローカルリポジトリにインストールすることが含まれていましたが、まだエラーが発生しています...

誰かが WSO2 サンプルの 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/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>

ビルド時に受け取るエラーは次のとおりです。

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
4

2 に答える 2

2

このpomファイルをこのようにビルドできますか?

mvn クリーン インストール -c

これにより、チェックサム エラーが無視されます。

于 2014-03-17T03:43:16.070 に答える