You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Samuel Cox <sc...@pervasive.com> on 2009/01/14 22:51:14 UTC

Using maven for non-typical situations (i.e. not for building Java projects)

Hi,

We are developing some software that will use a notion of deployment repositories.  Various 'nodes' will need access to artifacts within this repository at run-time.  Artifacts can have dependencies on other artifacts.  So, we're basically just dealing with artifact sharing and resolution of run-time dependencies.

This seems to have many of the same concepts that Maven encompasses.  Consequently, it would be nice if we could leverage Maven somehow.

I've been looking at the Maven source.  As I'm sure you know, there is quite a bit.  Mainly, I've played around with the Wagon stuff.

I was wondering if anyone else has leveraged Maven programmatically and/or could provide me with some guidance.

For example, I'd like to do something like:

Repository repo = new Repository("http://my_repo/basedir");
Artifact[] artifacts = repo.searchByGroupId("org.apache.maven")
for (Artifact art : artifacts) // list dependencies

How about having our node generate a pom on the fly that references a custom plugin?  I know those have access to Artifacts...

Thanks.

--
Samuel Cox 



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


Re: Using maven for non-typical situations (i.e. not for building Java projects)

Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, Jan 14, 2009 at 2:51 PM, Samuel Cox <sc...@pervasive.com> wrote:

> For example, I'd like to do something like:
>
> Repository repo = new Repository("http://my_repo/basedir");
> Artifact[] artifacts = repo.searchByGroupId("org.apache.maven")
> for (Artifact art : artifacts) // list dependencies

I don't think what you want is in the Maven code, but rather in of one
of the various repository managers (Archiva, Nexus, etc.).

Here's some sample code for searching a repo hosted by Archiva, using
its xml-rpc interface:

http://svn.apache.org/repos/asf/archiva/trunk/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java

-- 
Wendy

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


RE: Using maven for non-typical situations (i.e. not for building Java projects)

Posted by Samuel Cox <sc...@pervasive.com>.
I was just brainstorming, but it would probably be in the local repository.

> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: Wednesday, January 14, 2009 3:59 PM
> To: users@maven.apache.org
> Subject: RE: Using maven for non-typical situations (i.e. not for
> building Java projects)
> 
> 
> which customised plugin will you be seeking to register in the
> repository?
> Will you be using either an local or online repository for this plugin?
> 
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and
> Sender does not endorse distribution to any party other than intended
> recipient. Sender does not necessarily endorse content contained within
> this transmission.
> 
> 
> 
> 
> > From: scox@pervasive.com
> > To: users@maven.apache.org
> > Date: Wed, 14 Jan 2009 15:51:14 -0600
> > Subject: Using maven for non-typical situations (i.e. not for
> building Java projects)
> >
> > Hi,
> >
> > We are developing some software that will use a notion of deployment
> repositories.  Various 'nodes' will need access to artifacts within
> this repository at run-time.  Artifacts can have dependencies on other
> artifacts.  So, we're basically just dealing with artifact sharing and
> resolution of run-time dependencies.
> >
> > This seems to have many of the same concepts that Maven encompasses.
> Consequently, it would be nice if we could leverage Maven somehow.
> >
> > I've been looking at the Maven source.  As I'm sure you know, there
> is quite a bit.  Mainly, I've played around with the Wagon stuff.
> >
> > I was wondering if anyone else has leveraged Maven programmatically
> and/or could provide me with some guidance.
> >
> > For example, I'd like to do something like:
> >
> > Repository repo = new Repository("http://my_repo/basedir");
> > Artifact[] artifacts = repo.searchByGroupId("org.apache.maven")
> > for (Artifact art : artifacts) // list dependencies
> >
> > How about having our node generate a pom on the fly that references a
> custom plugin?  I know those have access to Artifacts...
> >
> > Thanks.
> >
> > --
> > Samuel Cox
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> 
> _________________________________________________________________
> Windows Live(tm): Keep your life in sync.
> http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_01200
> 9


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


RE: Using maven for non-typical situations (i.e. not for building Java projects)

Posted by Martin Gainty <mg...@hotmail.com>.
which customised plugin will you be seeking to register in the repository?
Will you be using either an local or online repository for this plugin?

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> From: scox@pervasive.com
> To: users@maven.apache.org
> Date: Wed, 14 Jan 2009 15:51:14 -0600
> Subject: Using maven for non-typical situations (i.e. not for building Java projects)
> 
> Hi,
> 
> We are developing some software that will use a notion of deployment repositories.  Various 'nodes' will need access to artifacts within this repository at run-time.  Artifacts can have dependencies on other artifacts.  So, we're basically just dealing with artifact sharing and resolution of run-time dependencies.
> 
> This seems to have many of the same concepts that Maven encompasses.  Consequently, it would be nice if we could leverage Maven somehow.
> 
> I've been looking at the Maven source.  As I'm sure you know, there is quite a bit.  Mainly, I've played around with the Wagon stuff.
> 
> I was wondering if anyone else has leveraged Maven programmatically and/or could provide me with some guidance.
> 
> For example, I'd like to do something like:
> 
> Repository repo = new Repository("http://my_repo/basedir");
> Artifact[] artifacts = repo.searchByGroupId("org.apache.maven")
> for (Artifact art : artifacts) // list dependencies
> 
> How about having our node generate a pom on the fly that references a custom plugin?  I know those have access to Artifacts...
> 
> Thanks.
> 
> --
> Samuel Cox 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

_________________________________________________________________
Windows Liveā„¢: Keep your life in sync. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009