Ayuda con Maven 2

lmfernandez
13 de Junio del 2009
Hola a todos. Soy novata en este tema y tengo algunos inconvenientes que me rompen la cabeza hace varios dìas. Utilizo Eclipse 3.4.1,Maven 2.0.10,Spring 2.5.6 y Oracle 10g Express.Tomcat 5.5.27

En mi pom.xml declaro la depedencia para Oracale y cuando ejecuto mvn eclipse:eclipse veo que no baja el jar.



probè lo siguiente: mvn clean; mvn eclipse: eclipse (no funcionò)
quitar las depedencias y realizar el paso anterior.(:frown:)

Quite las dependencias:
o mysql:mysql-connector-java:5.1.6 y jpox:jpox-xmltypeoracle:1.1.9
sigue apareciendo cuando ejecuto mvn eclipse.eclipse.

Cuando ejecuto mvn eclipse: eclipse: no veo las nuevas dependencias y cuando ejecuto el tomcat sale el siguiente error(xq no levanta el jar de Oracle).


posteo los archivos; alguien pude ayudarme :) Graciassssssssssssssssss


<-------------------------------------ERROR TOMCAT------------------------------------>
ADVERTENCIA: Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
<-----------------------------------/-ERROR TOMCAT------------------------------------>

<------------------------------------/spring-struts.xml ----------------------------------->

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="servicioPrueba" class="prueba.ServicioPrueba" />

<bean name="/prueba" class="prueba.PruebaAction">
<property name="servicioPrueba" ref="servicioPrueba" />
</bean>

<!--========== Spring Data Source ==========-->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@localhost:1521:xe" />
<property name="username" value="uomo" />
<property name="password" value="uomo" />
</bean>
<!--========== /Spring Data Source ==========-->
<!--========== Hibernate SessionFactory ==========-->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<!-- <property name="configLocation" value="classpath:/hibernate.cfg.xml" />
<property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" />-->
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">true</prop>

</props>
</property>
</bean>
<!--========== /Hibernate SessionFactory ==========-->
<!--========== TransactionManager ==========-->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref ="sessionFactory" />


</bean>
<!--========== /TransactionManager ==========-->

<!--========== Hibernate Template ==========-->
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<!--========== /Hibernate Template ==========-->

</beans>
<------------------------------------/spring-struts.xml ---------------------------------->
<-------------------------------------------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>tesis</groupId>
<artifactId>Uomo</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>Uomo</name>

<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>

<dependencies>
<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.2</version>
</dependency>

<!-- Struts dependencies -->
<dependency>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
<version>1.2.9</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-struts</artifactId>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.6.ga</version>
</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>
<!-- Oracle-->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.3.0</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>Uomo</finalName>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
</resource>
<resource>
<filtering>false</filtering>
<directory>src/main/java</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<testResources>
<testResource>
<filtering>false</filtering>
<directory>src/test/java</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<!-- <downloadJavadocs>true</downloadJavadocs> -->
<wtpversion>2.0</wtpversion>
</configuration>
</plugin>
</plugins>
</build>
</project>


<-----------------------------------------/pom.xml------------------------------------------>
<-------------------------------consola. mvn eclipse: clispse------------------------------->

[INFO] Building Uomo
[INFO] task-segment: [eclipse:eclipse]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
[INFO] No goals needed for project - skipping
[INFO] [eclipse:eclipse]
[INFO] Adding support for WTP version 2.0.
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAIN
ER
[WARNING] POM for 'jpox:jpox-xmltypeoracle:pom:1.1.9:compile' is invalid. It wil
l be ignored for artifact resolution. Reason: Failed to validate POM for project
jpox:jpox-xmltypeoracle at Artifact [jpox:jpox-xmltypeoracle:pom:1.1.9:compile]

[WARNING] POM for 'jpox:jpox-xmltypeoracle:pom:1.1.9:compile' is invalid. It wil
l be ignored for artifact resolution. Reason: Failed to validate POM for project
jpox:jpox-xmltypeoracle at Artifact [jpox:jpox-xmltypeoracle:pom:1.1.9:compile]

[INFO] File E:tesisOuUomo.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want
old settings to be removed.
[INFO] Wrote Eclipse project for "Uomo" to E:tesisOuUomo.
[INFO]
Javadoc for some artifacts is not available.
Please run the same goal with the -DdownloadJavadocs=true parameter in or
der to check remote repositories for javadoc.
List of artifacts without a javadoc archive:
o commons-dbcp:commons-dbcp:1.2.2
o commons-pool:commons-pool:1.3
o javax.servlet:jsp-api:2.0
o javax.servlet:servlet-api:2.4
o jpox:jpox-xmltypeoracle:1.1.9
o junit:junit:3.8.1
o mysql:mysql-connector-java:5.1.6
o org.aspectj:aspectjrt:1.6.2
o org.aspectj:aspectjweaver:1.6.2
o org.hibernate:hibernate:3.2.6.ga
o net.sf.ehcache:ehcache:1.2.3
o commons-logging:commons-logging:1.0.4
o commons-collections:commons-collections:2.1.1
o javax.transaction:jta:1.0.1B
o asm:asm-attrs:1.5.3
o dom4j:dom4j:1.6.1
o antlr:antlr:2.7.6
o cglib:cglib:2.1_3
o asm:asm:1.5.3
o org.springframework:spring:2.5.6
o org.springframework:spring-mock:2.0.8
o org.springframework:spring-struts:2.0.8
o commons-beanutils:commons-beanutils:1.7.0
o struts:struts:1.2.9
o commons-digester:commons-digester:1.6
o xml-apis:xml-apis:1.0.b2
o commons-fileupload:commons-fileupload:1.0
o commons-validator:commons-validator:1.1.4
o oro:oro:2.0.7
o xalan:xalan:2.5.1
o org.springframework:spring-beans:2.0.8
o org.springframework:spring-core:2.0.8
o org.springframework:spring-context:2.0.8
o aopalliance:aopalliance:1.0
o org.springframework:spring-web:2.0.


<------------------------------consola. mvn eclipse: clispse------------------------------->