You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Irfan Sayed <ir...@gmail.com> on 2014/11/04 05:33:43 UTC

explicit dependencies in maven

hello,

is there any good doc/blog which describes the handling of explicit
declaration of dependencies.
when we build the code, we use certain dependencies , how we can make sure
that when we reproduce the same build after the gap of 6 months , same and
exact dependencies will be used. ???
i know we can have artifactory/nexus , but that does not guarantee the
exact version of dependency when developer changes the code and make it
public keeping the version same

please suggest

regards

Re: explicit dependencies in maven

Posted by Paul Benedict <pb...@apache.org>.
Your pom.xml should declare all dependency versions explicitly. And to
prevent any changes, do not use any snapshots. Furthermore, use
dependency:analyze on your project to make sure all libraries in use are
explicitly declared. After you lock them all down, tell your developers not
to update the pom.xml file. That will ensure it.


Cheers,
Paul

On Mon, Nov 3, 2014 at 10:33 PM, Irfan Sayed <ir...@gmail.com> wrote:

> hello,
>
> is there any good doc/blog which describes the handling of explicit
> declaration of dependencies.
> when we build the code, we use certain dependencies , how we can make sure
> that when we reproduce the same build after the gap of 6 months , same and
> exact dependencies will be used. ???
> i know we can have artifactory/nexus , but that does not guarantee the
> exact version of dependency when developer changes the code and make it
> public keeping the version same
>
> please suggest
>
> regards
>

Re: explicit dependencies in maven

Posted by Irfan Sayed <ir...@gmail.com>.
thanks :)

On Tue, Nov 4, 2014 at 10:57 AM, Anders Hammar <an...@hammar.net> wrote:

> Yes, that's how it works.
>
> /Anders (mobile)
> Den 4 nov 2014 06:06 skrev "Irfan Sayed" <ir...@gmail.com>:
>
> > so, lets say if i am using x dependency with version 1.1 and if the
> > developer changes the code of that dependency, keeping the same version
> as
> > 1.1
> > then nexus will not download the latest code changes for that dependency
> > because the version still refers to 1.1 ???
> > if that is the case, this is really nice
> >
> > regards
> >
> >
> > On Tue, Nov 4, 2014 at 10:20 AM, Ron Wheeler <
> > rwheeler@artifact-software.com
> > > wrote:
> >
> > > Have you scanned the Maven books referenced on the Maven web site? Best
> > > starting place.
> > >
> > > With a repository (Nexus), people are prevented from deploying the same
> > > version twice so you are guaranteed that if you build with version
> 2.3.15
> > > of ourNiceUtility, you will always get the same code. The repo will
> > simply
> > > not allow them to overwrite version 2.3.15 once it is deployed into the
> > > wild(public).
> > >
> > > Beats firing developers but stops them from doing silly things.
> > >
> > >
> > >
> > > On 03/11/2014 11:33 PM, Irfan Sayed wrote:
> > >
> > >> hello,
> > >>
> > >> is there any good doc/blog which describes the handling of explicit
> > >> declaration of dependencies.
> > >> when we build the code, we use certain dependencies , how we can make
> > sure
> > >> that when we reproduce the same build after the gap of 6 months , same
> > and
> > >> exact dependencies will be used. ???
> > >> i know we can have artifactory/nexus , but that does not guarantee the
> > >> exact version of dependency when developer changes the code and make
> it
> > >> public keeping the version same
> > >>
> > >> please suggest
> > >>
> > >> regards
> > >>
> > >>
> > >
> > > --
> > > Ron Wheeler
> > > President
> > > Artifact Software Inc
> > > email: rwheeler@artifact-software.com
> > > skype: ronaldmwheeler
> > > phone: 866-970-2435, ext 102
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: explicit dependencies in maven

Posted by Anders Hammar <an...@hammar.net>.
Yes, that's how it works.

/Anders (mobile)
Den 4 nov 2014 06:06 skrev "Irfan Sayed" <ir...@gmail.com>:

> so, lets say if i am using x dependency with version 1.1 and if the
> developer changes the code of that dependency, keeping the same version as
> 1.1
> then nexus will not download the latest code changes for that dependency
> because the version still refers to 1.1 ???
> if that is the case, this is really nice
>
> regards
>
>
> On Tue, Nov 4, 2014 at 10:20 AM, Ron Wheeler <
> rwheeler@artifact-software.com
> > wrote:
>
> > Have you scanned the Maven books referenced on the Maven web site? Best
> > starting place.
> >
> > With a repository (Nexus), people are prevented from deploying the same
> > version twice so you are guaranteed that if you build with version 2.3.15
> > of ourNiceUtility, you will always get the same code. The repo will
> simply
> > not allow them to overwrite version 2.3.15 once it is deployed into the
> > wild(public).
> >
> > Beats firing developers but stops them from doing silly things.
> >
> >
> >
> > On 03/11/2014 11:33 PM, Irfan Sayed wrote:
> >
> >> hello,
> >>
> >> is there any good doc/blog which describes the handling of explicit
> >> declaration of dependencies.
> >> when we build the code, we use certain dependencies , how we can make
> sure
> >> that when we reproduce the same build after the gap of 6 months , same
> and
> >> exact dependencies will be used. ???
> >> i know we can have artifactory/nexus , but that does not guarantee the
> >> exact version of dependency when developer changes the code and make it
> >> public keeping the version same
> >>
> >> please suggest
> >>
> >> regards
> >>
> >>
> >
> > --
> > Ron Wheeler
> > President
> > Artifact Software Inc
> > email: rwheeler@artifact-software.com
> > skype: ronaldmwheeler
> > phone: 866-970-2435, ext 102
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: explicit dependencies in maven

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Barrie,

On 11/6/14 11:01 PM, Barrie Treloar wrote:
>
>
> On 6 November 2014 22:15, Karl Heinz Marbaise <khmarbaise@gmx.de
> <ma...@gmx.de>> wrote:
>
>     Hi,
>     On 11/5/14 11:14 PM, Barrie Treloar wrote:
>
>         On 6 November 2014 05:37, Karl Heinz Marbaise <khmarbaise@gmx.de
>         <ma...@gmx.de>> wrote:
>
>             Hi,
>
>             to be clear on that point you should never change released
>             versions.
>
>             The idea of releases is that they are immutable.
>
>             The scenario you have described should never be done which
>             means:
>
>             If you change code than make simply a new version like 1.2
>             or may be
>             better things like 1.1.1 to show it's a bug fix release of
>             1.1 etc.
>
>             You should prevent of doing developers such a thing...
>
>
>
>         Read http://semver.org/
>
>
>     Should that change something ? Or do i misunderstand something ?
>
>
> No, just more reading for Irfan.

Ok. So a misunderstanding on my site...Sorry..

Kind regards
Karl Heinz Marbaise

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


Re: explicit dependencies in maven

Posted by Barrie Treloar <ba...@gmail.com>.
On 6 November 2014 22:15, Karl Heinz Marbaise <kh...@gmx.de> wrote:

> Hi,
> On 11/5/14 11:14 PM, Barrie Treloar wrote:
>
>> On 6 November 2014 05:37, Karl Heinz Marbaise <kh...@gmx.de> wrote:
>>
>>  Hi,
>>>
>>> to be clear on that point you should never change released versions.
>>>
>>> The idea of releases is that they are immutable.
>>>
>>> The scenario you have described should never be done which means:
>>>
>>> If you change code than make simply a new version like 1.2 or may be
>>> better things like 1.1.1 to show it's a bug fix release of 1.1 etc.
>>>
>>> You should prevent of doing developers such a thing...
>>>
>>
>>
>> Read http://semver.org/
>>
>
> Should that change something ? Or do i misunderstand something ?


No, just more reading for Irfan.

Re: explicit dependencies in maven

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,
On 11/5/14 11:14 PM, Barrie Treloar wrote:
> On 6 November 2014 05:37, Karl Heinz Marbaise <kh...@gmx.de> wrote:
>
>> Hi,
>>
>> to be clear on that point you should never change released versions.
>>
>> The idea of releases is that they are immutable.
>>
>> The scenario you have described should never be done which means:
>>
>> If you change code than make simply a new version like 1.2 or may be
>> better things like 1.1.1 to show it's a bug fix release of 1.1 etc.
>>
>> You should prevent of doing developers such a thing...
>
>
> Read http://semver.org/

Should that change something ? Or do i misunderstand something ?

Kind regards
Karl Heinz Marbaise

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


Re: explicit dependencies in maven

Posted by Barrie Treloar <ba...@gmail.com>.
On 6 November 2014 05:37, Karl Heinz Marbaise <kh...@gmx.de> wrote:

> Hi,
>
> to be clear on that point you should never change released versions.
>
> The idea of releases is that they are immutable.
>
> The scenario you have described should never be done which means:
>
> If you change code than make simply a new version like 1.2 or may be
> better things like 1.1.1 to show it's a bug fix release of 1.1 etc.
>
> You should prevent of doing developers such a thing...


Read http://semver.org/

And the freely available books at http://maven.apache.org/articles.html

Re: explicit dependencies in maven

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,

to be clear on that point you should never change released versions.

The idea of releases is that they are immutable.

The scenario you have described should never be done which means:

If you change code than make simply a new version like 1.2 or may be 
better things like 1.1.1 to show it's a bug fix release of 1.1 etc.

You should prevent of doing developers such a thing...

Apart
Kind regrards
Karl Heinz Marbaise

On 11/4/14 6:06 AM, Irfan Sayed wrote:
> so, lets say if i am using x dependency with version 1.1 and if the
> developer changes the code of that dependency, keeping the same version as
> 1.1
> then nexus will not download the latest code changes for that dependency
> because the version still refers to 1.1 ???
> if that is the case, this is really nice
>
> regards
>
>
> On Tue, Nov 4, 2014 at 10:20 AM, Ron Wheeler <rwheeler@artifact-software.com
>> wrote:
>
>> Have you scanned the Maven books referenced on the Maven web site? Best
>> starting place.
>>
>> With a repository (Nexus), people are prevented from deploying the same
>> version twice so you are guaranteed that if you build with version 2.3.15
>> of ourNiceUtility, you will always get the same code. The repo will simply
>> not allow them to overwrite version 2.3.15 once it is deployed into the
>> wild(public).
>>
>> Beats firing developers but stops them from doing silly things.
>>
>>
>>
>> On 03/11/2014 11:33 PM, Irfan Sayed wrote:
>>
>>> hello,
>>>
>>> is there any good doc/blog which describes the handling of explicit
>>> declaration of dependencies.
>>> when we build the code, we use certain dependencies , how we can make sure
>>> that when we reproduce the same build after the gap of 6 months , same and
>>> exact dependencies will be used. ???
>>> i know we can have artifactory/nexus , but that does not guarantee the
>>> exact version of dependency when developer changes the code and make it
>>> public keeping the version same
>>>
>>> please suggest
>>>
>>> regards

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


Re: explicit dependencies in maven

Posted by Irfan Sayed <ir...@gmail.com>.
so, lets say if i am using x dependency with version 1.1 and if the
developer changes the code of that dependency, keeping the same version as
1.1
then nexus will not download the latest code changes for that dependency
because the version still refers to 1.1 ???
if that is the case, this is really nice

regards


On Tue, Nov 4, 2014 at 10:20 AM, Ron Wheeler <rwheeler@artifact-software.com
> wrote:

> Have you scanned the Maven books referenced on the Maven web site? Best
> starting place.
>
> With a repository (Nexus), people are prevented from deploying the same
> version twice so you are guaranteed that if you build with version 2.3.15
> of ourNiceUtility, you will always get the same code. The repo will simply
> not allow them to overwrite version 2.3.15 once it is deployed into the
> wild(public).
>
> Beats firing developers but stops them from doing silly things.
>
>
>
> On 03/11/2014 11:33 PM, Irfan Sayed wrote:
>
>> hello,
>>
>> is there any good doc/blog which describes the handling of explicit
>> declaration of dependencies.
>> when we build the code, we use certain dependencies , how we can make sure
>> that when we reproduce the same build after the gap of 6 months , same and
>> exact dependencies will be used. ???
>> i know we can have artifactory/nexus , but that does not guarantee the
>> exact version of dependency when developer changes the code and make it
>> public keeping the version same
>>
>> please suggest
>>
>> regards
>>
>>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: explicit dependencies in maven

Posted by Ron Wheeler <rw...@artifact-software.com>.
Have you scanned the Maven books referenced on the Maven web site? Best 
starting place.

With a repository (Nexus), people are prevented from deploying the same 
version twice so you are guaranteed that if you build with version 
2.3.15 of ourNiceUtility, you will always get the same code. The repo 
will simply not allow them to overwrite version 2.3.15 once it is 
deployed into the wild(public).

Beats firing developers but stops them from doing silly things.


On 03/11/2014 11:33 PM, Irfan Sayed wrote:
> hello,
>
> is there any good doc/blog which describes the handling of explicit
> declaration of dependencies.
> when we build the code, we use certain dependencies , how we can make sure
> that when we reproduce the same build after the gap of 6 months , same and
> exact dependencies will be used. ???
> i know we can have artifactory/nexus , but that does not guarantee the
> exact version of dependency when developer changes the code and make it
> public keeping the version same
>
> please suggest
>
> regards
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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