I installed M2Eclipse Plug-In for Eclipse. I'm not very experienced with maven. My Problem is that I can't download two Artifacts:
13.07.10 08:53:30 MESZ: Build errors for test; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project test: Missing:
----------
1) com.sun.faces:jsf-api:jar:2.0.0-b13
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.sun.faces -DartifactId=jsf-api -Dversion=2.0.0-b13 -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.faces -DartifactId=jsf-api -Dversion=2.0.0-b13 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) de.studi:Studentenportal:pom:pom:0.0.1-SNAPSHOT
2) com.sun.faces:jsf-api:jar:2.0.0-b13
2) com.sun.faces:jsf-impl:jar:2.0.0-b13
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.sun.faces -DartifactId=jsf-impl -Dversion=2.0.0-b13 -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.faces -DartifactId=jsf-impl -Dversion=2.0.0-b13 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) de.studi:Studentenportal:pom:pom:0.0.1-SNAPSHOT
2) com.sun.faces:jsf-impl:jar:2.0.0-b13
----------
2 required artifacts are missing.
for artifact:
de.studi:Studentenportal:pom:0.0.1-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
Here is my 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.test</groupId>
<artifactId>test</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Studentenportal Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- JSF/JSTL/Facelets -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.0.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.0.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
<build>
<finalName>test</finalName>
</build>
</project>
I tried it with several versions of JSF2 with no success.
I added following to my pom.xml:
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
</repositories>
But the problem is still there. Is there someting wrong with that?
Okay I got it! The project can be built. Unfortunately I don't know why. I didn't changed something :-)
Now I get only Warnings from Maven:
13.07.10 10:04:04 MESZ: Unable to update index for central|http://repo1.maven.org/maven2
13.07.10 10:03:42 MESZ: [WARN] Missing POM for com.sun.faces:jsf-api:jar:2.0.0
13.07.10 10:03:43 MESZ: Updating index central|http://repo1.maven.org/maven2
13.07.10 10:04:04 MESZ: [WARN] Missing POM for com.sun.faces:jsf-impl:jar:2.0.0
13.07.10 10:04:04 MESZ: Unable to download Repository[d9d714e11cb097b3ffcec91cccc65d3e|http://repo1.maven.org/maven2/.index]/nexus-maven-repository-index.properties: java.net.ConnectException: Connection timed out: no further information
13.07.10 10:04:25 MESZ: Downloading http://repo1.maven.org/maven2/com/sun/faces/jsf-impl/2.0.0/jsf-impl-2.0.0.jar
13.07.10 10:04:25 MESZ: Downloading http://repo1.maven.org/maven2/com/sun/faces/jsf-api/2.0.0/jsf-api-2.0.0.jar
13.07.10 10:04:25 MESZ: Downloaded http://repo1.maven.org/maven2/com/sun/faces/jsf-api/2.0.0/jsf-api-2.0.0.jar
13.07.10 10:04:25 MESZ: Downloaded http://repo1.maven.org/maven2/com/sun/faces/jsf-impl/2.0.0/jsf-impl-2.0.0.jar
13.07.10 10:04:25 MESZ: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = 'a2477a115d96ab5bddd88400beb176eaf43816d7'; remote = '<!--' - RETRYING
13.07.10 10:04:25 MESZ: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = '83e1d5e415a35d55de79ab2c9a79bdd3182aa48a'; remote = '<!--' - RETRYING
13.07.10 10:04:26 MESZ: Downloading http://repo1.maven.org/maven2/com/sun/faces/jsf-api/2.0.0/jsf-api-2.0.0.jar
13.07.10 10:04:26 MESZ: Downloaded http://repo1.maven.org/maven2/com/sun/faces/jsf-api/2.0.0/jsf-api-2.0.0.jar
13.07.10 10:04:26 MESZ: Downloading http://repo1.maven.org/maven2/com/sun/faces/jsf-impl/2.0.0/jsf-impl-2.0.0.jar
13.07.10 10:04:26 MESZ: Downloaded http://repo1.maven.org/maven2/com/sun/faces/jsf-impl/2.0.0/jsf-impl-2.0.0.jar
13.07.10 10:04:26 MESZ: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = 'b912ac4338d2bd37982d2d887fb82ac8fc5d54a2'; remote = '<!--' - IGNORING
13.07.10 10:04:26 MESZ: [WARN] *** CHECKSUM FAILED - Checksum failed on download: local = '5e645760133f915dbc0da3d16edd304fdf8e8113'; remote = '<!--' - IGNORING
13.07.10 10:04:26 MESZ: Maven Builder: FULL_BUILD requireFullBuild
13.07.10 10:04:28 MESZ: [WARN] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
13.07.10 10:04:28 MESZ: [INFO] Copying 0 resource
13.07.10 10:04:28 MESZ: [INFO] No sources to compile
13.07.10 10:04:28 MESZ: [WARN] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
13.07.10 10:04:28 MESZ: [INFO] skip non existing resourceDirectory C:\StudiPortal\Workspaces\Studentenportal\src\test\resources
13.07.10 10:05:05 MESZ: Refreshing [/Studentenportal/pom.xml]
13.07.10 10:05:05 MESZ: Maven Builder: AUTO_BUILD requireFullBuild
13.07.10 10:05:05 MESZ: [WARN] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
13.07.10 10:05:05 MESZ: [INFO] Copying 0 resource
13.07.10 10:05:05 MESZ: [INFO] No sources to compile
13.07.10 10:05:05 MESZ: [WARN] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
13.07.10 10:05:05 MESZ: [INFO] skip non existing resourceDirectory C:\StudiPortal\Workspaces\Studentenportal\src\test\resources
It doesn't look so good -.- Especially the Missing POM warnings are anxious.
Update
First I changed it to myfaces and then I added the appropriate repository to the settings.xml in the .m2 directory. Like that:
<profile>
<id>jdk-1.6</id>
<activation>
<jdk>1.6</jdk>
</activation>
<repositories>
<repository>
<id>JBOSS</id>
<name>JBoss Repository</name>
<url>http://repository.jboss.org/maven2/</url>
</repository>
</repositories>
</profile>
But there is still the problem that maven can't find the artifacts. Pls help :-)