Thanks but I do not need to run my own repository at this stage. I am just trying to develop some small and personal projects. I hope there is another way to fix this problem anyways.
Does anyone else have an idea ? Thanks. --- On Mon, 3/28/11, Ron Wheeler <rwhee...@artifact-software.com> wrote: From: Ron Wheeler <rwhee...@artifact-software.com> Subject: Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) To: users@maven.apache.org Date: Monday, March 28, 2011, 6:48 PM It appears that you are not running a repository. You might find Nexus (or one of the other free Maven repos) as a good solution for your problem. Really a big help in working with Maven. Ron On 28/03/2011 4:07 PM, Celinio Fernandes wrote: > Hi, > I have a small problem with some dependency. > First a word about my environment : > Eclipse Helios > Maven with the M2Eclipse plugin > Maven 3.0.2 > jdk 1.6 > Windows 7 > > My project is made of 1 parent project and 2 other projects (modules). > First i had a problem with the ojdbc14 library. It was complaining that it > could not find the ojdbc14.jar : > com.oracle:ojdbc14:jar:10.2.0.2.0 > > So I fixed it with the following command : > mvn install:install-file > -Dfile=D:\Dev\oracle\oracleexpress\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar > -Dpackaging=jar > -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 > > I added it to the local repository. > But then i get another error when i run "mvn install" from Eclipse, using the > M2eclipse plugin : > [ERROR] Failed to execute goal on project projet.core: Could not resolve > dependencies for project > fr.celinio.gwt:projet.core:jar:0.0.1-SNAPSHOT: Could not find artifact > javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) > -> [Help 1] > > So I installed the jta:jar in my local repository, like i did for the > ojdbc.jar library : > mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta >-Dversion=1.0.1B -Dpackaging=jar -Dfile=D:\Temp\jta-1_1-classes.jar > > But why does it keep looking into the central repository > (http://repo1.maven.org/maven2) ? > Shouldn't Maven look first in the local repository, find the library and then > skip looking in the central repository ? > > > Here is the pom.xml of my parent project : > > <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/xsd/maven-4.0.0.xsd"> > <modelVersion>4.0.0</modelVersion> > > <groupId>fr.celinio.gwt</groupId> > <artifactId>projet.parent</artifactId> > <version>0.0.1-SNAPSHOT</version> > <packaging>pom</packaging> > > <name>projet.parent</name> > <url>http://maven.apache.org</url> > > <properties> > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > </properties> > > <dependencies> > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>3.8.1</version> > <scope>test</scope> > </dependency> > </dependencies> > <modules> > <module>projet.core</module> > <module>../projet.gwt</module> > </modules> > > </project> > > > Here is the pom.xml of the projet.core module (the project with the > ojdbc14.jar dependency) : > > <?xml version="1.0"?> > <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd" > xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <modelVersion>4.0.0</modelVersion> > <parent> > <artifactId>projet.parent</artifactId> > <groupId>fr.celinio.gwt</groupId> > <version>0.0.1-SNAPSHOT</version> > </parent> > <groupId>fr.celinio.gwt</groupId> > <artifactId>projet.core</artifactId> > <version>0.0.1-SNAPSHOT</version> > <name>projet.core</name> > <packaging>jar</packaging> > <build> > <resources> > <resource> > <directory>src/main/java</directory> > <includes> > <include>**/*.java</include> > </includes> > </resource> > <!--<resource> --> > <!--<directory>src/main/resources</directory> --> > <!--<includes> --> > <!--<include>**/*.*xml</include> --> > <!--<include>**/*.*properties</include> --> > <!--</includes> --> > <!--</resource> --> > </resources> > <testResources> > <testResource> > <directory>src/test/java</directory> > <includes> > <include>**/*.*</include> > </includes> > </testResource> > </testResources> > </build> > <url>http://maven.apache.org</url> > <properties> > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > </properties> > > <!--<repositories> --> > <!--<repository> --> > <!--<id>java.net</id> --> > <!--<name>The Java.net Maven repository</name> --> > <!--<url>http://download.java.net/maven/2</url> --> > <!--</repository> --> > <!--</repositories> --> > > <dependencies> > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>3.8.1</version> > <scope>test</scope> > </dependency> > > > <dependency> > <groupId>org.hibernate</groupId> > <artifactId>hibernate</artifactId> > <version>3.2.6.ga</version> > </dependency> > <dependency> > <groupId>org.springframework</groupId> > <artifactId>spring</artifactId> > <version>2.5.6</version> > </dependency> > <dependency> > <groupId>com.oracle</groupId> > <artifactId>ojdbc14</artifactId> > <version>10.2.0.1.0</version> > </dependency> > > </dependencies> > </project> > > > And here is the pom.xml of the other module : > > <?xml version="1.0" encoding="UTF-8"?> > <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"> > > <!-- POM file generated with GWT webAppCreator --> > <modelVersion>4.0.0</modelVersion> > <parent> > <artifactId>projet.parent</artifactId> > <groupId>fr.celinio.gwt</groupId> > <version>0.0.1-SNAPSHOT</version> > <relativePath>../projet.parent/pom.xml</relativePath> > > </parent> > > <groupId>fr.celinio.gwt</groupId> > <artifactId>projet.gwt</artifactId> > <packaging>war</packaging> > <version>0.0.1-SNAPSHOT</version> > <name>GWT Maven Archetype</name> > > <dependencyManagement> > <dependencies> > <dependency> > <groupId>fr.celinio.gwt</groupId> > <artifactId>projet.core</artifactId> > <version>0.0.1-SNAPSHOT</version> > <type>jar</type> > <scope>compile</scope> > </dependency> > </dependencies> > </dependencyManagement> > <properties> > <!-- Convenience property to set the GWT version --> > <gwtVersion>2.1.0</gwtVersion> > <!-- GWT needs at least java 1.5 --> > <maven.compiler.source>1.5</maven.compiler.source> > <maven.compiler.target>1.5</maven.compiler.target> > ><webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory> > </properties> > > <dependencies> > <dependency> > <groupId>com.google.gwt</groupId> > <artifactId>gwt-servlet</artifactId> > <version>2.2.0</version> > <scope>runtime</scope> > </dependency> > <dependency> > <groupId>com.google.gwt</groupId> > <artifactId>gwt-user</artifactId> > <version>2.2.0</version> > <scope>provided</scope> > </dependency> > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>4.7</version> > <scope>test</scope> > </dependency> > </dependencies> > > <build> > <!-- Generate compiled stuff in the folder used for developing mode --> > <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory> > > <plugins> > > <!-- GWT Maven Plugin --> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>gwt-maven-plugin</artifactId> > <version>2.2.0</version> > <executions> > <execution> > <goals> > <goal>compile</goal> > <goal>test</goal> > <goal>i18n</goal> > <goal>generateAsync</goal> > </goals> > </execution> > </executions> > <!-- Plugin configuration. There are many available options, see >gwt-maven-plugin > documentation at codehaus.org --> > <configuration> > <runTarget>Application.html</runTarget> > <hostedWebapp>${webappDirectory}</hostedWebapp> > ><i18nMessagesBundle>fr.celinio.gwt.projet.gwt.client.Messages</i18nMessagesBundle> > </configuration> > </plugin> > > <!-- Copy static web files before executing gwt:run --> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-war-plugin</artifactId> > <version>2.1.1</version> > <executions> > <execution> > <phase>compile</phase> > <goals> > <goal>exploded</goal> > </goals> > </execution> > </executions> > <configuration> > <webappDirectory>${webappDirectory}</webappDirectory> > </configuration> > </plugin> > > </plugins> > </build> > > </project> > > > Thanks for helping. > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org