I presumed it was not working 'cos my local jar was not copied
into the local repo of maven (~/.maven/repo) ... which it might not
do at all since it is accessible locally. I'll find out when I'm ready to compile the
project then ;-)
Thanx again,
--mike
Bulent Erdemir wrote:
It is possible. I work exactly as you define for some jars. Read the docos.
Here is my project.xml and project.properties files. Check the <jar> tags.
Project.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<pomVersion>3</pomVersion>
<artifactId>falezonlineserverscore</artifactId>
<name>falez-onlineservers-core</name>
<groupId>core</groupId>
<currentVersion>0.1</currentVersion>
<organization>
<name>MyBank</name>
<url>www.mybank.com.tr</url>
<logo>C:/dev/projects/falezlogo_v1.bmp</logo>
</organization>
<inceptionYear>2004</inceptionYear>
<package>falezonlineserverscore</package>
<description>fetches dependencies, builts nothing, acts as a master
for other projects, including project.properties
entries.</description>
<shortDescription>dependency fetch</shortDescription>
<repository />
<developers>
<developer>
<name>Bulent Erdemir</name>
<id>0</id>
<email>[EMAIL PROTECTED]</email>
</developer>
</developers>
<build>
<sourceDirectory>main/src/java</sourceDirectory>
<unitTestSourceDirectory>main/src/test</unitTestSourceDirectory>
<resources>
<resource>
<directory>main/src/resources</directory>
<targetPath>${pom.groupId}</targetPath>
<filtering>false</filtering>
</resource>
</resources>
</build>
<dependencies>
<dependency>
<groupId>concurrent</groupId>
<artifactId>concurrent</artifactId>
<version>1.3.4</version>
<type>jar</type>
<url>http://g.oswego.edu</url>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.1</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/pool/index.html</url>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<type>jar</type>
<url>http://junit.sourceforge.net/index.html</url>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
<type>jar</type>
<url>http://jakarta.apache.org/log4j/docs/index.html</url>
</dependency>
<dependency>
<groupId>servletapi</groupId>
<artifactId>servletapi</artifactId>
<version>2.3</version>
<type>jar</type>
<url>http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/index.html</url>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.6.1</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/beanutils/index.html</url>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.0</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/</url>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2-dev</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/discovery/index.html</url>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.0</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/lang.html</url>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.5</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/digester/index.html</url>
</dependency>
<dependency>
<groupId>commons-jxpath</groupId>
<artifactId>commons-jxpath</artifactId>
<version>1.1</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/jxpath/index.html</url>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.4</version>
<type>jar</type>
<url>http://www.dom4j.org</url>
</dependency>
<dependency>
<groupId>mockobjects</groupId>
<artifactId>mockobjects</artifactId>
<version>core-0.09</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>jug</groupId>
<artifactId>jug</artifactId>
<version>1.0.3</version>
<type>jar</type>
<url>http://www.doomdark.org/doomdark/proj/jug/index.html</url>
</dependency>
<dependency>
<!-- This entry is downloaded from java.sun.com/jndi site. Follow
"Download JNDI 1.2.1 & More" link and you'll find more than
one files available. Download "File System Service Provider, 1.2 Beta 3 (fscontext-1_2-beta3.zip, 97.58 KB)" file. In this file,
there are two jars: fscontext and providerutil. In order to meet Maven's requirement, I extracted these two jar's and
added to the repository as appropriate. BE.
-->
<groupId>fscontext</groupId>
<artifactId>fscontext</artifactId>
<jar>fscontext.jar</jar>
<type>jar</type>
<url>http://java.sun.com/products/jndi/downloads/index.html</url>
</dependency>
<dependency>
<!-- This entry is downloaded from java.sun.com/jndi site. Follow
"Download JNDI 1.2.1 & More" link and you'll find more than
one files available. Download "File System Service Provider, 1.2 Beta 3 (fscontext-1_2-beta3.zip, 97.58 KB)" file. In this file,
there are two jars: fscontext and providerutil. In order to meet Maven's requirement, I extracted these two jar's and
added to the repository as appropriate. BE.
-->
<groupId>providerutil</groupId>
<artifactId>providerutil</artifactId>
<jar>providerutil.jar</jar>
<type>jar</type>
<url>http://java.sun.com/products/jndi/downloads/index.html</url>
</dependency>
<dependency>
<groupId>xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.0.2</version>
<type>jar</type>
<url>http://xstream.codehaus.org</url>
</dependency>
<dependency>
<groupId>xmlpull</groupId>
<artifactId>xmlpull</artifactId>
<version>1.1.3.4d_b4_min</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>openjms</groupId>
<artifactId>openjms</artifactId>
<version>0.7.6.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.5.3-1</version>
<type>jar</type>
<url>http://ant.apache.org/</url>
</dependency>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.2</version>
<type>jar</type>
<url>http://www.antlr.org/</url>
</dependency>
<dependency>
<groupId>castor</groupId>
<artifactId>castor</artifactId>
<version>0.9.5</version>
<type>jar</type>
<url>http://castor.exolab.org/</url>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.3</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/logging</url>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.1</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/dbcp</url>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/collections</url>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.0</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/io</url>
</dependency> <dependency>
<groupId>exolabcore</groupId>
<artifactId>exolabcore</artifactId>
<version>0.3.7</version>
<type>jar</type>
<url>http://openjms.sourceforge.net/</url>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.6.1</version>
<type>jar</type>
<url>http://hsqldb.sourceforge.net/</url>
</dependency>
<dependency>
<groupId>jdbc</groupId>
<artifactId>jdbc</artifactId>
<version>2.0</version>
<jar>jdbc2_0-stdext.jar</jar>
<type>jar</type>
<url>http://java.sun.com/products/jdbc/</url>
</dependency>
<dependency>
<groupId>jdbm</groupId>
<artifactId>jdbm</artifactId>
<version>0.12</version>
<type>jar</type>
<url>http://openjms.sourceforge.net/</url>
</dependency>
<dependency>
<groupId>jms</groupId>
<artifactId>jms</artifactId>
<version>1.0.2b</version>
<jar>jms.jar</jar>
<type>jar</type>
<url>http://java.sun.com/products/jms/</url>
</dependency>
<dependency>
<groupId>jndi</groupId>
<artifactId>jndi</artifactId>
<version>1.2.1</version>
<type>jar</type>
<url>http://java.sun.com/products/jndi/</url>
</dependency>
<dependency>
<groupId>jta</groupId>
<artifactId>jta</artifactId>
<version>1.0.1</version>
<jar>jta-1_0_1b.jar</jar>
<type>jar</type>
<url>http://java.sun.com/products/jta/</url>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.7</version>
<type>jar</type>
<url>http://jakarta.apache.org/oro/</url>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.0.b2</version>
<type>jar</type>
<url>http://xml.apache.org/xerces2-j/</url>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
<version>2.3.0</version>
<type>jar</type>
<url>http://xml.apache.org/xerces2-j/</url>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-optional</artifactId>
<version>1.5.3-1</version>
<type>jar</type>
<url>http://ant.apache.org/</url>
</dependency>
</dependencies>
</project>
project.properties: # Project property file for falez-onlineservers # I'm behind a proxy. BE. maven.proxy.host=172.16.1.1 maven.proxy.port=80
maven.compile.source=1.4 maven.compile.target=1.4
#maven.mode.online=false maven.repo.remote.enabled=true maven.repo.remote=file:../falezrepo, http://www.ibiblio.org/maven
maven.repo.local=c:/dev/projects/falezrepo
compile.debug = on compile.optimize = off compile.deprecation = off
On Tue, 09 Nov 2004 16:19:02 +0100, Michael Niemaz
<[EMAIL PROTECTED]> wrote:
Tried it but it does not work either ;-( Seems that it is not possible then ...
--mike
Bulent Erdemir wrote:
You also might try working with a hybrid repository setting. Try something like:
maven.repo.remote=file:path_to_local_repo, http://www.ibiblio.org/maven
in your properties file. This way, maven will first look to your local disk, use the jar if found, and download from ibiblio (maven's default) if not found. And if you put your jar in this local directory like path_to_local_repo/your_artifact_id/jars/your_jar , maven will pick it up.
This way you'll be populating a local repository which you may well use in the future for other purposes.
I'm not quite sure but you might need to set maven.repo.local=path_to_local_repo also.
Bulent Erdemir
On Tue, 09 Nov 2004 15:33:40 +0100, Milos Kleint <[EMAIL PROTECTED]> wrote:
---------------------------------------------------------------------Milos Kleint wrote:
ignore the url tag, it's used just in the printout you just received. specify the path to the artifact in the jar tag.. <dependency> <groupId>jxip</groupId> <artifactId>jxip</artifactId> <version></version> <jar>${basedir}/xip/lib/jxip.jar</jar> </dependency>
if it doens't work (I can't test it right now), put the properties
maven.java.override=true
^^^^^^^^^^^^^^^^^^^^^^^ a typo.. should be maven.jar.override=true
Milos
maven.jar.jxip=${basedir}/xip/lib/jxip.jar
in your project.properties file. It might be that the <jar> tag just lets you specify what jar to look for in the local repository and not at a custom place like you specified. Please check the docs for details I'm almost sure I read it somewhere.
hope that helps..
Milos Kleint
Michael Niemaz wrote:
Recall the local dependency, I tried what you suggested and It did not work:
Attempting to download jxip.jar. WARNING: Failed to download jxip.jar. The build cannot continue because of the following unsatisfied dependency: jxip.jar (try downloading from /home/popol/gkls/xip/lib/) Total time: 1 seconds Finished at: Tue Nov 09 15:11:14 CET 2004
Although the jar file jxip.jar is indeed located under /home/popol/gkls/xip/lib/ ;-( Here's my project's dependencies declaration:
<dependency> <groupId>jxip</groupId> <artifactId>jxip</artifactId> <version></version> <url>${basedir}/xip/lib/</url> <jar>jxip.jar</jar> </dependency>
I even tried to put the jar fullpath in the jar element ...
Any ideas?
thx,
--mike
Brett Porter wrote:
The download report is based on the <versions> element in the project.xml file, I believe.
On Tue, 09 Nov 2004 12:19:19 +0100, Michael Niemaz <[EMAIL PROTECTED]> wrote:
Thanx a lot! Also, I kind of have difficulties to deploy my stuff with the download html link being updated. All it says is that there is nothing to download. Any idea? bug?
--mike
Bulent Erdemir wrote:
check out the <jar> tag in the <dependency> element. There you can specify a jar file name. Also check out the maven.jar.override directive.
On Tue, 09 Nov 2004 11:54:36 +0100, Michael Niemaz <[EMAIL PROTECTED]> wrote:
Hi, Is it possible to specify a local dependency instead of a remote one? The reason is that some resources that my project is using are, for the moment, not to be acceesible by anyone from outside ... but i'd still want to use maven to ease the ditribution process of my project. I looked at the <dependencies> element but couldn't figure out how to specify a local path. Any idea?
Thanx,
--mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
