You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by gorgophol <be...@inter.de> on 2009/06/17 09:21:23 UTC

Re: Can I prevent maven from searching dependencies in localRepository?



Stephen Connolly-2 wrote:
> 
> sounds like you are not using versions correctly.
> 
> -SNAPSHOT versions are for untested local stuff.
> 
> non-SNAPSHOT versions are pulled from repositories and have been
> tested.  They are only produced from a build machine, so no developer
> should have a non-SNAPSHOT version unless it came from a remote repo
> 

Maybe we're not using versions and SNAPSHOTs as expected. It's not
practicable in our context here. Well I'm the supervisor of the build
server, where one central installation of maven runs, and designed the
release process, trying to use maven. There are several company rules that
have to be fulfilled. Every build of every java developer group in the
company has to be done via this central installation. Builds can only be
started out of scm (cvs in our case). Moving an artifact to another
repository has to be done without re-building it, so its absolutly sure,
that nothing has changed. 

So using SNAPSHOT gets very complicated, because first developers have to
check in all their poms with all dependencies (which can count up to more
than 100) with a SNAPSHOT version and test it. This could not be used, so
they have to build it again, removing all SNAPSHOT entries in every of the
poms (and the poms dependencies ...), check In again an re-build. Then have
to test again, because there is no guarantee everything is the same as
tested before. Deploying artifacts into a share-repository by re-building
them is not allowed. 

So I always get into trouble with the local repository. Well I'm just trying
to bring maven into this company, but I have to concern the development
contexts already existing. In my oppinion maven seems to be flexible enough
for that. This is really the last obstacle before my release process can get
productive. But there are things that cannot be changed now, so I have to
find a possibility to exclude localRepsitory from the artifact search
process in maven. 

I'd prefer a solution maven might provide in his depth somewhere. My other
option is to delete artifacts from localRepository after every build and
deploy. 
-- 
View this message in context: http://www.nabble.com/Can-I-prevent-maven-from-searching-dependencies-in-localRepository--tp24054742p24068271.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Can I prevent maven from searching dependencies in localRepository?

Posted by Stephen Connolly <st...@gmail.com>.
2009/6/17 gorgophol <be...@inter.de>

>
>
>
> Stephen Connolly-2 wrote:
> >
> > sounds like you are not using versions correctly.
> >
> > -SNAPSHOT versions are for untested local stuff.
> >
> > non-SNAPSHOT versions are pulled from repositories and have been
> > tested.  They are only produced from a build machine, so no developer
> > should have a non-SNAPSHOT version unless it came from a remote repo
> >
>
> Maybe we're not using versions and SNAPSHOTs as expected. It's not
> practicable in our context here. Well I'm the supervisor of the build
> server, where one central installation of maven runs, and designed the
> release process, trying to use maven. There are several company rules that
> have to be fulfilled. Every build of every java developer group in the
> company has to be done via this central installation. Builds can only be
> started out of scm (cvs in our case). Moving an artifact to another
> repository has to be done without re-building it, so its absolutly sure,
> that nothing has changed.
>
> So using SNAPSHOT gets very complicated, because first developers have to
> check in all their poms with all dependencies (which can count up to more
> than 100) with a SNAPSHOT version and test it. This could not be used, so
> they have to build it again, removing all SNAPSHOT entries in every of the
> poms (and the poms dependencies ...), check In again an re-build. Then have
> to test again, because there is no guarantee everything is the same as
> tested before. Deploying artifacts into a share-repository by re-building
> them is not allowed.
>
> So I always get into trouble with the local repository. Well I'm just
> trying
> to bring maven into this company, but I have to concern the development
> contexts already existing. In my oppinion maven seems to be flexible enough
> for that. This is really the last obstacle before my release process can
> get
> productive. But there are things that cannot be changed now, so I have to
> find a possibility to exclude localRepsitory from the artifact search
> process in maven.
>
> I'd prefer a solution maven might provide in his depth somewhere. My other
> option is to delete artifacts from localRepository after every build and
> deploy.


IMHO, If you are not using -SNAPSHOP versions then you must purge the local
repository before every build in order to ensure that you have the latest
build of a release version.

-SNAPSHOT versions, the release plugin, and release staging are the way to
go


> --
> View this message in context:
> http://www.nabble.com/Can-I-prevent-maven-from-searching-dependencies-in-localRepository--tp24054742p24068271.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Can I prevent maven from searching dependencies in localRepository?

Posted by gorgophol <be...@inter.de>.
Hi, 

generally it is, what I'm looking for and I'm doing that already. 
I'm using Apache Archiva as my repository manager and i defined several
repositories in several profiles in my one central settings.xml. 
The problem is, they are NOT independent, because localRepository connects
them and their content in one single repository. Every artifact built with
maven and deployed in any of these repositories is also in localRepository
and will be found there, if it is allowed or not. 
Stephen is right, we have a different use of versions and repositories,
which is not the same, maven expects. So my solution now was to eliminate
our company-internal artifacts from localRepository, before every build. (We
might test release-plugin in future. But at the moment there are deadlines
for a functional system ...) 

Well it works  :-) 
Thanks for your help. 


mkr wrote:
> 
> Not sure I understood this correctly. It appears that you want to have a
> 1..n RELEASE
> repositories, that are access controlled. There are couple of ways you can
> go about
> it (I think):
>   - if you use a Repository Manager like Nexus, you can get what you want,
> maintaining
>     the same "settings.xml"
>   - Or you can always have a settings.xml with various mirror settings. Or
> there are also
>     options available in the Maven Client command to *override* the
> default
> settings.xml
>     locations.
> Don't know if that is what you are looking for.
> 
> Thanks,
> mohan kr
> 



-- 
View this message in context: http://www.nabble.com/Can-I-prevent-maven-from-searching-dependencies-in-localRepository--tp24054742p24086827.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Can I prevent maven from searching dependencies in localRepository?

Posted by Mohan KR <km...@gmail.com>.
Not sure I understood this correctly. It appears that you want to have a
1..n RELEASE
repositories, that are access controlled. There are couple of ways you can
go about
it (I think):
  - if you use a Repository Manager like Nexus, you can get what you want,
maintaining
    the same "settings.xml"
  - Or you can always have a settings.xml with various mirror settings. Or
there are also
    options available in the Maven Client command to *override* the default
settings.xml
    locations.
Don't know if that is what you are looking for.

Thanks,
mohan kr

-----Original Message-----
From: gorgophol [mailto:benjamin.haag@inter.de] 
Sent: Wednesday, June 17, 2009 2:21 AM
To: users@maven.apache.org
Subject: Re: Can I prevent maven from searching dependencies in
localRepository?




Stephen Connolly-2 wrote:
> 
> sounds like you are not using versions correctly.
> 
> -SNAPSHOT versions are for untested local stuff.
> 
> non-SNAPSHOT versions are pulled from repositories and have been
> tested.  They are only produced from a build machine, so no developer
> should have a non-SNAPSHOT version unless it came from a remote repo
> 

Maybe we're not using versions and SNAPSHOTs as expected. It's not
practicable in our context here. Well I'm the supervisor of the build
server, where one central installation of maven runs, and designed the
release process, trying to use maven. There are several company rules that
have to be fulfilled. Every build of every java developer group in the
company has to be done via this central installation. Builds can only be
started out of scm (cvs in our case). Moving an artifact to another
repository has to be done without re-building it, so its absolutly sure,
that nothing has changed. 

So using SNAPSHOT gets very complicated, because first developers have to
check in all their poms with all dependencies (which can count up to more
than 100) with a SNAPSHOT version and test it. This could not be used, so
they have to build it again, removing all SNAPSHOT entries in every of the
poms (and the poms dependencies ...), check In again an re-build. Then have
to test again, because there is no guarantee everything is the same as
tested before. Deploying artifacts into a share-repository by re-building
them is not allowed. 

So I always get into trouble with the local repository. Well I'm just trying
to bring maven into this company, but I have to concern the development
contexts already existing. In my oppinion maven seems to be flexible enough
for that. This is really the last obstacle before my release process can get
productive. But there are things that cannot be changed now, so I have to
find a possibility to exclude localRepsitory from the artifact search
process in maven. 

I'd prefer a solution maven might provide in his depth somewhere. My other
option is to delete artifacts from localRepository after every build and
deploy. 
-- 
View this message in context:
http://www.nabble.com/Can-I-prevent-maven-from-searching-dependencies-in-loc
alRepository--tp24054742p24068271.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


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