Thanks Martin.
I want a File object or a path to the project's target artifact.
I have managed to calculate the target artifact myself using
project.getArtifact() and project.getBuild().getOutputDirectory() but
thought that there may be a simple and more robust API that I haven't
noticed.
I'm writing a plugin that assembles certain artifacts into one zip so
they may be easily installed on another machine.
I need this in order to have downloadables for certain open source
projects, and thus enable users, without using maven repositories, to
download a library artifact and its dependencies in a simple manner. The
zip will also contain scripts to install the artifacts into the local
repo.
 

-----Original Message-----
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2008 3:04 PM
To: Maven Users List
Subject: Re: Maven plugin API - how do I find the File for the artifact
of current project?

Good Morning Daniel-

org.apache.maven.model.Build has no accessors/mutators or methods which
manipulate Artifact

the getArtifact() method is present in 2.0.x version of
org.apache.maven.project.MavenProject.java
  public Artifact getArtifact()
    {
        return artifact;
    }
e.g.
org.apache.maven.project.MavenProject project = new
org.apache.maven.project.MavenProject();
Artifact artifact=project.getArtifact();

We could provide more assistance if you could tell us what you're
attempting
to accomplish

Martin--
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, March 05, 2008 7:15 AM
Subject: Maven plugin API - how do I find the File for the artifact of
current project?



Hi.
I looked for all kinds of APIs in org.apache.maven.project.MavenProject
but did not find any API to give me the file/filename for the build's
output artifact.
The project.getArtifact() returns an Artifact object that describes the
artifact. I can use it to calculate what is the artifact, but there must
be a simpler way to get it.
Also, the Build object returned by project.getBuild() has no such
method.

Thanks for your answers ...

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to