Bonjour,

j'ai le pom.xml suivant :
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
 
<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>fr.paris.damien77</groupId>
    <artifactId>ApplicationTest</artifactId>
    <version>0.0.1-SNAPSHOT</version>
 
    <packaging>jar</packaging>   
 
    <dependencies>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
        </dependency>
    </dependencies>
 
</project>
et quand je fais un mvn clean install j'ai le message suivant :
C:\Users\Damien\Programmation\Java\FTPServer>mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - fr.paris.damien77:ApplicationTest:jar:0.0.1-SNAPSHOT
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: https://maven-repository.dev.java.ne...rs/jms-1.1.jar
Downloading: http://repo1.maven.org/maven2/javax/....1/jms-1.1.jar
Downloading: https://maven-repository.dev.java.ne...jmxtools-1.2.1
.jar
Downloading: http://repo1.maven.org/maven2/com/su...ools-1.2.1.jar
Downloading: https://maven-repository.dev.java.ne...mxri-1.2.1.jar

Downloading: http://repo1.maven.org/maven2/com/su...mxri-1.2.1.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) javax.jms:jms:jar:1.1

Try downloading the file manually from:
http://java.sun.com/products/jms/docs.html

Then, install it using the command:
mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -D
file=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfi
le=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) fr.paris.damien77:ApplicationTest:jar:0.0.1-SNAPSHOT
2) log4j:log4j:jar:1.2.15
3) javax.jms:jms:jar:1.1

2) com.sun.jdmk:jmxtools:jar:1.2.1

Try downloading the file manually from:
http://java.sun.com/products/JavaManagement/download.html

Then, install it using the command:
mvn install:install-file -DgroupId=com.sun.jdmk -DartifactId=jmxtools -Dversion=1.2.1 -Dpackag
ing=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.sun.jdmk -DartifactId=jmxtools -Dversion=1.2.1 -Dpackagin
g=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) fr.paris.damien77:ApplicationTest:jar:0.0.1-SNAPSHOT
2) log4j:log4j:jar:1.2.15
3) com.sun.jdmk:jmxtools:jar:1.2.1

3) com.sun.jmx:jmxri:jar:1.2.1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.sun.jmx -DartifactId=jmxri -Dversion=1.2.1 -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.sun.jmx -DartifactId=jmxri -Dversion=1.2.1 -Dpackaging=ja
r -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) fr.paris.damien77:ApplicationTest:jar:0.0.1-SNAPSHOT
2) log4j:log4j:jar:1.2.15
3) com.sun.jmx:jmxri:jar:1.2.1

----------
3 required artifacts are missing.

for artifact:
fr.paris.damien77:ApplicationTest:jar:0.0.1-SNAPSHOT

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


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Sat May 10 16:23:47 CEST 2008
[INFO] Final Memory: 6M/11M
[INFO] ------------------------------------------------------------------------

Pouquoi ? je ne comprend pas.