You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by RobJac <ro...@caritor.com> on 2006/04/12 11:54:39 UTC
How to create Local repository
I am a new Mavern-2.0 User. It would be really appreciated if some one could
help me out on how to configure a local repository for Mavern. I have a J2EE
project built on My Eclipse IDE. There are lot of 3rd party tools (.jar)
used by this project. When i am trying to run mvn compile for each project
its expecting the jar files to be available in .m2/repository folder which I
is not what I want. I would want to specify my own location to place this
jars and provide a <dependency> tag for this jar in each of my project's
pom.xml.
I have a project say Project A containing folder structure as
src/main/<package>/A.java using say a jar Log4j-1.2.2.jar. The pom.xml for
this project looks like
<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>GroupA</groupId>
<artifactId>A</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<dependency>
<groupId>lib</groupId>
<artifactId>log4j</artifactId>
<version>1.2.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
When I give this way its trying to search for the log4j-1.2.2 jar in my
.m2/repository folder. How do I make changes so that it points to a path say
C:\Temp. I am aware of
<project>
...
<repositories>
<repository>
<id></id>
<repository>
</repositories>
...
</project>
But could some one provide me an example of how to provide details in this?
--
View this message in context: http://www.nabble.com/How-to-create-Local-repository-t1437154.html#a3878663
Sent from the Maven - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to create Local repository
Posted by Arik Kfir <ar...@gmail.com>.
Hi RobJac,
I recommend you take a look at:
http://maven.apache.org/guides/mini/guide-configuring-maven.html which
explains how to configure M2 - look for the settings.xml file.
For a complete reference about using 'settings.xml' file - see
http://maven.apache.org/maven-settings/settings.html
Hope this helps,
Arik.
On 4/12/06, RobJac <ro...@caritor.com> wrote:
>
>
> I am a new Mavern-2.0 User. It would be really appreciated if some one
> could
> help me out on how to configure a local repository for Mavern. I have a
> J2EE
> project built on My Eclipse IDE. There are lot of 3rd party tools (.jar)
> used by this project. When i am trying to run mvn compile for each project
> its expecting the jar files to be available in .m2/repository folder which
> I
> is not what I want. I would want to specify my own location to place this
> jars and provide a <dependency> tag for this jar in each of my project's
> pom.xml.
> I have a project say Project A containing folder structure as
> src/main/<package>/A.java using say a jar Log4j-1.2.2.jar. The pom.xml for
> this project looks like
>
> <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>GroupA</groupId>
> <artifactId>A</artifactId>
> <packaging>jar</packaging>
> <version>1.0</version>
> <dependencies>
> <dependency>
> <dependency>
> <groupId>lib</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.2</version>
> <scope>compile</scope>
> </dependency>
> </dependencies>
> </project>
>
> When I give this way its trying to search for the log4j-1.2.2 jar in my
> .m2/repository folder. How do I make changes so that it points to a path
> say
> C:\Temp. I am aware of
> <project>
> ...
> <repositories>
> <repository>
> <id></id>
> <repository>
> </repositories>
> ...
> </project>
> But could some one provide me an example of how to provide details in
> this?
> --
> View this message in context:
> http://www.nabble.com/How-to-create-Local-repository-t1437154.html#a3878663
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>