You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by plim <pe...@correlationtech.com> on 2003/05/23 03:25:45 UTC

Newbie: How to configure 3rd party and internal dependencies in project.xml

Hi folks,

I'm just about getting started to convert our ant-build-system to use
maven.
I've been reading up on Maven from the online docs but I'm having
trouble getting things to work.

We have a central directory where we put all the libraries needed by our
software.

/java	/jdom
	/xerces
	/xalan
	/axis
	/junit
	/nmr
	/sp
	/common
Where nmr, sp and common are our internal libraries. The rest are 3rd
party libraries.
In our build environment, we manually download release zips and tars of
the 3rd party libraries from their websites and install/explode them
into the central directory.

Our software build.xml references the jars under those directories to
build the <classpath> tag.

As far as I understand, our central directory is what you call the
"repository".
So how do I configure my project.xml to use the 3rd party libraries
within Maven's repository?   and,.. 
How do I get my own libraries into the repository so that the Maven
build can reference them?

My apologise if this too trivial.
Many thanks in advance.

pengster





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


Re: Newbie: How to configure 3rd party and internal dependencies in project.xml

Posted by Brett Porter <bp...@f2network.com.au>.
> As far as I understand, our central directory is what you call the
> "repository".
> So how do I configure my project.xml to use the 3rd party libraries
> within Maven's repository?   and,.. 

eg:
<dependency>
  <groupId>xalan</groupId>
  <artifactId>xalan</artifactId>
  <version>2.4.1</version>
</dependency>

This gets xalan-2.4.1.jar from a repository, specified by
maven.repo.remote, which by default points to http://www.ibiblio.org

> How do I get my own libraries into the repository so that the Maven
> build can reference them?

To put your own JARs in your local repo, just copy them into groupId/jars/artifactId-version.jar

eg
repository/com.mycompany/jars/nmr-1.4.jar

Corresponds to groupId = com.mycompany, artifactID = nmr, version = 1.4

If that project is mavenised, maven jar:install does this.

I like to set up a HTTP server or file location for a local repository
that isn't directly what Maven uses. To do this, setup the URL of it in
maven.repo.remote in ~/build.properties.

If your project is mavenised, you would then use maven jar:deploy to put
your artifacts into that repository.

Cheers.
Brett


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