You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thunder Farmer <th...@gmail.com> on 2010/03/04 03:44:40 UTC

Always download dependencies with classifier

Hello All,

My problems is that seems Maven always download dependencies with classifier
even I specify the version.
Is it the expected behavior or some thing goes wrong?

Maven version: 2.1.0-M1
Java version: 1.5.0_06

This is first time I ask question on Maven user list.
If this is NOT the right way, pls help correct me.


Thanks,
Thunder

Re: Always download dependencies with classifier

Posted by Thunder Farmer <th...@gmail.com>.
No. That's not it.
I think you didn't get me clearly.
I do have pom file for that jar file in my local repo.
Maven should NOT connect to remote repo because everything is there in local
repo.
And I have specified the version and classifier.

Can anyone help me on this?

Thanks,
Thunder.

On Thu, Mar 4, 2010 at 10:10 PM, Brendan Sibre <bt...@gmail.com> wrote:

> We see that message when we have a jar in the repository that doesn't
> actually have a POM file.
> It realizes the JAR is in your local repository, so it doesn't try to
> download that.
>
> But it always tries to download the POM to find out if the artifact has any
> dependencies (and POMs don't
> have classifiers) but it's trying to find out if it has any dependencies.
> It does that on every build.
> However, my output always shows an INFO message "Unable to find resource
> 'groupX:artifactY:pom:versionZ'"
> for each one as well.
>
> Might be interesting if Maven provided a way to indicate in your dependency
> declaration that you just
> want the JAR w/o looking at the POM.
>
> On Thu, Mar 4, 2010 at 4:52 AM, Thunder Farmer <thunder.farmer@gmail.com
> >wrote:
>
> > Thanks for all of your responses.
> >
> > I tried with version 2.2.1.
> > Still the same issue.
> > Is it my luck?  find a bug for Maven,:)~
> >
> > D:\temp\my-app>mvn -version
> > Apache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)
> > Java version: 1.6.0_10-rc
> >
> > Thanks,
> > Thunder
> >
> > On Thu, Mar 4, 2010 at 3:22 PM, Anders Hammar <an...@hammar.net> wrote:
> >
> > > Did you try any of the latest recommended versions of Maven, like
> 2.2.1?
> > > Maven 2.1.0 is generally a version to stay away from as it has
> issues...
> > >
> > > /Anders
> > >
> > > On Thu, Mar 4, 2010 at 07:03, Thunder Farmer <thunder.farmer@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > Thanks for your quick response.
> > > > Here I provide more information.
> > > > I can reproduce the issue by creating a simple project and adding a
> > > > dependency with classifier to it.
> > > > I create the project by "mvn archetype:create" command.
> > > > In the pom, I add a dependency:
> > > >
> > > >  <dependency>
> > > >  <groupId>com.informix</groupId>
> > > >  <artifactId>ifxjdbc</artifactId> <version>3.50</version>
> > > >  <classifier>JC3</classifier>
> > > >  <scope>compile</scope>
> > > >  </dependency>
> > > > The informix JDBC jar and it's pom file are already in our local
> repo,
> > > and
> > > > I have local repo in my setting.xml
> > > >
> > > > Every time when I run "mvn compile", I get below output in the
> console
> > > > [INFO] [resources:resources]
> > > > [INFO] Using default encoding to copy filtered resources.
> > > > Downloading:
> > > >
> > http://repo1.maven.org/maven2/com/informix/ifxjdbc/3.50/ifxjdbc-3.50.pom
> > > > [INFO] [compiler:compile]
> > > >
> > > > Seems it always tries to download the artifact.
> > > > Though it doesn't really download the jar file, it consume
> significant
> > > time
> > > > to connect remote repo for a large project.
> > > >
> > > > Is it expected behavior of Maven?
> > > >
> > > > The project is attached.
> > > >
> > > > Thanks,
> > > > Thunder
> > > >
> > > >
> > > >
> > > > On Thu, Mar 4, 2010 at 10:51 AM, Wendy Smoak <ws...@gmail.com>
> wrote:
> > > >
> > > >> On Wed, Mar 3, 2010 at 9:44 PM, Thunder Farmer <
> > > thunder.farmer@gmail.com>
> > > >> wrote:
> > > >> > My problems is that seems Maven always download dependencies with
> > > >> classifier
> > > >> > even I specify the version.
> > > >> > Is it the expected behavior or some thing goes wrong?
> > > >> >
> > > >> > Maven version: 2.1.0-M1
> > > >> > Java version: 1.5.0_06
> > > >>
> > > >> This is the right place, but we need more information.  Can you post
> a
> > > >> snippet of the build output or error message that you're seeing, and
> > > >> maybe the relevant portion of your pom.xml file (the problematic
> > > >> <dependency>)?
> > > >>
> > > >> You might also try the build with the latest recommended stable
> Maven
> > > >> version from http://maven.apache.org/download.html and see if it's
> > > >> still a problem.
> > > >>
> > > >> --
> > > >> Wendy
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > Listen to Your Heart
> > > > Follow Your Heart
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > >
> >
> >
> >
> > --
> > Listen to Your Heart
> > Follow Your Heart
> >
>



-- 
Listen to Your Heart
Follow Your Heart

Re: Always download dependencies with classifier

Posted by Wayne Fay <wa...@gmail.com>.
> Might be interesting if Maven provided a way to indicate in your dependency
> declaration that you just
> want the JAR w/o looking at the POM.

No, that wouldn't be interesting, and it would be a really bad idea
long-term since it would encourage people to NOT create pom files for
artifacts thus greatly reducing the effectiveness of transitive
dependencies etc.

You should simply provide the pom file as required, its not hard.

Wayne

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


Re: Always download dependencies with classifier

Posted by Brendan Sibre <bt...@gmail.com>.
We see that message when we have a jar in the repository that doesn't
actually have a POM file.
It realizes the JAR is in your local repository, so it doesn't try to
download that.

But it always tries to download the POM to find out if the artifact has any
dependencies (and POMs don't
have classifiers) but it's trying to find out if it has any dependencies.
It does that on every build.
However, my output always shows an INFO message "Unable to find resource
'groupX:artifactY:pom:versionZ'"
for each one as well.

Might be interesting if Maven provided a way to indicate in your dependency
declaration that you just
want the JAR w/o looking at the POM.

On Thu, Mar 4, 2010 at 4:52 AM, Thunder Farmer <th...@gmail.com>wrote:

> Thanks for all of your responses.
>
> I tried with version 2.2.1.
> Still the same issue.
> Is it my luck?  find a bug for Maven,:)~
>
> D:\temp\my-app>mvn -version
> Apache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)
> Java version: 1.6.0_10-rc
>
> Thanks,
> Thunder
>
> On Thu, Mar 4, 2010 at 3:22 PM, Anders Hammar <an...@hammar.net> wrote:
>
> > Did you try any of the latest recommended versions of Maven, like 2.2.1?
> > Maven 2.1.0 is generally a version to stay away from as it has issues...
> >
> > /Anders
> >
> > On Thu, Mar 4, 2010 at 07:03, Thunder Farmer <thunder.farmer@gmail.com
> > >wrote:
> >
> > > Hi,
> > >
> > > Thanks for your quick response.
> > > Here I provide more information.
> > > I can reproduce the issue by creating a simple project and adding a
> > > dependency with classifier to it.
> > > I create the project by "mvn archetype:create" command.
> > > In the pom, I add a dependency:
> > >
> > >  <dependency>
> > >  <groupId>com.informix</groupId>
> > >  <artifactId>ifxjdbc</artifactId> <version>3.50</version>
> > >  <classifier>JC3</classifier>
> > >  <scope>compile</scope>
> > >  </dependency>
> > > The informix JDBC jar and it's pom file are already in our local repo,
> > and
> > > I have local repo in my setting.xml
> > >
> > > Every time when I run "mvn compile", I get below output in the console
> > > [INFO] [resources:resources]
> > > [INFO] Using default encoding to copy filtered resources.
> > > Downloading:
> > >
> http://repo1.maven.org/maven2/com/informix/ifxjdbc/3.50/ifxjdbc-3.50.pom
> > > [INFO] [compiler:compile]
> > >
> > > Seems it always tries to download the artifact.
> > > Though it doesn't really download the jar file, it consume significant
> > time
> > > to connect remote repo for a large project.
> > >
> > > Is it expected behavior of Maven?
> > >
> > > The project is attached.
> > >
> > > Thanks,
> > > Thunder
> > >
> > >
> > >
> > > On Thu, Mar 4, 2010 at 10:51 AM, Wendy Smoak <ws...@gmail.com> wrote:
> > >
> > >> On Wed, Mar 3, 2010 at 9:44 PM, Thunder Farmer <
> > thunder.farmer@gmail.com>
> > >> wrote:
> > >> > My problems is that seems Maven always download dependencies with
> > >> classifier
> > >> > even I specify the version.
> > >> > Is it the expected behavior or some thing goes wrong?
> > >> >
> > >> > Maven version: 2.1.0-M1
> > >> > Java version: 1.5.0_06
> > >>
> > >> This is the right place, but we need more information.  Can you post a
> > >> snippet of the build output or error message that you're seeing, and
> > >> maybe the relevant portion of your pom.xml file (the problematic
> > >> <dependency>)?
> > >>
> > >> You might also try the build with the latest recommended stable Maven
> > >> version from http://maven.apache.org/download.html and see if it's
> > >> still a problem.
> > >>
> > >> --
> > >> Wendy
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > Listen to Your Heart
> > > Follow Your Heart
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
>
>
>
> --
> Listen to Your Heart
> Follow Your Heart
>

Re: Always download dependencies with classifier

Posted by Thunder Farmer <th...@gmail.com>.
Thanks for all of your responses.

I tried with version 2.2.1.
Still the same issue.
Is it my luck?  find a bug for Maven,:)~

D:\temp\my-app>mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)
Java version: 1.6.0_10-rc

Thanks,
Thunder

On Thu, Mar 4, 2010 at 3:22 PM, Anders Hammar <an...@hammar.net> wrote:

> Did you try any of the latest recommended versions of Maven, like 2.2.1?
> Maven 2.1.0 is generally a version to stay away from as it has issues...
>
> /Anders
>
> On Thu, Mar 4, 2010 at 07:03, Thunder Farmer <thunder.farmer@gmail.com
> >wrote:
>
> > Hi,
> >
> > Thanks for your quick response.
> > Here I provide more information.
> > I can reproduce the issue by creating a simple project and adding a
> > dependency with classifier to it.
> > I create the project by "mvn archetype:create" command.
> > In the pom, I add a dependency:
> >
> >  <dependency>
> >  <groupId>com.informix</groupId>
> >  <artifactId>ifxjdbc</artifactId> <version>3.50</version>
> >  <classifier>JC3</classifier>
> >  <scope>compile</scope>
> >  </dependency>
> > The informix JDBC jar and it's pom file are already in our local repo,
> and
> > I have local repo in my setting.xml
> >
> > Every time when I run "mvn compile", I get below output in the console
> > [INFO] [resources:resources]
> > [INFO] Using default encoding to copy filtered resources.
> > Downloading:
> > http://repo1.maven.org/maven2/com/informix/ifxjdbc/3.50/ifxjdbc-3.50.pom
> > [INFO] [compiler:compile]
> >
> > Seems it always tries to download the artifact.
> > Though it doesn't really download the jar file, it consume significant
> time
> > to connect remote repo for a large project.
> >
> > Is it expected behavior of Maven?
> >
> > The project is attached.
> >
> > Thanks,
> > Thunder
> >
> >
> >
> > On Thu, Mar 4, 2010 at 10:51 AM, Wendy Smoak <ws...@gmail.com> wrote:
> >
> >> On Wed, Mar 3, 2010 at 9:44 PM, Thunder Farmer <
> thunder.farmer@gmail.com>
> >> wrote:
> >> > My problems is that seems Maven always download dependencies with
> >> classifier
> >> > even I specify the version.
> >> > Is it the expected behavior or some thing goes wrong?
> >> >
> >> > Maven version: 2.1.0-M1
> >> > Java version: 1.5.0_06
> >>
> >> This is the right place, but we need more information.  Can you post a
> >> snippet of the build output or error message that you're seeing, and
> >> maybe the relevant portion of your pom.xml file (the problematic
> >> <dependency>)?
> >>
> >> You might also try the build with the latest recommended stable Maven
> >> version from http://maven.apache.org/download.html and see if it's
> >> still a problem.
> >>
> >> --
> >> Wendy
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
> > --
> > Listen to Your Heart
> > Follow Your Heart
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>



-- 
Listen to Your Heart
Follow Your Heart

Re: Always download dependencies with classifier

Posted by Anders Hammar <an...@hammar.net>.
Did you try any of the latest recommended versions of Maven, like 2.2.1?
Maven 2.1.0 is generally a version to stay away from as it has issues...

/Anders

On Thu, Mar 4, 2010 at 07:03, Thunder Farmer <th...@gmail.com>wrote:

> Hi,
>
> Thanks for your quick response.
> Here I provide more information.
> I can reproduce the issue by creating a simple project and adding a
> dependency with classifier to it.
> I create the project by "mvn archetype:create" command.
> In the pom, I add a dependency:
>
>  <dependency>
>  <groupId>com.informix</groupId>
>  <artifactId>ifxjdbc</artifactId> <version>3.50</version>
>  <classifier>JC3</classifier>
>  <scope>compile</scope>
>  </dependency>
> The informix JDBC jar and it's pom file are already in our local repo, and
> I have local repo in my setting.xml
>
> Every time when I run "mvn compile", I get below output in the console
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> Downloading:
> http://repo1.maven.org/maven2/com/informix/ifxjdbc/3.50/ifxjdbc-3.50.pom
> [INFO] [compiler:compile]
>
> Seems it always tries to download the artifact.
> Though it doesn't really download the jar file, it consume significant time
> to connect remote repo for a large project.
>
> Is it expected behavior of Maven?
>
> The project is attached.
>
> Thanks,
> Thunder
>
>
>
> On Thu, Mar 4, 2010 at 10:51 AM, Wendy Smoak <ws...@gmail.com> wrote:
>
>> On Wed, Mar 3, 2010 at 9:44 PM, Thunder Farmer <th...@gmail.com>
>> wrote:
>> > My problems is that seems Maven always download dependencies with
>> classifier
>> > even I specify the version.
>> > Is it the expected behavior or some thing goes wrong?
>> >
>> > Maven version: 2.1.0-M1
>> > Java version: 1.5.0_06
>>
>> This is the right place, but we need more information.  Can you post a
>> snippet of the build output or error message that you're seeing, and
>> maybe the relevant portion of your pom.xml file (the problematic
>> <dependency>)?
>>
>> You might also try the build with the latest recommended stable Maven
>> version from http://maven.apache.org/download.html and see if it's
>> still a problem.
>>
>> --
>> Wendy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> --
> Listen to Your Heart
> Follow Your Heart
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Re: Always download dependencies with classifier

Posted by Wendy Smoak <ws...@gmail.com>.
On Thu, Mar 4, 2010 at 1:03 AM, Thunder Farmer <th...@gmail.com> wrote:
> The informix JDBC jar and it's pom file are already in our local repo, and I
> have local repo in my setting.xml

What is "our" local repo?  (Local repos are not meant to be shared.
Are you running a repository manager?)

How did the jar and pom get there?  (What command did you execute?)

If I'm reading this right, you have a jar with a classifier, but no
"regular" jar (without a classifier).  Correct?

-- 
Wendy

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


Re: Always download dependencies with classifier

Posted by Thunder Farmer <th...@gmail.com>.
Hi,

Thanks for your quick response.
Here I provide more information.
I can reproduce the issue by creating a simple project and adding a
dependency with classifier to it.
I create the project by "mvn archetype:create" command.
In the pom, I add a dependency:

 <dependency>
 <groupId>com.informix</groupId>
 <artifactId>ifxjdbc</artifactId> <version>3.50</version>
 <classifier>JC3</classifier>
 <scope>compile</scope>
 </dependency>
The informix JDBC jar and it's pom file are already in our local repo, and I
have local repo in my setting.xml

Every time when I run "mvn compile", I get below output in the console
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading:
http://repo1.maven.org/maven2/com/informix/ifxjdbc/3.50/ifxjdbc-3.50.pom
[INFO] [compiler:compile]

Seems it always tries to download the artifact.
Though it doesn't really download the jar file, it consume significant time
to connect remote repo for a large project.

Is it expected behavior of Maven?

The project is attached.

Thanks,
Thunder



On Thu, Mar 4, 2010 at 10:51 AM, Wendy Smoak <ws...@gmail.com> wrote:

> On Wed, Mar 3, 2010 at 9:44 PM, Thunder Farmer <th...@gmail.com>
> wrote:
> > My problems is that seems Maven always download dependencies with
> classifier
> > even I specify the version.
> > Is it the expected behavior or some thing goes wrong?
> >
> > Maven version: 2.1.0-M1
> > Java version: 1.5.0_06
>
> This is the right place, but we need more information.  Can you post a
> snippet of the build output or error message that you're seeing, and
> maybe the relevant portion of your pom.xml file (the problematic
> <dependency>)?
>
> You might also try the build with the latest recommended stable Maven
> version from http://maven.apache.org/download.html and see if it's
> still a problem.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Listen to Your Heart
Follow Your Heart

Re: Always download dependencies with classifier

Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, Mar 3, 2010 at 9:44 PM, Thunder Farmer <th...@gmail.com> wrote:
> My problems is that seems Maven always download dependencies with classifier
> even I specify the version.
> Is it the expected behavior or some thing goes wrong?
>
> Maven version: 2.1.0-M1
> Java version: 1.5.0_06

This is the right place, but we need more information.  Can you post a
snippet of the build output or error message that you're seeing, and
maybe the relevant portion of your pom.xml file (the problematic
<dependency>)?

You might also try the build with the latest recommended stable Maven
version from http://maven.apache.org/download.html and see if it's
still a problem.

-- 
Wendy

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