Bonjour,
Mon objectif est de faire un deploiement dans un repository distant avec un projet multi-modules trés simple pour commencer.
Lorsque je lance la commande mvn deploy j'ai des erreurs d'authentification apparemment que je ne comprend pas.
Voici le pom parent,la reponse de maven après la commande et le fichier settings.xml.
Voici la reponse du terminal ( coloane-Snapsho ,c'est fait expres,je n'ai pas oublié le t)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 <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>maven_project</groupId> <artifactId>maven_project</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <modules> <module>projet_maven3</module> <module>projet_maven4</module> </modules> <!-- Envoie par SCP lors du déploiement (deploy) --> <distributionManagement> <!-- use the following if you're not using a snapshot version. --> <!--<repository> <id>Coloane-Releases</id> <name>Coloane Releases</name> <url>scp://132.227.64.65/coloane/public/releases</url> </repository>--> <!-- use the following if you ARE using a snapshot version. --> <snapshotRepository> <id>Coloane-Snapsho</id> <name>Coloane Snapsho</name> <url>scp://idelmehdaoui.com/tmp</url> </snapshotRepository> <!--<site> <id>Coloane-Reports</id> <url>scp://coloane.lip6.fr/coloane/public/reports</url> </site>--> </distributionManagement> <!--<build> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ssh-external</artifactId> <version>1.0-alpha-5</version> </extension> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ftp</artifactId> <version>1.0-alpha-6</version> </extension> </extensions> </build> --> </project>
voici le fichier settings.xml(qui se trouve dans maven2_0_8/conf/settings.xml et non ~/.m2/settings.xml)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 bash-3.2$ mvn deploy [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Unnamed - maven_project:maven_project:pom:1.0-SNAPSHOT [INFO] projet_maven3 [INFO] projet_maven4 [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - maven_project:maven_project:pom:1.0-SNAPSHOT [INFO] task-segment: [deploy] [INFO] ------------------------------------------------------------------------ [INFO] [site:attach-descriptor] [INFO] [install:install] [INFO] Installing /home/bbarbouche/Desktop/maven_project/pom.xml to /home/bbarbouche/.m2/repository/maven_project/maven_project/1.0-SNAPSHOT/maven_project-1.0-SNAPSHOT.pom [INFO] [deploy:deploy] altDeploymentRepository = null [INFO] Retrieving previous build number from Coloane-Snapsho [WARNING] repository metadata for: 'snapshot maven_project:maven_project:1.0-SNAPSHOT' could not be retrieved from repository: Coloane-Snapsho due to an error: Authentication failed: Cannot connect. Reason: Auth fail [INFO] Repository 'Coloane-Snapsho' will be blacklisted [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error deploying artifact: Authentication failed: Cannot connect. Reason: Auth fail [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 59 seconds [INFO] Finished at: Thu Feb 28 14:38:29 CET 2008 [INFO] Final Memory: 7M/14M [INFO] ------------------------------------------------------------------------
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 <servers> <!-- server | Specifies the authentication information to use when connecting to a particular server, identified by | a unique name within the system (referred to by the 'id' attribute below). | | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are | used together. |--> <server> <id>Coloane-Snapsho</id> <username>monidentifiant</username> <password>monmdp</password> </server> <!-- Another sample, using keys to authenticate. <server> <id>siteServer</id> <privateKey>/path/to/private/key</privateKey> <passphrase>optional; leave empty if not used.</passphrase> </server> --> </servers>
voila messieurs je pense que j'ai tout bien fait et ca fait un bon moment que je suis desus sans succés.
J'éspère sincerement que vous pourrez m'aider.
Sur le terminal si je fais la commande: ssh monidentifiant@idelmehdaoui.com
et ensuite le mdp qui sont dans le fichier settings.xml, j'accede a la page.
C'est pour cela que je ne comprends pas.
bassem
Partager