You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ole Ersoy <ol...@yahoo.com> on 2006/11/22 18:31:37 UTC

Loading a POM Artifact

Hi,

Could someone please give me an idea of how to go
about
setting the classifier in (Is there a documented API
for this?):

artifact =
factory.createArtifactWithClassifier(groupId,
artifactId, version, type, classifier);

Thanks again,
- Ole


 
____________________________________________________________________________________
Sponsored Link

Rates near 39yr lows. $420,000 Loan for $1399/mo. 
Calcuate new payment. www.LowerMyBills.com/lre


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


Re: Loading a POM Artifact

Posted by Ole Ersoy <ol...@yahoo.com>.
Eric,

I should have known it would be something
straightforward like that.

Thanks a gazillion.  I can finally get with it now.

Cheers,
- Ole


--- Eric Redmond <er...@gmail.com> wrote:

> The classifier is an optional extension to the
> project coordinate --
> groupId:artifact:[classifier:]version. Unless your
> project needs noe
> (specified in the packaging plugin configuration,
> such as jar:jar), its not
> required. You can put in null.
> 
> 
> On 11/22/06, Ole Ersoy <ol...@yahoo.com> wrote:
> >
> > Hi Eric,
> >
> > I'm writing an RPM mojo for the JPackage project.
> >
> > The JPackagers would put the artifactId, groupId,
> and
> > version of the project they want to package in a
> > configuration file.
> >
> > This lets the mojo know what project they want to
> > package.
> >
> > So the mojo reads those parameters from the
> > configuration file and loads the corresponding POM
> > in the repository.
> >
> > Tom (Authored the Cookbook section) pointed me to
> the
> > Mojo Cookbook on the wiki where I found this:
> >
> > artifact =
> > factory.createArtifactWithClassifier(groupId,
> > artifactId, version, type, classifier);
> >
> > That seems like an elegant way to create the
> > java.io.File that represents the POM.
> >
> > (He said just put "pom" for the type...but what
> about
> > classifier?)
> >
> > Once I have the file I can just get the path, and
> pass
> > that to my resource loader.
> >
> > I'm guessing the classifier is the DocumentRoot
> for
> > the POM...but
> > the DefaultArtifactFactory in subversion has 0 api
> > documentation...so I'd probably have to date the
> class
> > for a while before I get any love.
> >
> > wdyt?
> >
> > Thanks,
> > - Ole
> >
> > --- Eric Redmond <er...@gmail.com> wrote:
> >
> > > I'm not sure what you mean here... do you mean
> how
> > > to configure a project's
> > > classifier in the POM? Are you building an
> artifact
> > > with a classifier, or
> > > are you trying to get one as a dependency?
> > >
> > > Eric
> > >
> > > On 11/22/06, Ole Ersoy <ol...@yahoo.com>
> wrote:
> > > >
> > > > Hi,
> > > >
> > > > Could someone please give me an idea of how to
> go
> > > > about
> > > > setting the classifier in (Is there a
> documented
> > > API
> > > > for this?):
> > > >
> > > > artifact =
> > > > factory.createArtifactWithClassifier(groupId,
> > > > artifactId, version, type, classifier);
> > > >
> > > > Thanks again,
> > > > - Ole
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
>
____________________________________________________________________________________
> > > > Sponsored Link
> > > >
> > > > Rates near 39yr lows. $420,000 Loan for
> $1399/mo.
> > > > Calcuate new payment. www.LowerMyBills.com/lre
> > > >
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail:
> > > users-help@maven.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Eric Redmond
> > > http://codehaus.org/~eredmond
> > >
> >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Yahoo! Music Unlimited
> > Access over 1 million songs.
> > http://music.yahoo.com/unlimited
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> users-help@maven.apache.org
> >
> >
> 
> 
> -- 
> Eric Redmond
> http://codehaus.org/~eredmond
> 



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

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


Re: Loading a POM Artifact

Posted by Eric Redmond <er...@gmail.com>.
The classifier is an optional extension to the project coordinate --
groupId:artifact:[classifier:]version. Unless your project needs noe
(specified in the packaging plugin configuration, such as jar:jar), its not
required. You can put in null.


On 11/22/06, Ole Ersoy <ol...@yahoo.com> wrote:
>
> Hi Eric,
>
> I'm writing an RPM mojo for the JPackage project.
>
> The JPackagers would put the artifactId, groupId, and
> version of the project they want to package in a
> configuration file.
>
> This lets the mojo know what project they want to
> package.
>
> So the mojo reads those parameters from the
> configuration file and loads the corresponding POM
> in the repository.
>
> Tom (Authored the Cookbook section) pointed me to the
> Mojo Cookbook on the wiki where I found this:
>
> artifact =
> factory.createArtifactWithClassifier(groupId,
> artifactId, version, type, classifier);
>
> That seems like an elegant way to create the
> java.io.File that represents the POM.
>
> (He said just put "pom" for the type...but what about
> classifier?)
>
> Once I have the file I can just get the path, and pass
> that to my resource loader.
>
> I'm guessing the classifier is the DocumentRoot for
> the POM...but
> the DefaultArtifactFactory in subversion has 0 api
> documentation...so I'd probably have to date the class
> for a while before I get any love.
>
> wdyt?
>
> Thanks,
> - Ole
>
> --- Eric Redmond <er...@gmail.com> wrote:
>
> > I'm not sure what you mean here... do you mean how
> > to configure a project's
> > classifier in the POM? Are you building an artifact
> > with a classifier, or
> > are you trying to get one as a dependency?
> >
> > Eric
> >
> > On 11/22/06, Ole Ersoy <ol...@yahoo.com> wrote:
> > >
> > > Hi,
> > >
> > > Could someone please give me an idea of how to go
> > > about
> > > setting the classifier in (Is there a documented
> > API
> > > for this?):
> > >
> > > artifact =
> > > factory.createArtifactWithClassifier(groupId,
> > > artifactId, version, type, classifier);
> > >
> > > Thanks again,
> > > - Ole
> > >
> > >
> > >
> > >
> > >
> >
>
> ____________________________________________________________________________________
> > > Sponsored Link
> > >
> > > Rates near 39yr lows. $420,000 Loan for $1399/mo.
> > > Calcuate new payment. www.LowerMyBills.com/lre
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail:
> > users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Eric Redmond
> > http://codehaus.org/~eredmond
> >
>
>
>
>
>
> ____________________________________________________________________________________
> Yahoo! Music Unlimited
> Access over 1 million songs.
> http://music.yahoo.com/unlimited
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Eric Redmond
http://codehaus.org/~eredmond

Re: Loading a POM Artifact

Posted by Ole Ersoy <ol...@yahoo.com>.
Hi Eric,

I'm writing an RPM mojo for the JPackage project.

The JPackagers would put the artifactId, groupId, and
version of the project they want to package in a
configuration file.

This lets the mojo know what project they want to
package.

So the mojo reads those parameters from the
configuration file and loads the corresponding POM
in the repository.

Tom (Authored the Cookbook section) pointed me to the
Mojo Cookbook on the wiki where I found this:

artifact =
factory.createArtifactWithClassifier(groupId,
artifactId, version, type, classifier);

That seems like an elegant way to create the
java.io.File that represents the POM.

(He said just put "pom" for the type...but what about
classifier?)

Once I have the file I can just get the path, and pass
that to my resource loader.

I'm guessing the classifier is the DocumentRoot for
the POM...but 
the DefaultArtifactFactory in subversion has 0 api
documentation...so I'd probably have to date the class
for a while before I get any love.

wdyt?

Thanks,
- Ole

--- Eric Redmond <er...@gmail.com> wrote:

> I'm not sure what you mean here... do you mean how
> to configure a project's
> classifier in the POM? Are you building an artifact
> with a classifier, or
> are you trying to get one as a dependency?
> 
> Eric
> 
> On 11/22/06, Ole Ersoy <ol...@yahoo.com> wrote:
> >
> > Hi,
> >
> > Could someone please give me an idea of how to go
> > about
> > setting the classifier in (Is there a documented
> API
> > for this?):
> >
> > artifact =
> > factory.createArtifactWithClassifier(groupId,
> > artifactId, version, type, classifier);
> >
> > Thanks again,
> > - Ole
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Sponsored Link
> >
> > Rates near 39yr lows. $420,000 Loan for $1399/mo.
> > Calcuate new payment. www.LowerMyBills.com/lre
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> users-help@maven.apache.org
> >
> >
> 
> 
> -- 
> Eric Redmond
> http://codehaus.org/~eredmond
> 



 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited

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


Re: Loading a POM Artifact

Posted by Eric Redmond <er...@gmail.com>.
I'm not sure what you mean here... do you mean how to configure a project's
classifier in the POM? Are you building an artifact with a classifier, or
are you trying to get one as a dependency?

Eric

On 11/22/06, Ole Ersoy <ol...@yahoo.com> wrote:
>
> Hi,
>
> Could someone please give me an idea of how to go
> about
> setting the classifier in (Is there a documented API
> for this?):
>
> artifact =
> factory.createArtifactWithClassifier(groupId,
> artifactId, version, type, classifier);
>
> Thanks again,
> - Ole
>
>
>
>
> ____________________________________________________________________________________
> Sponsored Link
>
> Rates near 39yr lows. $420,000 Loan for $1399/mo.
> Calcuate new payment. www.LowerMyBills.com/lre
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Eric Redmond
http://codehaus.org/~eredmond