You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Guillaume Lederrey <gu...@gmail.com> on 2007/10/26 14:20:57 UTC

dependencies outside maven

  Hello !

  Does anyone knows how to work with dependencies not managed by maven
? Is it possible to add a jar to the class path with its absolute path
on disk, instead of having maven fetch it automagically in the maven
repo ?

  Before you call me crazy, let's me explain why :

  I'm working in a large organization, thinking of moving to maven. We
have lots of projects, having lots of dependencies between them. For
the moment, those projects are deployed in a central, proprietary
repository. We have ant scripts taking care of downloading the jars
needed by a project.

  We need to be able to transition to maven one project after another
(we cant just stop working for one month ;-). So we need to be able to
still refer to our "old" proprietary repository if we move a project
to maven but not all its dependencies are managed by maven.

  Ideas I had sofar :

* Adding some ant script that will copy the needed dependencies to a
local repository. Problem : we also need to create a pom in the local
repo (and I cant see how to easily generate it automagically).
* Pull the dependencies out of the maven dependency management, and
add them "manually" to the maven classpath. Problem : I dont even know
if it is possible.
* No other serious idea sofar ...

  Any comment, any experience of moving large multiprojects
environments (think many dozens, if not hundreds of related projects)
with lots of different teams are welcomed.

  Thanks,

    Guillaume
-- 
Jabber : gehel@amessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.com/
* http://rwandatech.wordpress.com/

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


Re: dependencies outside maven

Posted by Graham Leggett <mi...@sharp.fm>.
On Fri, October 26, 2007 4:47 pm, Guillaume Lederrey wrote:

>   That's our main problem !
>
>   For organizational / political reasons, the "bottom" of our
> dependency tree will not migrate anytime soon ... that's why we need
> some way to depend on projects NOT in the maven repository ...

In that case, you will need to deploy these "bottom" packages into your
maven repository, and set up the poms for them by hand.

Basically, for maven to work, it needs dependencies in a maven repo. Maven
doesn't care how those dependencies got created (old build system, new
build system, doesn't matter), only that the dependencies are where maven
expects to find them in the correct directory structure on the maven repo.

>   I know, we're going to have a lot of fun !

Keep things small and simple, and do things one step at a time.

We finished the migration of a project that combined EJB elements with
Eclipse RCP, and beginning to end the full migration process took a full
year. The rewards are worth it though: We need to release code at short
notice, and this process is now a non event for us, typically completed
within 30 minutes.

Regards,
Graham
--



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


Re: dependencies outside maven

Posted by Guillaume Lederrey <gu...@gmail.com>.
I didnt think  about that, but it sounds like a great solution ! Thanks !

I'll have a look on monday ...

On 27/10/2007, Wayne Fay <wa...@gmail.com> wrote:
> On Windows, there is mavenrc_pre.bat and mavenrc_post.bat. Check the
> mvn.bat file to see the reference to those files.
>
> And you can easily customize your mvn.bat or mvn.sh file for your
> corporate environment if you want to do "special stuff" in addition to
> the normal Maven commands. You just need to make sure that all your
> developers then install and use your custom Maven distro rather than
> the generic distro.
>
> Wayne
>
> On 10/26/07, Guillaume Lederrey <gu...@gmail.com> wrote:
> > Wayne, Graham, thanks for your advices !
> >
> > I will investigate a bit the <scope>system</scope> bug/feature (havent
> > really heard of it yet).
> >
> > Is it possible to have maven run a script before dependency checking ?
> > That would allow us to have a script (or maven-plugin, or ant task,
> > or whatever) run as part of the build that would download our
> > dependencies and install them locally. That would be mostly
> > transparent to the developer, so it looks like a clean solution.
> >
> > Worst case, we can always have a separate script that the developer
> > has to run prior to run maven, but it is not as clean ...
> >
> > I know, I should try it before asking the question ... but ... I'm a
> > bit lazy, and it's already the weekend ...
> >
> > Thanks again !
> >
> > MrG
> >
> > Our migration isnt only a large complex project, its dozen of them !
> > Each project generating many artifacts ... So yes, in the best world,
> > if everything goes right, I think we can expect to complete the
> > migration in a few years ;-) Every step to ease that pain will be
> > welcomed.
> >
> > I will certainly have to write some documentation of our process, but
> > in french (sorry). I will let you know if I am allowed to publish it
> > ...
> >
> > On 26/10/2007, Wayne Fay <wa...@gmail.com> wrote:
> > > You can try to use <scope>system</scope> bug this is generally not
> > > encouraged as it does not work as you might expect in all situations.
> > > This would allow you to pull your artifacts from your current system,
> > > put them in a /lib folder, and use them as part of your current Maven
> > > build.
> > >
> > > However, I think this is a bad idea -- system scope is not a long-term
> > > solution, and not a great short-term solution either. Instead I would
> > > build a little shell script that would analyze your pom, go out to
> > > your proprietary repo and download the necessary files and then use
> > > "mvn install:install-file -DgeneratePom=true -DcreateChecksum=true
> > > ..." to install each one into your local Maven repo cache.
> > >
> > > Ideally once you got things working on your local environment, you
> > > would use "mvn deploy" to deploy your code to a new Maven (corporate)
> > > repo that you will set up that will function as your new artifact
> > > repository. I would also write a script to run "mvn
> > > deploy:deploy-file" similar to the "mvn install" script mentioned
> > > above, so you will migrate not only the current app you're working on
> > > but also all of its related support libraries etc.
> > >
> > > Wayne
> > >
> > > On 10/26/07, Guillaume Lederrey <gu...@gmail.com> wrote:
> > > > On 26/10/2007, Graham Leggett <mi...@sharp.fm> wrote:
> > > > > On Fri, October 26, 2007 4:01 pm, Guillaume Lederrey wrote:
> > > > >
> > > > > > The dependencies on "standard" jars is not really a problem for us. As
> > > > > > you say, most of them are available already, and they tend not to
> > > > > > change to often.
> > > > > >
> > > > > > Our problem comes from dependencies on internally produced jars. For
> > > > > > example, we have a team working on a Swing Framework used by most of
> > > > > > our projects, or many teams working on components / services reused by
> > > > > > other internal projects. Those artifacts are deployed fairly often in
> > > > > > our proprietary repository, and we have to be able to depend on them.
> > > > > >
> > > > > > It is not an option to build a dependency graph and migrate first the
> > > > > > projects on which other projects depends. And it would be pretty heavy
> > > > > > to manually update our maven repository to include new versions of our
> > > > > > framework every time they do a release.
> > > > > >
> > > > > > For example, we need to be able to keep the framework deployed to our
> > > > > > proprietary repo, but have dependencies to this framework from
> > > > > > projects already migrating to maven.
> > > > >
> > > > > You need to start at the "bottom" of your dependency tree, with those
> > > > > dependencies that do not depend on other internal dependencies.
> > > >
> > > >  That's our main problem !
> > > >
> > > >  For organizational / political reasons, the "bottom" of our
> > > > dependency tree will not migrate anytime soon ... that's why we need
> > > > some way to depend on projects NOT in the maven repository ...
> > > >
> > > >  I know, we're going to have a lot of fun !
> > > >
> > > > > Get these bottom-most dependencies to the point where they are built by
> > > > > and deployed by maven to an internal maven repository set up for your
> > > > > project.
> > > > >
> > > > > When you make a release of these "bottom" dependencies, go through the
> > > > > formal maven release procedure (use the release plugin for this to make it
> > > > > easy), and as a final step, copy the artifact from the maven repository
> > > > > into your prorietry repo.
> > > > >
> > > > > Eventually, over time, more of the code will start life in the maven repo,
> > > > > until eventually you phase the proprietry repo out entirely. You can do
> > > > > this as quickly or as slowly as you feel comfortable with.
> > > > >
> > > > > Regards,
> > > > > Graham
> > > > > --
> > > > >
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Jabber : gehel@amessage.ch
> > > > Skype : Guillaume.Lederrey
> > > > Projects :
> > > > * http://rwanda.wordpress.com/
> > > > * http://rwandatech.wordpress.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
> > >
> > >
> >
> >
> > --
> > Jabber : gehel@amessage.ch
> > Skype : Guillaume.Lederrey
> > Projects :
> > * http://rwanda.wordpress.com/
> > * http://rwandatech.wordpress.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
>
>


-- 
Jabber : gehel@amessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.com/
* http://rwandatech.wordpress.com/

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


Re: dependencies outside maven

Posted by Wayne Fay <wa...@gmail.com>.
On Windows, there is mavenrc_pre.bat and mavenrc_post.bat. Check the
mvn.bat file to see the reference to those files.

And you can easily customize your mvn.bat or mvn.sh file for your
corporate environment if you want to do "special stuff" in addition to
the normal Maven commands. You just need to make sure that all your
developers then install and use your custom Maven distro rather than
the generic distro.

Wayne

On 10/26/07, Guillaume Lederrey <gu...@gmail.com> wrote:
> Wayne, Graham, thanks for your advices !
>
> I will investigate a bit the <scope>system</scope> bug/feature (havent
> really heard of it yet).
>
> Is it possible to have maven run a script before dependency checking ?
> That would allow us to have a script (or maven-plugin, or ant task,
> or whatever) run as part of the build that would download our
> dependencies and install them locally. That would be mostly
> transparent to the developer, so it looks like a clean solution.
>
> Worst case, we can always have a separate script that the developer
> has to run prior to run maven, but it is not as clean ...
>
> I know, I should try it before asking the question ... but ... I'm a
> bit lazy, and it's already the weekend ...
>
> Thanks again !
>
> MrG
>
> Our migration isnt only a large complex project, its dozen of them !
> Each project generating many artifacts ... So yes, in the best world,
> if everything goes right, I think we can expect to complete the
> migration in a few years ;-) Every step to ease that pain will be
> welcomed.
>
> I will certainly have to write some documentation of our process, but
> in french (sorry). I will let you know if I am allowed to publish it
> ...
>
> On 26/10/2007, Wayne Fay <wa...@gmail.com> wrote:
> > You can try to use <scope>system</scope> bug this is generally not
> > encouraged as it does not work as you might expect in all situations.
> > This would allow you to pull your artifacts from your current system,
> > put them in a /lib folder, and use them as part of your current Maven
> > build.
> >
> > However, I think this is a bad idea -- system scope is not a long-term
> > solution, and not a great short-term solution either. Instead I would
> > build a little shell script that would analyze your pom, go out to
> > your proprietary repo and download the necessary files and then use
> > "mvn install:install-file -DgeneratePom=true -DcreateChecksum=true
> > ..." to install each one into your local Maven repo cache.
> >
> > Ideally once you got things working on your local environment, you
> > would use "mvn deploy" to deploy your code to a new Maven (corporate)
> > repo that you will set up that will function as your new artifact
> > repository. I would also write a script to run "mvn
> > deploy:deploy-file" similar to the "mvn install" script mentioned
> > above, so you will migrate not only the current app you're working on
> > but also all of its related support libraries etc.
> >
> > Wayne
> >
> > On 10/26/07, Guillaume Lederrey <gu...@gmail.com> wrote:
> > > On 26/10/2007, Graham Leggett <mi...@sharp.fm> wrote:
> > > > On Fri, October 26, 2007 4:01 pm, Guillaume Lederrey wrote:
> > > >
> > > > > The dependencies on "standard" jars is not really a problem for us. As
> > > > > you say, most of them are available already, and they tend not to
> > > > > change to often.
> > > > >
> > > > > Our problem comes from dependencies on internally produced jars. For
> > > > > example, we have a team working on a Swing Framework used by most of
> > > > > our projects, or many teams working on components / services reused by
> > > > > other internal projects. Those artifacts are deployed fairly often in
> > > > > our proprietary repository, and we have to be able to depend on them.
> > > > >
> > > > > It is not an option to build a dependency graph and migrate first the
> > > > > projects on which other projects depends. And it would be pretty heavy
> > > > > to manually update our maven repository to include new versions of our
> > > > > framework every time they do a release.
> > > > >
> > > > > For example, we need to be able to keep the framework deployed to our
> > > > > proprietary repo, but have dependencies to this framework from
> > > > > projects already migrating to maven.
> > > >
> > > > You need to start at the "bottom" of your dependency tree, with those
> > > > dependencies that do not depend on other internal dependencies.
> > >
> > >  That's our main problem !
> > >
> > >  For organizational / political reasons, the "bottom" of our
> > > dependency tree will not migrate anytime soon ... that's why we need
> > > some way to depend on projects NOT in the maven repository ...
> > >
> > >  I know, we're going to have a lot of fun !
> > >
> > > > Get these bottom-most dependencies to the point where they are built by
> > > > and deployed by maven to an internal maven repository set up for your
> > > > project.
> > > >
> > > > When you make a release of these "bottom" dependencies, go through the
> > > > formal maven release procedure (use the release plugin for this to make it
> > > > easy), and as a final step, copy the artifact from the maven repository
> > > > into your prorietry repo.
> > > >
> > > > Eventually, over time, more of the code will start life in the maven repo,
> > > > until eventually you phase the proprietry repo out entirely. You can do
> > > > this as quickly or as slowly as you feel comfortable with.
> > > >
> > > > Regards,
> > > > Graham
> > > > --
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Jabber : gehel@amessage.ch
> > > Skype : Guillaume.Lederrey
> > > Projects :
> > > * http://rwanda.wordpress.com/
> > > * http://rwandatech.wordpress.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
> >
> >
>
>
> --
> Jabber : gehel@amessage.ch
> Skype : Guillaume.Lederrey
> Projects :
> * http://rwanda.wordpress.com/
> * http://rwandatech.wordpress.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


Re: dependencies outside maven

Posted by Guillaume Lederrey <gu...@gmail.com>.
Wayne, Graham, thanks for your advices !

I will investigate a bit the <scope>system</scope> bug/feature (havent
really heard of it yet).

Is it possible to have maven run a script before dependency checking ?
That would allow us to have a script (or maven-plugin, or ant task,
or whatever) run as part of the build that would download our
dependencies and install them locally. That would be mostly
transparent to the developer, so it looks like a clean solution.

Worst case, we can always have a separate script that the developer
has to run prior to run maven, but it is not as clean ...

I know, I should try it before asking the question ... but ... I'm a
bit lazy, and it's already the weekend ...

Thanks again !

MrG

Our migration isnt only a large complex project, its dozen of them !
Each project generating many artifacts ... So yes, in the best world,
if everything goes right, I think we can expect to complete the
migration in a few years ;-) Every step to ease that pain will be
welcomed.

I will certainly have to write some documentation of our process, but
in french (sorry). I will let you know if I am allowed to publish it
...

On 26/10/2007, Wayne Fay <wa...@gmail.com> wrote:
> You can try to use <scope>system</scope> bug this is generally not
> encouraged as it does not work as you might expect in all situations.
> This would allow you to pull your artifacts from your current system,
> put them in a /lib folder, and use them as part of your current Maven
> build.
>
> However, I think this is a bad idea -- system scope is not a long-term
> solution, and not a great short-term solution either. Instead I would
> build a little shell script that would analyze your pom, go out to
> your proprietary repo and download the necessary files and then use
> "mvn install:install-file -DgeneratePom=true -DcreateChecksum=true
> ..." to install each one into your local Maven repo cache.
>
> Ideally once you got things working on your local environment, you
> would use "mvn deploy" to deploy your code to a new Maven (corporate)
> repo that you will set up that will function as your new artifact
> repository. I would also write a script to run "mvn
> deploy:deploy-file" similar to the "mvn install" script mentioned
> above, so you will migrate not only the current app you're working on
> but also all of its related support libraries etc.
>
> Wayne
>
> On 10/26/07, Guillaume Lederrey <gu...@gmail.com> wrote:
> > On 26/10/2007, Graham Leggett <mi...@sharp.fm> wrote:
> > > On Fri, October 26, 2007 4:01 pm, Guillaume Lederrey wrote:
> > >
> > > > The dependencies on "standard" jars is not really a problem for us. As
> > > > you say, most of them are available already, and they tend not to
> > > > change to often.
> > > >
> > > > Our problem comes from dependencies on internally produced jars. For
> > > > example, we have a team working on a Swing Framework used by most of
> > > > our projects, or many teams working on components / services reused by
> > > > other internal projects. Those artifacts are deployed fairly often in
> > > > our proprietary repository, and we have to be able to depend on them.
> > > >
> > > > It is not an option to build a dependency graph and migrate first the
> > > > projects on which other projects depends. And it would be pretty heavy
> > > > to manually update our maven repository to include new versions of our
> > > > framework every time they do a release.
> > > >
> > > > For example, we need to be able to keep the framework deployed to our
> > > > proprietary repo, but have dependencies to this framework from
> > > > projects already migrating to maven.
> > >
> > > You need to start at the "bottom" of your dependency tree, with those
> > > dependencies that do not depend on other internal dependencies.
> >
> >  That's our main problem !
> >
> >  For organizational / political reasons, the "bottom" of our
> > dependency tree will not migrate anytime soon ... that's why we need
> > some way to depend on projects NOT in the maven repository ...
> >
> >  I know, we're going to have a lot of fun !
> >
> > > Get these bottom-most dependencies to the point where they are built by
> > > and deployed by maven to an internal maven repository set up for your
> > > project.
> > >
> > > When you make a release of these "bottom" dependencies, go through the
> > > formal maven release procedure (use the release plugin for this to make it
> > > easy), and as a final step, copy the artifact from the maven repository
> > > into your prorietry repo.
> > >
> > > Eventually, over time, more of the code will start life in the maven repo,
> > > until eventually you phase the proprietry repo out entirely. You can do
> > > this as quickly or as slowly as you feel comfortable with.
> > >
> > > Regards,
> > > Graham
> > > --
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Jabber : gehel@amessage.ch
> > Skype : Guillaume.Lederrey
> > Projects :
> > * http://rwanda.wordpress.com/
> > * http://rwandatech.wordpress.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
>
>


-- 
Jabber : gehel@amessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.com/
* http://rwandatech.wordpress.com/

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


Re: dependencies outside maven

Posted by Guillaume Lederrey <gu...@gmail.com>.
Yep, I did see that. There is an "install" task, but if I read the
documentation correctly, I need to create the pom by hand. "mvn
install:install-file ..." would take care of that automagically ...

Ok, it's not that hard to script the creation of a pom, but as maven
seems to know how to do it, I'd like to reuse the functionality.

Did I miss anything ? (Answer: yes I did, but would you be so kind as
to point me in the right direction ?)

Thanks a lot !

On 29/10/2007, Wayne Fay <wa...@gmail.com> wrote:
> Right on the Maven homepage is: "Maven Tasks for Ant 2.0.7 (binaries,
> documentation, release notes)". That should do it.
>
> Wayne
>
> On 10/29/07, Guillaume Lederrey <gu...@gmail.com> wrote:
> > On 26/10/2007, Wayne Fay <wa...@gmail.com> wrote:
> > > Instead I would
> > > build a little shell script that would analyze your pom, go out to
> > > your proprietary repo and download the necessary files and then use
> > > "mvn install:install-file -DgeneratePom=true -DcreateChecksum=true
> > > ..." to install each one into your local Maven repo cache.
> >
> >  Is it possible to call "mvn install:install-file ..." from ant ?
> >
> >  This is a pretty dumb question, but do you know if I can easily call
> > maven from ant ? I will have to write a script that is portable
> > between development workstations (Windows) and integration /
> > production servers (Solaris). And it has to be in a language familiar
> > to the team. Ant seems a good choice, but I am far from an expert.
> >
> >  Google finds plenty of ways to call ant from maven, but the reverse
> > isnt as popular ...
> >
> >    Again, thanks for the great help !
> >
> > --
> > Jabber : gehel@amessage.ch
> > Skype : Guillaume.Lederrey
> > Projects :
> > * http://rwanda.wordpress.com/
> > * http://rwandatech.wordpress.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
>
>


-- 
Jabber : gehel@amessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.com/
* http://rwandatech.wordpress.com/

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


Re: dependencies outside maven

Posted by Wayne Fay <wa...@gmail.com>.
Right on the Maven homepage is: "Maven Tasks for Ant 2.0.7 (binaries,
documentation, release notes)". That should do it.

Wayne

On 10/29/07, Guillaume Lederrey <gu...@gmail.com> wrote:
> On 26/10/2007, Wayne Fay <wa...@gmail.com> wrote:
> > Instead I would
> > build a little shell script that would analyze your pom, go out to
> > your proprietary repo and download the necessary files and then use
> > "mvn install:install-file -DgeneratePom=true -DcreateChecksum=true
> > ..." to install each one into your local Maven repo cache.
>
>  Is it possible to call "mvn install:install-file ..." from ant ?
>
>  This is a pretty dumb question, but do you know if I can easily call
> maven from ant ? I will have to write a script that is portable
> between development workstations (Windows) and integration /
> production servers (Solaris). And it has to be in a language familiar
> to the team. Ant seems a good choice, but I am far from an expert.
>
>  Google finds plenty of ways to call ant from maven, but the reverse
> isnt as popular ...
>
>    Again, thanks for the great help !
>
> --
> Jabber : gehel@amessage.ch
> Skype : Guillaume.Lederrey
> Projects :
> * http://rwanda.wordpress.com/
> * http://rwandatech.wordpress.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


Re: dependencies outside maven

Posted by Guillaume Lederrey <gu...@gmail.com>.
On 26/10/2007, Wayne Fay <wa...@gmail.com> wrote:
> Instead I would
> build a little shell script that would analyze your pom, go out to
> your proprietary repo and download the necessary files and then use
> "mvn install:install-file -DgeneratePom=true -DcreateChecksum=true
> ..." to install each one into your local Maven repo cache.

  Is it possible to call "mvn install:install-file ..." from ant ?

  This is a pretty dumb question, but do you know if I can easily call
maven from ant ? I will have to write a script that is portable
between development workstations (Windows) and integration /
production servers (Solaris). And it has to be in a language familiar
to the team. Ant seems a good choice, but I am far from an expert.

  Google finds plenty of ways to call ant from maven, but the reverse
isnt as popular ...

    Again, thanks for the great help !

-- 
Jabber : gehel@amessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.com/
* http://rwandatech.wordpress.com/

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


Re: dependencies outside maven

Posted by Wayne Fay <wa...@gmail.com>.
You can try to use <scope>system</scope> bug this is generally not
encouraged as it does not work as you might expect in all situations.
This would allow you to pull your artifacts from your current system,
put them in a /lib folder, and use them as part of your current Maven
build.

However, I think this is a bad idea -- system scope is not a long-term
solution, and not a great short-term solution either. Instead I would
build a little shell script that would analyze your pom, go out to
your proprietary repo and download the necessary files and then use
"mvn install:install-file -DgeneratePom=true -DcreateChecksum=true
..." to install each one into your local Maven repo cache.

Ideally once you got things working on your local environment, you
would use "mvn deploy" to deploy your code to a new Maven (corporate)
repo that you will set up that will function as your new artifact
repository. I would also write a script to run "mvn
deploy:deploy-file" similar to the "mvn install" script mentioned
above, so you will migrate not only the current app you're working on
but also all of its related support libraries etc.

Wayne

On 10/26/07, Guillaume Lederrey <gu...@gmail.com> wrote:
> On 26/10/2007, Graham Leggett <mi...@sharp.fm> wrote:
> > On Fri, October 26, 2007 4:01 pm, Guillaume Lederrey wrote:
> >
> > > The dependencies on "standard" jars is not really a problem for us. As
> > > you say, most of them are available already, and they tend not to
> > > change to often.
> > >
> > > Our problem comes from dependencies on internally produced jars. For
> > > example, we have a team working on a Swing Framework used by most of
> > > our projects, or many teams working on components / services reused by
> > > other internal projects. Those artifacts are deployed fairly often in
> > > our proprietary repository, and we have to be able to depend on them.
> > >
> > > It is not an option to build a dependency graph and migrate first the
> > > projects on which other projects depends. And it would be pretty heavy
> > > to manually update our maven repository to include new versions of our
> > > framework every time they do a release.
> > >
> > > For example, we need to be able to keep the framework deployed to our
> > > proprietary repo, but have dependencies to this framework from
> > > projects already migrating to maven.
> >
> > You need to start at the "bottom" of your dependency tree, with those
> > dependencies that do not depend on other internal dependencies.
>
>  That's our main problem !
>
>  For organizational / political reasons, the "bottom" of our
> dependency tree will not migrate anytime soon ... that's why we need
> some way to depend on projects NOT in the maven repository ...
>
>  I know, we're going to have a lot of fun !
>
> > Get these bottom-most dependencies to the point where they are built by
> > and deployed by maven to an internal maven repository set up for your
> > project.
> >
> > When you make a release of these "bottom" dependencies, go through the
> > formal maven release procedure (use the release plugin for this to make it
> > easy), and as a final step, copy the artifact from the maven repository
> > into your prorietry repo.
> >
> > Eventually, over time, more of the code will start life in the maven repo,
> > until eventually you phase the proprietry repo out entirely. You can do
> > this as quickly or as slowly as you feel comfortable with.
> >
> > Regards,
> > Graham
> > --
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Jabber : gehel@amessage.ch
> Skype : Guillaume.Lederrey
> Projects :
> * http://rwanda.wordpress.com/
> * http://rwandatech.wordpress.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


Re: dependencies outside maven

Posted by Guillaume Lederrey <gu...@gmail.com>.
On 26/10/2007, Graham Leggett <mi...@sharp.fm> wrote:
> On Fri, October 26, 2007 4:01 pm, Guillaume Lederrey wrote:
>
> > The dependencies on "standard" jars is not really a problem for us. As
> > you say, most of them are available already, and they tend not to
> > change to often.
> >
> > Our problem comes from dependencies on internally produced jars. For
> > example, we have a team working on a Swing Framework used by most of
> > our projects, or many teams working on components / services reused by
> > other internal projects. Those artifacts are deployed fairly often in
> > our proprietary repository, and we have to be able to depend on them.
> >
> > It is not an option to build a dependency graph and migrate first the
> > projects on which other projects depends. And it would be pretty heavy
> > to manually update our maven repository to include new versions of our
> > framework every time they do a release.
> >
> > For example, we need to be able to keep the framework deployed to our
> > proprietary repo, but have dependencies to this framework from
> > projects already migrating to maven.
>
> You need to start at the "bottom" of your dependency tree, with those
> dependencies that do not depend on other internal dependencies.

  That's our main problem !

  For organizational / political reasons, the "bottom" of our
dependency tree will not migrate anytime soon ... that's why we need
some way to depend on projects NOT in the maven repository ...

  I know, we're going to have a lot of fun !

> Get these bottom-most dependencies to the point where they are built by
> and deployed by maven to an internal maven repository set up for your
> project.
>
> When you make a release of these "bottom" dependencies, go through the
> formal maven release procedure (use the release plugin for this to make it
> easy), and as a final step, copy the artifact from the maven repository
> into your prorietry repo.
>
> Eventually, over time, more of the code will start life in the maven repo,
> until eventually you phase the proprietry repo out entirely. You can do
> this as quickly or as slowly as you feel comfortable with.
>
> Regards,
> Graham
> --
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Jabber : gehel@amessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.com/
* http://rwandatech.wordpress.com/

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


Re: dependencies outside maven

Posted by Graham Leggett <mi...@sharp.fm>.
On Fri, October 26, 2007 4:01 pm, Guillaume Lederrey wrote:

> The dependencies on "standard" jars is not really a problem for us. As
> you say, most of them are available already, and they tend not to
> change to often.
>
> Our problem comes from dependencies on internally produced jars. For
> example, we have a team working on a Swing Framework used by most of
> our projects, or many teams working on components / services reused by
> other internal projects. Those artifacts are deployed fairly often in
> our proprietary repository, and we have to be able to depend on them.
>
> It is not an option to build a dependency graph and migrate first the
> projects on which other projects depends. And it would be pretty heavy
> to manually update our maven repository to include new versions of our
> framework every time they do a release.
>
> For example, we need to be able to keep the framework deployed to our
> proprietary repo, but have dependencies to this framework from
> projects already migrating to maven.

You need to start at the "bottom" of your dependency tree, with those
dependencies that do not depend on other internal dependencies.

Get these bottom-most dependencies to the point where they are built by
and deployed by maven to an internal maven repository set up for your
project.

When you make a release of these "bottom" dependencies, go through the
formal maven release procedure (use the release plugin for this to make it
easy), and as a final step, copy the artifact from the maven repository
into your prorietry repo.

Eventually, over time, more of the code will start life in the maven repo,
until eventually you phase the proprietry repo out entirely. You can do
this as quickly or as slowly as you feel comfortable with.

Regards,
Graham
--



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


Re: dependencies outside maven

Posted by Guillaume Lederrey <gu...@gmail.com>.
Thank you for your answer ! There is a few points still unclear to me
: see below

On 26/10/2007, Graham Leggett <mi...@sharp.fm> wrote:
> On Fri, October 26, 2007 2:20 pm, Guillaume Lederrey wrote:
>
> >   I'm working in a large organization, thinking of moving to maven. We
> > have lots of projects, having lots of dependencies between them. For
> > the moment, those projects are deployed in a central, proprietary
> > repository. We have ant scripts taking care of downloading the jars
> > needed by a project.
> >
> >   We need to be able to transition to maven one project after another
> > (we cant just stop working for one month ;-). So we need to be able to
> > still refer to our "old" proprietary repository if we move a project
> > to maven but not all its dependencies are managed by maven.
>
> It is a pretty standard problem to have to support a "bridged" solution
> while you move from one system to another.
>
> We had to move off of a hacked together local repository hosted on a
> windows share, to a proper maven repo hosted on a webserver.
>
> Initially we started with an empty maven repo, and then manually imported
> all the jars that were needed for each project from the existing
> proprietry repo as we needed them.
>
> What we did find is that the vast majority of jars being hosted in the old
> repo were jars that were already available in the maven repos at
> http://repo1.maven.org. In these cases, no import was done at all - we
> just configured the pom files to use the correct versions of these
> external jars, and let maven handle the downloads automatically.

The dependencies on "standard" jars is not really a problem for us. As
you say, most of them are available already, and they tend not to
change to often.

Our problem comes from dependencies on internally produced jars. For
example, we have a team working on a Swing Framework used by most of
our projects, or many teams working on components / services reused by
other internal projects. Those artifacts are deployed fairly often in
our proprietary repository, and we have to be able to depend on them.

It is not an option to build a dependency graph and migrate first the
projects on which other projects depends. And it would be pretty heavy
to manually update our maven repository to include new versions of our
framework every time they do a release.

For example, we need to be able to keep the framework deployed to our
proprietary repo, but have dependencies to this framework from
projects already migrating to maven.

Does it make sense ?


> There were a few jars left over that were no publically availalbe, and so
> those jars were uploaded to our project-private in house repository.
>
> At all times both the old ant based way, and the new maven way, worked for
> those projects that had been converted. This way we eased off the old, and
> eventually switched it off.
>
> Regards,
> Graham
> --
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Jabber : gehel@amessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.com/
* http://rwandatech.wordpress.com/

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


Re: dependencies outside maven

Posted by Graham Leggett <mi...@sharp.fm>.
On Fri, October 26, 2007 2:20 pm, Guillaume Lederrey wrote:

>   I'm working in a large organization, thinking of moving to maven. We
> have lots of projects, having lots of dependencies between them. For
> the moment, those projects are deployed in a central, proprietary
> repository. We have ant scripts taking care of downloading the jars
> needed by a project.
>
>   We need to be able to transition to maven one project after another
> (we cant just stop working for one month ;-). So we need to be able to
> still refer to our "old" proprietary repository if we move a project
> to maven but not all its dependencies are managed by maven.

It is a pretty standard problem to have to support a "bridged" solution
while you move from one system to another.

We had to move off of a hacked together local repository hosted on a
windows share, to a proper maven repo hosted on a webserver.

Initially we started with an empty maven repo, and then manually imported
all the jars that were needed for each project from the existing
proprietry repo as we needed them.

What we did find is that the vast majority of jars being hosted in the old
repo were jars that were already available in the maven repos at
http://repo1.maven.org. In these cases, no import was done at all - we
just configured the pom files to use the correct versions of these
external jars, and let maven handle the downloads automatically.

There were a few jars left over that were no publically availalbe, and so
those jars were uploaded to our project-private in house repository.

At all times both the old ant based way, and the new maven way, worked for
those projects that had been converted. This way we eased off the old, and
eventually switched it off.

Regards,
Graham
--



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