You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by so...@apache.org on 2005/12/04 11:30:08 UTC
Maven downloads wrong version of commons-collections
Maven downloaded commons-collections-2.1.jar when it needs
commons-collections-3.1.jar.
Jackrabbit imports classes from:
org.apache.commons.collections.map.*
commons-collections-2.1.jar has those classes in:
org.apache.commons.collections.*
The classes were moved to the "map" subpackage for commons-collections-3.1.
solprovider
Re: Maven downloads wrong version of commons-collections
Posted by so...@apache.org.
On 12/5/05, Tobias Bocanegra <to...@day.com> wrote:
> > > you will find all dependencies in your local maven repository directory.
> > > that's usually <your home directory>/.maven/repository
> > I could not find a "repository" directory under Maven or Jackrabbit
> > (other than jackrabbit\applications\test\repository, which does not
> > contain JARs.)
> it's a directory named '.maven' in your home directory.
>
> ls -al ~/.maven
> should disclose it
Thank you. I found it. The directory is:
C:\Windows\.maven\repository.
I am developing on a MSWindows PC. Our programs are typically hosted
on Linux, but everything must run on Windows for this client.
> > I still do not know of a method to add a directory of JARs to the
> > CLASSPATH without naming each individually. (I have been searching
> > for years. I think Sun just likes long CLASSPATHs.)
>
> for a in lib/*.jar; do
> CLASSPATH="$CLASSPATH:$a"
> done
I knew that method, but it still creates a very long CLASSPATH, which
can cause problems because the MSDOS prompt has a short command length
limit. Testing shows the maximum CLASSPATH variable is just over 788
characters.
solprovider
Re: Maven downloads wrong version of commons-collections
Posted by Tobias Bocanegra <to...@day.com>.
> > you will find all dependencies in your local maven repository directory.
> > that's usually <your home directory>/.maven/repository
>
> I could not find a "repository" directory under Maven or Jackrabbit
> (other than jackrabbit\applications\test\repository, which does not
> contain JARs.)
it's a directory named '.maven' in your home directory.
ls -al ~/.maven
should disclose it
> I still do not know of a method to add a directory of JARs to the
> CLASSPATH without naming each individually. (I have been searching
> for years. I think Sun just likes long CLASSPATHs.)
for a in lib/*.jar; do
CLASSPATH="$CLASSPATH:$a"
done
regards, toby
--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---
Re: Maven downloads wrong version of commons-collections
Posted by so...@apache.org.
On 12/5/05, Marcel Reutegger <ma...@gmx.net> wrote:
> solprovider@apache.org wrote:
> > Is there a JAR containing
> > everything Jackrabbit needs? Are these files downloaded somewhere for
> > Jackrabbit's use?
> you will find all dependencies in your local maven repository directory.
> that's usually <your home directory>/.maven/repository
I could not find a "repository" directory under Maven or Jackrabbit
(other than jackrabbit\applications\test\repository, which does not
contain JARs.)
> There is a maven goal that copies all required dependencies into your
> jackrabbit checkout:
> maven copy-deps
> This is also described in:
> http://incubator.apache.org/jackrabbit/doc/firststeps.html
Would someone rearrange that paragraph? (I missed the important
command buried in the middle of the paragraph.)
===
"maven copy-deps" will copy all dependencies to the
"jackrabbit/target/lib" directory. Add all of the dependencies to
your CLASSPATH, as well as the Jackrabbit repository implementation
(jackrabbit-1.0-SNAPSHOT.jar) that Maven built in the
"jackrabbit/target" directory.
The "java" command to run the example code must include the JAAS
configuration option (note the double equal sign ==):
java -Djava.security.auth.login.config==jaas.config JCRTest
===
- maven copy-deps gives these files:
commons-collections-3.1.jar
concurrent-1.3.4.jar
derby-10.1.1.0.jar
geronimo-spec-jta-1.0-M1.jar
jcr-1.0.jar
junit-3.8.1.jar
log4j-1.2.8.jar
lucene-1.4.3.jar
xercesImpl-2.6.2.jar
xmlParserAPIs-2.0.2.jar
- What I used:
commons-collections-3.1.jar
concurrent
jcr-1.0.jar
lucene-1.4.1.jar
log4j-1.2.8.jar
xerces-2.4.0.jar
xml-apis-1.0.b2.jar
"junit" was used by the tests, but does not affect the example.
Why didn't java complain about missing "derby" and "geronimo"? (I am
being lazy, and will research what they do if nobody answers.)
I still do not know of a method to add a directory of JARs to the
CLASSPATH without naming each individually. (I have been searching
for years. I think Sun just likes long CLASSPATHs.)
solprovider
Re: Maven downloads wrong version of commons-collections
Posted by Marcel Reutegger <ma...@gmx.net>.
solprovider@apache.org wrote:
> Most of them were in Maven's lib directory. Is there a JAR containing
> everything Jackrabbit needs? Are these files downloaded somewhere for
> Jackrabbit's use?
you will find all dependencies in your local maven repository directory.
that's usually <your home directory>/.maven/repository
There is a maven goal that copies all required dependencies into your
jackrabbit checkout:
maven copy-deps
This is also described in:
http://incubator.apache.org/jackrabbit/doc/firststeps.html
regards
marcel
Re: Maven downloads wrong version of commons-collections
Posted by Marcel Reutegger <ma...@gmx.net>.
solprovider@apache.org wrote:
> Also EDU.oswego.cs.dl.util.concurrent
> (I did not jar it. Just compiled the classes.)
the concurrent library is a regular maven dependency that is
automatically downloaded from ibiblio.org when you build jackrabbit.
I'm not sure what you are exactly doing. Are you using a different build
tool than maven?
There is no need to compile those classes, they are already provided as
jar file.
regards
marcel
Re: Maven downloads wrong version of commons-collections
Posted by so...@apache.org.
On 12/4/05, solprovider@apache.org <so...@apache.org> wrote:
> Running the First Steps test required CLASSPATH =
> jackrabbit-1.0-SNAPSHOT.jar
> jcr-1.0.jar
> commons-collections-3.1.jar
> log4j-1.2.8.jar
> xerces-2.4.0.jar
> xml-apis-1.0.b2.jar
> lucene-1.4.1.jar
Also EDU.oswego.cs.dl.util.concurrent
(I did not jar it. Just compiled the classes.)
solprovider
Re: Maven downloads wrong version of commons-collections
Posted by so...@apache.org.
On 12/4/05, Stefan Guggisberg <st...@gmail.com> wrote:
> On 12/4/05, solprovider@apache.org <so...@apache.org> wrote:
> > Maven downloaded commons-collections-2.1.jar when it needs
> > commons-collections-3.1.jar.
>
> ??? i seriously doubt that! have a look at jackrabbit/project.xml:
> <dependency>
> <groupId>commons-collections</groupId>
> <artifactId>commons-collections</artifactId>
> <version>3.1</version>
> </dependency>
I looked. You are correct.
svn jackrabbit
installed Maven1.0.2
maven clean
maven
tested example
compile required CLASSPATH =
jackrabbit-1.0-SNAPSHOT.jar
jcr-1.0.jar
running required CLASSPATH = (Source of file)
jackrabbit-1.0-SNAPSHOT.jar (Jackrabbit)
jcr-1.0.jar (Maven)
commons-collections-3.1.jar (Downloaded because Maven had wrong version)
log4j-1.2.8.jar (Maven)
xerces-2.4.0.jar (Maven)
xml-apis-1.0.b2.jar (Maven)
lucene-1.4.1.jar (Lenya)
Most of them were in Maven's lib directory. Is there a JAR containing
everything Jackrabbit needs? Are these files downloaded somewhere for
Jackrabbit's use? It feels like I did too much work, but Jackrabbit
runs.
solprovider
Re: Maven downloads wrong version of commons-collections
Posted by Stefan Guggisberg <st...@gmail.com>.
On 12/4/05, solprovider@apache.org <so...@apache.org> wrote:
> Maven downloaded commons-collections-2.1.jar when it needs
> commons-collections-3.1.jar.
??? i seriously doubt that! have a look at jackrabbit/project.xml:
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
</dependency>
cheers
stefan
>
> Jackrabbit imports classes from:
> org.apache.commons.collections.map.*
>
> commons-collections-2.1.jar has those classes in:
> org.apache.commons.collections.*
>
> The classes were moved to the "map" subpackage for commons-collections-3.1.
>
> solprovider
>