You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Vinicius Caldeira Carvalho <vi...@squadra.com.br> on 2005/05/23 21:19:38 UTC

newbie questions

Hello there. I'm creating my first project using maven. I have some good 
experience with ant. So far It seems the COOLEST Project management around.
I have a feel questions, simple ones I believe :D

1st. I have some libs not present on the ibiblio (jta, mail, activation, 
concurrent-1.3.4) and my project depends on them, how do I set 
dependencies for that?

2nd. When building a war file, how do I specify which aditional libs to 
add? Those not found on the REPO?


Thanks and best regards

Vinicius

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: newbie questions

Posted by Kristian Nordal <kr...@gmail.com>.
On 5/24/05, Vinicius Caldeira Carvalho <vi...@squadra.com.br> wrote:
> Hello there. I'm creating my first project using maven. I have some good
> experience with ant. So far It seems the COOLEST Project management around.
> I have a feel questions, simple ones I believe :D
> 
> 1st. I have some libs not present on the ibiblio (jta, mail, activation,
> concurrent-1.3.4) and my project depends on them, how do I set
> dependencies for that?

Put them in your local repository, same as the ones Maven downloads,
and declare them as dependencies in your pom. Eg.
~/.maven/repository/concurrent/jars/concurrent-1.3.4.jar, and then in
your pom:
<dependency>
  <groupId>concurrent</groupId>
  <artifactId>concurrent</artifactId>
  <version>1.3.4</version>
</dependency>

> 2nd. When building a war file, how do I specify which aditional libs to
> add? Those not found on the REPO?

In your dependencies:
  <properties>
    <war.bundle>true</war.bundle>
  </properties>

http://maven.apache.org/reference/index.html

--
Kristian

> 
> Thanks and best regards
> 
> Vinicius

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: newbie questions

Posted by Alex Soto <ap...@gmail.com>.
> 1st. I have some libs not present on the ibiblio (jta, mail, activation,
> concurrent-1.3.4) and my project depends on them, how do I set
> dependencies for that?


The 'right way' is probably to setup your own remote repository. I did so 
for sun jar's I needed that were not available at ibiblio. If the unique 
jar's don't follow the version naming convention, then use the <jar> tag to 
specify the jar name. Here is my example:
<dependency>
<groupId>sun</groupId>
<artifactId>j2ee</artifactId>
<jar>j2ee.jar</jar>
</dependency> 


You can also 'hack it' by putting it in your local repository too 
(~/.maven/repository)

2nd. When building a war file, how do I specify which aditional libs to
> add? Those not found on the REPO?


Same as usual dependency declaration just set the war.bundle property = 
true. See the docs for the war plugin. (
http://maven.apache.org/reference/plugins/war/)

Good luck

Re: newbie questions

Posted by Arik Kfir <ar...@gmail.com>.
Hi Vinicius,

You have two options:
1. You can set up your own repository. Good news: it's quite simple. If you 
have a web server or some public dir that's available via http, you can 
mimic the structure of your local repository (look at ~/.maven/repository) 
and recreate it in your public dir (with only the jars you need). Once 
you've created it, you need to tell maven to look in your new repo, by 
adding the "maven.repo.remote" to your ~/build.properties file, like this:

maven.repo.remote=http://www.ibiblio.org/maven,http://www.myserver.com/my_repo

If maven fails to find something in ibiblio, it will also look in your own 
repo. neat eh? :) Look at http://maven.apache.org/using/repositories.html 
and http://maven.apache.org/reference/internal-repositories.html for more 
information.

2. If you don't have your own server, you can use the "jar override" 
feature, documented at 
http://maven.apache.org/using/managing-dependencies.html - this allows you 
to specify that a certain dependency is located elsewhere, locally.

Have fun! :)

----- Original Message ----- 
From: "Vinicius Caldeira Carvalho" <vi...@squadra.com.br>
To: <us...@maven.apache.org>
Sent: Monday, May 23, 2005 9:19 PM
Subject: newbie questions


> Hello there. I'm creating my first project using maven. I have some good 
> experience with ant. So far It seems the COOLEST Project management 
> around.
> I have a feel questions, simple ones I believe :D
>
> 1st. I have some libs not present on the ibiblio (jta, mail, activation, 
> concurrent-1.3.4) and my project depends on them, how do I set 
> dependencies for that?
>
> 2nd. When building a war file, how do I specify which aditional libs to 
> add? Those not found on the REPO?
>
>
> Thanks and best regards
>
> Vinicius
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org