You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ricky <ri...@gmail.com> on 2008/10/24 14:00:31 UTC

installing third party jars to local repository issue

Hi,

I ran the following command :

mvn install:install-file
-Dfile=c:\project\crystal\cr4e\concurrent\1.0\concurrent-1.0.jar
-DgroupId=com.crystal -Dversion=1.0   -DgeneratePom=true
-DcreateChecksum=true -Dclassifier=sources -DcreateChecksum=true
-Dclassifier=sources  -Dpackaging=jar -DartifactId=cr4e-concurrent

to install concurrent jar file on my local repository;It worked as i noticed
that it generated valid .pom, sha1 files and created folder structure
necessary.

However when i referenced the same jar with group id, artifact id matching
as in :

<dependency>
            <groupId>com.crystal</groupId>
            <artifactId>cr4e-concurrent</artifactId>
            <version>1.0</version>
        </dependency>

It looks for dependency *NOT in local repository but in repo1.maven.org or
Archiva repository of our organization* and then it fails to find it. In my
conf\settings.xml file; i have
<localRepository>/Org_Name_Here/java/maven/repository</localRepository>, but
i have commented out all mirrors that were being used for looking at
repositories outside.

However Still maven is *NOT *looking for jars in local repository and it
fails to find the artifact and tells me to run install:install-file to
install the artifact. Am i missing something?

Any help would be appreciable ...

Regards
Vyas, Anirudh
||  ॐ  ||

Re: installing third party jars to local repository issue

Posted by Ricky <ri...@gmail.com>.
Stevo,

Your the man! :-) ... removing -Dclassifier=sources works and your
explanation makes sense too.

Thanks a Lot, appreciate it.
Rick

On Fri, Oct 24, 2008 at 8:08 AM, Stevo Slavić <ss...@gmail.com> wrote:

> Hello RIcky,
>
> Remove "-Dclassifier=sources", both of them, as you are not installing
> sources but binaries.
>
> Regards,
> Stevo.
>
> On Fri, Oct 24, 2008 at 2:00 PM, Ricky <ri...@gmail.com> wrote:
>
> > Hi,
> >
> > I ran the following command :
> >
> > mvn install:install-file
> > -Dfile=c:\project\crystal\cr4e\concurrent\1.0\concurrent-1.0.jar
> > -DgroupId=com.crystal -Dversion=1.0   -DgeneratePom=true
> > -DcreateChecksum=true -Dclassifier=sources -DcreateChecksum=true
> > -Dclassifier=sources  -Dpackaging=jar -DartifactId=cr4e-concurrent
> >
> > to install concurrent jar file on my local repository;It worked as i
> > noticed
> > that it generated valid .pom, sha1 files and created folder structure
> > necessary.
> >
> > However when i referenced the same jar with group id, artifact id
> matching
> > as in :
> >
> > <dependency>
> >            <groupId>com.crystal</groupId>
> >            <artifactId>cr4e-concurrent</artifactId>
> >            <version>1.0</version>
> >        </dependency>
> >
> > It looks for dependency *NOT in local repository but in repo1.maven.orgor
> > Archiva repository of our organization* and then it fails to find it. In
> my
> > conf\settings.xml file; i have
> > <localRepository>/Org_Name_Here/java/maven/repository</localRepository>,
> > but
> > i have commented out all mirrors that were being used for looking at
> > repositories outside.
> >
> > However Still maven is *NOT *looking for jars in local repository and it
> > fails to find the artifact and tells me to run install:install-file to
> > install the artifact. Am i missing something?
> >
> > Any help would be appreciable ...
> >
> > Regards
> > Vyas, Anirudh
> > ||  ॐ  ||
>

Re: installing third party jars to local repository issue

Posted by Stevo Slavić <ss...@gmail.com>.
Hello RIcky,

Remove "-Dclassifier=sources", both of them, as you are not installing
sources but binaries.

Regards,
Stevo.

On Fri, Oct 24, 2008 at 2:00 PM, Ricky <ri...@gmail.com> wrote:

> Hi,
>
> I ran the following command :
>
> mvn install:install-file
> -Dfile=c:\project\crystal\cr4e\concurrent\1.0\concurrent-1.0.jar
> -DgroupId=com.crystal -Dversion=1.0   -DgeneratePom=true
> -DcreateChecksum=true -Dclassifier=sources -DcreateChecksum=true
> -Dclassifier=sources  -Dpackaging=jar -DartifactId=cr4e-concurrent
>
> to install concurrent jar file on my local repository;It worked as i
> noticed
> that it generated valid .pom, sha1 files and created folder structure
> necessary.
>
> However when i referenced the same jar with group id, artifact id matching
> as in :
>
> <dependency>
>            <groupId>com.crystal</groupId>
>            <artifactId>cr4e-concurrent</artifactId>
>            <version>1.0</version>
>        </dependency>
>
> It looks for dependency *NOT in local repository but in repo1.maven.org or
> Archiva repository of our organization* and then it fails to find it. In my
> conf\settings.xml file; i have
> <localRepository>/Org_Name_Here/java/maven/repository</localRepository>,
> but
> i have commented out all mirrors that were being used for looking at
> repositories outside.
>
> However Still maven is *NOT *looking for jars in local repository and it
> fails to find the artifact and tells me to run install:install-file to
> install the artifact. Am i missing something?
>
> Any help would be appreciable ...
>
> Regards
> Vyas, Anirudh
> ||  ॐ  ||
>