Comment utiliser Bitbucket comme maven dépôt distant?

Nous sommes à la planification de l'utilisation de bitbucket comme référentiel de code source ainsi référentiel distant pour notre maven en fonction des projets. J'ai créé un référentiel sur bitbucket quelque chose comme ci-dessous:

https://bitbucket.org/mycompany/maven-repository

Comment puis-je pousser mes spécifiques à la société de projet les pots dans le ci-dessus dépôt distant à l'aide de projet spécifique pom.xml? Pouvez-vous m'aider avec un exemple pom.xml? Nous serions en poussant tous spécifiques à la société bocaux dans l'au-dessus de dépôt distant pour être utilisés par d'autres projets au sein de l'entreprise comme les dépendances maven.

Voici ce que j'ai essayé jusqu'à présent de pousser un exemple de projet dans la distance repo:

<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">
 <modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>corporate-pom</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<distributionManagement>
    <repository>
        <id>MyCompanyRepo</id>
        <url>https://bitbucket.org/mycompany/maven-repository</url>
    </repository>
</distributionManagement>
<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.7</version>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

Ci-dessus est un pom parent, qui sera compris par tous les autres projets au sein de l'entreprise et je voulais le pousser à la distance repo à être utilisé par une autre société de projets spécifiques.

Quand je lance mvn deploy de commande, c'est l'erreur que je reçois:

C:\Cooler\Work\dev\Projects\mycompany\wal-common>mvn deploy
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'snapshotPolicy' (position: START_TAG seen ...</layo
ut>\n          <snapshotPolicy>... @203:27)  @ C:\Users\cooler\.m2\settings.xml,
line 203, column 27
[WARNING]
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building corporate-pom 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ corporate-pom
---
[INFO] Installing C:\Cooler\Work\dev\Projects\mycompany\wal-common\pom.xml to C:\
Users\cooler\.m2\repository\com\mycompany\corporate-pom.0\corporat
e-pom-1.0.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ corporate-pom ---
Uploading: https://bitbucket.org/mycompany/maven-repository/com/mycompany/corporate-   pom/1.0/corporate-pom-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.607s
[INFO] Finished at: Tue Sep 17 14:33:01 MST 2013
[INFO] Final Memory: 7M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy (default-deploy) on project corporate-pom: Failed to deploy artifacts: Co
uld not transfer artifact com.mycompany:corporate-pom:pom:1.0 from/
to CompanyREPO (https://bitbucket.org/mycompany/maven-repository): Connection to h
ttp://:8080 refused: Connection refused: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception 

Merci pour votre aide.

InformationsquelleAutor cooler | 2013-09-17