What I do is install the jars in my local repository (for example, ~/.m2 on 
unix).  I use the following shell script to install the hamcrest jars:

#! /bin/sh

VERSION=1.2
DIR=hamcrest-${VERSION}

for NAME in \
   hamcrest-all \
   hamcrest-core \
   hamcrest-generator \
   hamcrest-integration \
   hamcrest-library
do
   mvn install:install-file \
       -DgroupId=org.hamcrest \
       -DartifactId=${NAME} \
       -Dversion=${VERSION} \
       -Dpackaging=jar \
       -DcreateChecksum=true \
       -DpomFile=${NAME}-${VERSION}.pom \
       -Dfile=${DIR}/${NAME}-${VERSION}.jar
done

You'll also need to create a pom for each jar, but it's quite small and easy to 
make; for example:

<?xml version="1.0" encoding="iso-8859-1"?>

<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>org.hamcrest</groupId>
   <artifactId>hamcrest-all</artifactId>
   <name>hamcrest all</name>
   <version>1.2</version>

   <url>http://code.google.com/p/hamcrest/</url>
</project>


ykyuen wrote:
Hi all,

i am new to maven and i just go thru the examples in the Maven: The
Definitive Guide.

i am going to migrate a project to maven2. but i find that there are some
jars which are not found in the maven repository
http://repo1.maven.org/maven2/.
for example. the java project needs activation-1.1.1.jar,
xmlsec-1.4.2.jar... etc.
so i cannot set them as a dependency in the pom.xml

how can i deal with that?

Thanks for your help =)

Regards,
Kit

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to