Erro Maven + Eclipse

Boa Noite Pessoal,

Estou tentando migrar meu projeto do JDeveloper para o eclipse+Maven. Já fiz todas configurações necessárias como estavam nos tutoriais, instalei o m2eclipse, esta rodando perfeitamente, mas sempre quando abro o eclipse nunca carrega as dependencias corretamente, este é o log que gera quando abro o eclipse:

12/07/10 11h12min52s BRT: Eclipse is running in a JRE, but a JDK is required
  Some Maven plugins may not work when importing projects or updating source folders.
12/07/10 11h13min2s BRT: Updating index central|http://repo1.maven.org/maven2
12/07/10 11h13min11s BRT: Unable to update index for central|http://repo1.maven.org/maven2
12/07/10 11h13min11s BRT: Updating index repositorio-uol|http://mirrors.uol.com.br/pub/maven2/
12/07/10 11h13min12s BRT: Unable to update index for repositorio-uol|http://mirrors.uol.com.br/pub/maven2/
12/07/10 11h13min12s BRT: Updating index repositorio-JFrog|http://repo.jfrog.org/artifactory/repo/
12/07/10 11h13min12s BRT: Unable to update index for repositorio-JFrog|http://repo.jfrog.org/artifactory/repo/
12/07/10 11h13min13s BRT: Updating index google-maven-repository|http://google-maven-repository.googlecode.com/svn/repository/
12/07/10 11h13min13s BRT: Unable to update index for google-maven-repository|http://google-maven-repository.googlecode.com/svn/repository/
12/07/10 11h13min13s BRT: Updating index snapshots-repository|http://snapshots.repository.codehaus.org/
12/07/10 11h13min13s BRT: Unable to update index for snapshots-repository|http://snapshots.repository.codehaus.org/
12/07/10 11h13min13s BRT: Updating index repositorio-howard|http://howardlewisship.com/repository/
12/07/10 11h13min13s BRT: Unable to update index for repositorio-howard|http://howardlewisship.com/repository/
12/07/10 11h13min13s BRT: Updating index repositorio-maven2repo2|http://repo2.maven.org/maven2/
12/07/10 11h13min13s BRT: Unable to update index for repositorio-maven2repo2|http://repo2.maven.org/maven2/
12/07/10 11h13min13s BRT: Updating index repositorio-maven2repo1|http://repo1.maven.org/maven2/
12/07/10 11h13min13s BRT: Unable to update index for repositorio-maven2repo1|http://repo1.maven.org/maven2/
12/07/10 11h13min13s BRT: Updating index repositorio-ibiblio.org|http://www.ibiblio.org/maven/
12/07/10 11h13min13s BRT: Unable to update index for repositorio-ibiblio.org|http://www.ibiblio.org/maven/
12/07/10 11h13min13s BRT: Updating index maven-repository.dev.java.net|https://maven-repository.dev.java.net/nonav/repository/
12/07/10 11h13min35s BRT: Unable to download Repository[e77435505c0538c25d9510be703b3b0b|https://maven-repository.dev.java.net/nonav/repository/.index]/nexus-maven-repository-index.properties: java.net.ConnectException: Connection timed out: no further information
12/07/10 11h13min35s BRT: Unable to update index for maven-repository.dev.java.net|https://maven-repository.dev.java.net/nonav/repository/
12/07/10 11h13min35s BRT: Updating index jboss-maven2|http://repository.jboss.org/maven2/
12/07/10 11h13min35s BRT: Unable to update index for jboss-maven2|http://repository.jboss.org/maven2/
12/07/10 11h13min35s BRT: Updating index xemacs-maven2|http://ftp.us.xemacs.org/pub/mirrors/maven2/
12/07/10 11h13min35s BRT: Unable to update index for xemacs-maven2|http://ftp.us.xemacs.org/pub/mirrors/maven2/

Não sei se criei minha dependencia na rede corretamente, abaixo segue meu pom.xml do projeto:

<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>br.jus.tjrj.channel.web</groupId>
	<artifactId>view</artifactId>
	<packaging>war</packaging>
	<name>Portal TJRJ</name>
	<version>1.0.0.0</version>
	<description>
		Portal TJRJ
	</description>
	<url>http://www.tjrj.jus.br</url>

	<build>
		<!-- LOCALIZACION DE FUENTES Y RECURSOS -->
		<finalName>view</finalName>
		<sourceDirectory>JavaSource</sourceDirectory>
		<testSourceDirectory>TestSource</testSourceDirectory>
		<outputDirectory>WebContent\WEB-INF\classes</outputDirectory>
		<resources>
			<resource>
				<directory>JavaSource</directory>
				<filtering>true</filtering>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>TestSource</directory>
			</testResource>
		</testResources>


		<plugins>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1-beta-1</version>
				<configuration>
					<warSourceDirectory>WebContent</warSourceDirectory>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<configuration>
					<locales>pt_BR</locales>
					<stagingDirectory>../site-staging</stagingDirectory>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<repositories>
		
		<repository>
			<id>oss</id>
			<name>oss</name>
			<url>http://oss.sonatype.org/content/repositories/sourceforge-releases</url>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>ibiblioMavenPlugins2</id>
			<url>http://www.ibiblio.org/maven2</url>
		</pluginRepository>
	</pluginRepositories>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>dependency-maven-plugin</artifactId>
				<version>1.0</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jxr-maven-plugin</artifactId>
				<version>2.1</version>
			</plugin>
		</plugins>
	</reporting>

	<dependencies>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib-nodep</artifactId>
			<version>2.2</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>1.8.2</version>
		</dependency>
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<version>3.2.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>commons-digester</groupId>
			<artifactId>commons-digester</artifactId>
			<version>1.8.1</version>
		</dependency>
		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>1.1.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging-api</artifactId>
			<version>1.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>dom4j</groupId>
			<artifactId>dom4j</artifactId>
			<version>1.6.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>itext</groupId>
			<artifactId>itext</artifactId>
			<version>2.0.4</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.jettison</groupId>
			<artifactId>jettison</artifactId>
			<version>1.0.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>1.6</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>javax.faces</groupId>
			<artifactId>jsf-api</artifactId>
			<version>1.2</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>javax.faces</groupId>
			<artifactId>jsf-impl</artifactId>
			<version>1.2</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>jstl</groupId>
			<artifactId>jstl</artifactId>
			<version>1.1.2</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>jstl</groupId>
			<artifactId>standard</artifactId>
			<version>1.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.15</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>pdfbox</groupId>
			<artifactId>pdfbox</artifactId>
			<version>0.7.3</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>stax</groupId>
			<artifactId>stax</artifactId>
			<version>1.2.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>stax</groupId>
			<artifactId>stax-api</artifactId>
			<version>1.0.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>woodstox</groupId>
			<artifactId>wstx-asl</artifactId>
			<version>3.2.7</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.megginson.sax</groupId>
			<artifactId>xml-writer</artifactId>
			<version>0.2</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>xom</groupId>
			<artifactId>xom</artifactId>
			<version>1.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>xpp3</groupId>
			<artifactId>xpp3_min</artifactId>
			<version>1.1.4c</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.thoughtworks.xstream</groupId>
			<artifactId>xstream</artifactId>
			<version>1.3.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.thoughtworks.xstream</groupId>
			<artifactId>xstream-benchmark</artifactId>
			<version>1.3.1</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>library-tj.commons-tj</groupId>
			<artifactId>commonsTj</artifactId>
			<version>1.4.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>library-tj.criptografia</groupId>
			<artifactId>criptografia</artifactId>
			<version>1.0.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>library-tj.distrib_ejb-mensageiro</groupId>
			<artifactId>distrib_ejbMensageiro</artifactId>
			<version>1.1.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>library-tj.distrib-ejb-dgtec-gedar</groupId>
			<artifactId>distribEJBDgtecGedar</artifactId>
			<version>1.1.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>library-tj.distribuicao-cofre</groupId>
			<artifactId>distribuicaoCofre</artifactId>
			<version>1.3.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>library-tj.ejb-numeracao-unica-redist</groupId>
			<artifactId>ejbNumeracaoUnicaRedist</artifactId>
			<version>1.0.2</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>library-tj.ejb-validar-grerj</groupId>
			<artifactId>EJBValidarGrerj</artifactId>
			<version>1.0.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>library-tj</groupId>
			<artifactId>modal-fw</artifactId>
			<version>2.1.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>library-tj.segweb</groupId>
			<artifactId>segweb</artifactId>
			<version>1.0.4</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>library-tj.tjlog</groupId>
			<artifactId>tjlog</artifactId>
			<version>1.0.0</version>
			<scope>compile</scope>
		</dependency>
		
		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>mail</artifactId>
			<version>1.4</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.4</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.14</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.5.8</version>
		</dependency>
		
		<!-- cambio EJB gerado pelo WAS 6.2.5 -->
		<dependency>
			<groupId>castor</groupId>
			<artifactId>castor</artifactId>
			<version>1.0</version>
			<scope>compile</scope>
		</dependency>

		<!-- JoeSnmp dependency for snmp emitter -->


		<!-- Dependencias de EJB -->
		<dependency>
			<groupId>javax</groupId>
			<artifactId>ejb</artifactId>
			<version>3.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>jfree</groupId>
			<artifactId>jcommon</artifactId>
			<version>1.0.6</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>jfree</groupId>
			<artifactId>jfreechart</artifactId>
			<version>1.0.3</version>
			<scope>compile</scope>
		</dependency>
	</dependencies>
</project>

Segue meu settings.xml do maven

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  
  <pluginGroups>
   
  </pluginGroups>

  <proxies>
  
	<proxy>
      <id>proxy.tj.rj.</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.tj.rj.gov.br</host>
      <port>80</port>
      <nonProxyHosts>
		*.tj.rj.gov.br,*ccd.serpro.gov.br,*roweb.delegacialegal.rj.gov.br,
		127.0.0.1,150.110.146.66,172.16.1.30,200.222.1.202,DGTEC-DESIS-RDD,localhost
	  </nonProxyHosts>
    </proxy>
  </proxies>

  <servers>
  
  </servers>

  <mirrors>
   
  </mirrors>

  <profiles>
   
	<profile>
			<id>perfil-basico</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<repositories>				
				<repository>
					<id>xemacs-maven2</id>
					<name>Repositorio do Xemacs pra o Maven</name>
					<url>http://ftp.us.xemacs.org/pub/mirrors/maven2/</url>
					<layout>default</layout>
				</repository>
				<repository>
					<id>jboss-maven2</id>
					<name>Repositorio do JBoss pra o Maven</name>
					<url>http://repository.jboss.org/maven2/</url>
					<layout>default</layout>
				</repository>
				<repository>
					<id>repomaven-tjrj</id>
					<name>Repositorio do maven do tj</name>
					<url>
						file:///tjerj204/Dipor/Distribuicao Libraries/repomaven-tjrj/
					</url>
					<layout>default</layout>
				</repository>
				<repository>
					<id>maven-repository.dev.java.net</id>
					<name>Repositorio do maven-repository.dev.java.net</name>
					<url>https://maven-repository.dev.java.net/nonav/repository/</url>
					<layout>default</layout>
				</repository>
				<repository>
					<id>repositorio-ibiblio.org</id>
					<name>Repositorio maven do ibiblio.org</name>
					<url>http://www.ibiblio.org/maven/</url>
					<layout>default</layout>
				</repository>
				<repository>
					<id>repositorio-maven2repo1</id>
					<name>Primeiro repositorio do maven</name>
					<url>http://repo1.maven.org/maven2/</url>
					<layout>default</layout>
				</repository>
				<repository>
					<id>repositorio-maven2repo2</id>
					<name>Segundo repositorio do maven</name>
					<url>http://repo2.maven.org/maven2/</url>
					<layout>default</layout>
				</repository>
				<repository>
					<id>repositorio-howard</id>
					<name>
						Repositorio do howard para plugins do surefire
					</name>
					<url>http://howardlewisship.com/repository/</url>
					<layout>default</layout>
				</repository>
				<repository>
					<id>repositorio-uol</id>
					<name>
						Repositorio do UOL para o JaxB
					</name>
					<url>http://mirrors.uol.com.br/pub/maven2/</url>
					<layout>default</layout>
				</repository>	
				<repository>
					<id>repositorio-JFrog</id>
					<name>
						Repositorio JFrog
					</name>
					<url>http://repo.jfrog.org/artifactory/repo/</url>
					<layout>default</layout>
				</repository>	
				<repository>
					<id>google-maven-repository</id>
					<name>Google Maven Repository</name>
					<url>http://google-maven-repository.googlecode.com/svn/repository/</url>
				</repository>
				<repository>
					<id>snapshots-repository</id>
					<name>Snapshots Maven Repository</name>
					<url>http://snapshots.repository.codehaus.org/</url>
				</repository>
							
				</repositories>
		</profile>
  
  </profiles>

  <activeProfiles>
    <activeProfile>perfil-basico</activeProfile>
  </activeProfiles>
</settings>

Será que esta faltando alguma coisa em meu pom.xml ou no sttings galera? Alguém pode me ajudar nessa? Abraço a todos!

Primeira linha do log:

12/07/10 11h12min52s BRT: Eclipse is running in a JRE, but a JDK is required Some Maven plugins may not work when importing projects or updating source folders.

Tem que trocar para o eclipse usar jdk em vez de jre.

Olá tubiluki,

Já tinha testado apontando para um jdk ao invés de um jre e nada. Mas fiz novamente pra vc ver como ficou:

Segue a janela que o eclipse me apresenta quando é iniciado. E mesmo assim, continua com a mensagem no console.



http://wiki.eclipse.org/Eclipse.ini

ve la que tem como mudar no eclipse.ini para usar o jdk.

Blz cara, consegui! Mas quando dou um maven install pelo eclipse em meu projeto, nunca é possivel baixar as dependencias. Isso que acho estranho, proxy ta configurado certo, dependencias configuradas certo, muito estranho.

Será que tem algo haver com o repositorio na rede? Pois não se configurei certo. Pois coloquei o caminho dele como se estivesse entrando pelo executar do windows

#  <repository>  
#                     <id>repomaven-tjrj</id>  
#                     <name>Repositorio do maven do tj</name>  
#                     <url>  
#                         file:///tjerj204/Dipor/Distribuicao Libraries/repomaven-tjrj/  
#                     </url>  
#                     <layout>default</layout>  
#                 </repository>  

Ou será que é algo referente a configuração do proxy? Será que preciso colocar o ip da maquida da rede onde esta o repo local na tag , segue a configuração abaixo:

# <proxy>  
#       <id>proxy.empresa</id>  
#       <active>true</active>  
#       <protocol>http</protocol>  
#       <host>empresa.br</host>  
#       <port>80</port>  
#       <nonProxyHosts>  
#         127.0.0.1,DGTEC-DESIS-RDD,localhost  
#       </nonProxyHosts>  
#     </proxy>  

Galera tive um progresso, não esta gerando mais erro nenhum quando executo o maven clean, porém ele tenta procurar uma dependencia inexistente, vejam vocês:

[INFO] Unable to find resource 'org.glassfish:api-pom:pom:3.0' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.glassfish
ArtifactId: api-pom
Version: 3.0

Reason: Unable to download the artifact from any repository

  org.glassfish:api-pom:pom:3.0

from the specified remote repositories:
  repomaven-tjrj (file:///tjerj204/Dipor/Distribuicao Libraries/repomaven-tjrj/),
  repositorio-JFrog (http://repo.jfrog.org/artifactory/repo/),
  repositorio-howard (http://howardlewisship.com/repository/),
  snapshots-repository (http://snapshots.repository.codehaus.org/),
  xemacs-maven2 (http://ftp.us.xemacs.org/pub/mirrors/maven2/),
  jboss-maven2 (http://repository.jboss.org/maven2/),
  google-maven-repository (http://google-maven-repository.googlecode.com/svn/repository/),
  repositorio-maven2repo1 (http://repo1.maven.org/maven2/),
  repositorio-ibiblio.org (http://www.ibiblio.org/maven/),
  central (http://repo1.maven.org/maven2),
  oss (http://oss.sonatype.org/content/repositories/sourceforge-releases),
  repositorio-maven2repo2 (http://repo2.maven.org/maven2/),
  repositorio-uol (http://mirrors.uol.com.br/pub/maven2/),
  maven-repository.dev.java.net (https://maven-repository.dev.java.net/nonav/repository/)



[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 minutes 54 seconds
[INFO] Finished at: Tue Jul 13 11:46:57 BRT 2010
[INFO] Final Memory: 12M/21M
[INFO] ------------------------------------------------------------------------

org.glassfish:api-pom:pom:3.0 não existe em meu pom.xml

Alguém sabe algum outro lugar q eu possa procurar por esta dependância?

Tambem tenho bastante bug e dor de cabeça com Maven + Eclipse :frowning:

Resolvido! :smiley:

Esse api-pom.pom é uma dependencia que baixa automático quando se tem a dependencia do ejb configurada no pom do projeto.

Então, baixei de um repositório online e coloquei e configurei na mão.

Pessoal, to começando com o Maven e to com problemas tbm, instalei o plugin do M2Eclipse e assim que eu abro o eclipse ocorre este erro:

14/04/11 14h30min9s BRT: Eclipse is running in a JRE, but a JDK is required
Some Maven plugins may not work when importing projects or updating source folders.
14/04/11 14h30min14s BRT: Updating index central|http://repo1.maven.org/maven2
14/04/11 14h30min30s BRT: Unable to update index for central|http://repo1.maven.org/maven2

e o arquivo settings.xml não foi criado, ele é criado automaticamente ou eu tenho que cria-lo na mão?