Re: Questions about dependencies and artifact publication

2009-09-09 Thread UseTheFork

Hi,

Thanks, I already did read that book, but it does not cover the topic of my
question.

Some acquaintance explained me what I did not know. The dependency on
project A in project B should simply be declared with A's coordinates. If A
is published in a remote Maven repository, I can define that remote
repository in the settings.xml file or I can do it directly in the pom.xml
file (example at line 14 in
http://code.google.com/p/gwt-maven2-starter-app/source/browse/trunk/server/pom.xml).

It does not really matter how Project A's artifact is published in the
remote repository, my local instance of Maven will connect to it, request
Project A and the remote maven repository instance will fetch Project A's
artifacts from its local directory and return it.

Cheers,

UseTheFork


Anders Hammar wrote:
> 
> I suggest that you read Maven: The Definitive Guide book that is free:
> http://www.sonatype.com/documentation/books/maven-defguide
> 
> It will give you insight in the basics of Maven. There are also examples
> which visualize questions like yours.
> 
> /Anders
> 

-- 
View this message in context: 
http://www.nabble.com/Questions-about-dependencies-and-artifact-publication-tp25300769p25362667.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Questions about dependencies and artifact publication

2009-09-08 Thread Anders Hammar
I suggest that you read Maven: The Definitive Guide book that is free:
http://www.sonatype.com/documentation/books/maven-defguide

It will give you insight in the basics of Maven. There are also examples
which visualize questions like yours.

/Anders

On Tue, Sep 8, 2009 at 20:41, UseTheFork  wrote:

>
> Thanks !!! I have a last question.
>
>
> What if Project B (from a third-party) is having a dependency to Project A
> and project A is in a remote repository (let's assume that Project A is
> published under www.mycompany.com/myprojects)?
>
> How should the dependency in Project B to Project A be declared in B's
> pom.xml?
>
> Thanks,
>
> UseTheFork
> --
> View this message in context:
> http://www.nabble.com/Questions-about-dependencies-and-artifact-publication-tp25300769p25351853.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Questions about dependencies and artifact publication

2009-09-08 Thread UseTheFork

Thanks !!! I have a last question.


What if Project B (from a third-party) is having a dependency to Project A
and project A is in a remote repository (let's assume that Project A is
published under www.mycompany.com/myprojects)?

How should the dependency in Project B to Project A be declared in B's
pom.xml?

Thanks, 

UseTheFork
-- 
View this message in context: 
http://www.nabble.com/Questions-about-dependencies-and-artifact-publication-tp25300769p25351853.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Questions about dependencies and artifact publication

2009-09-08 Thread Benju

i) This one is correct, the groupId is the company, and possibly a
sub-department

com.mycompany
ProjectA
1.2


By default, the ProjectA-1.2.jar artifact will be created in
\ProjectA\target.

iii) How should I declare the dependency in my project B?

The groupId, artifactid, and version should be the same in the dependency as
when it is declared in project A's pom.xml.


 
  com.mycompany
  ProjectA
  1.2
 


iv) Do I need to include the following in Project B's pom.xml?

If both projects are built from source at the same time then you do not need
to do this, simply create a third parent pom which references these two and
builds them both thus project B gets its reference to project A from the
local repository.

As for #2, are you talking about deploying to your own repository? You
should typically not need your own repository to get a build to work unless
you need to reference 3rd party artifacts that are not hosted on any public
repos.

-- 
View this message in context: 
http://www.nabble.com/Questions-about-dependencies-and-artifact-publication-tp25300769p25351654.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



RE: Questions about Dependencies

2005-01-12 Thread Stefan Kleineikenscheidt


> -Original Message-
> From: Scott Goldstein [mailto:[EMAIL PROTECTED] On Behalf 
> Of [EMAIL PROTECTED]
> Sent: Wednesday, January 12, 2005 6:57 AM
> To: users@maven.apache.org
> Subject: Questions about Dependencies
> 
> [...]
> 
> 2.One thing that I'm slightly uncomfortable about concerning the
> dependency system, is that the Maven remote repository acts 
> as a middle
> man, downloading jars from the original site and storing it for maven
> use.  Some of the jars have been renamed.  I'm assuming that no other
> changes have been made, but that requires a little bit of a trust
> factor.  I know Maven has a way to configure a dependency to download
> from the original site, but it doesn't always work because the
> originators of the site don't always make the jar downloadable by
> itself.  How do others feel about this?  Is there a convenient way
> around it?

To get more control over the dependencies you use, you can manually
download all JARs to a remote repository within your local network.
Although this is a lot of maintenance work, this gives to full control
what JARs beeing used in your Maven projects.

-Stefan

  
> Thanks.
>  
> Scott
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about Dependencies

2005-01-11 Thread Dion Gillard
On Tue, 11 Jan 2005 21:57:20 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I'm new to Maven and I have a couple of related questions about
> dependencies.
> 
> 1.  What is a recommended practice for setting IDE's with dependent
> libraries?  In other words, Maven automatically downloads dependencies
> and copies them to the build directory.  However, I don't think it's a

Maven places dependencies in the local repository by default, not the
build directory.

> good practice to load libraries into the IDE from the target directory.
> However, I'd like to configure my IDE to load the libraries for the
> purpose of code completion.  How have others handled this?

We reference the local repo from the IDE.

> 2.  One thing that I'm slightly uncomfortable about concerning the
> dependency system, is that the Maven remote repository acts as a middle
> man, downloading jars from the original site and storing it for maven
> use.  Some of the jars have been renamed.  I'm assuming that no other
> changes have been made, but that requires a little bit of a trust
> factor.  I know Maven has a way to configure a dependency to download
> from the original site, but it doesn't always work because the
> originators of the site don't always make the jar downloadable by
> itself.  How do others feel about this?  Is there a convenient way
> around it?

Set up your own repository and control the content.

In general, at my office, we trust what comes from ibiblio.
-- 
http://www.multitask.com.au/people/dion/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]