You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nitko2 <ni...@gmail.com> on 2005/12/19 12:42:26 UTC

Install artifact

Hi.

Can someone tell me how InstallMojo knows what artifact should be installed? Or even better, how can 
I tell InstallMojo what file is result of my build process, and therefor should be installed?


Thanks, Filip

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


Re: Install artifact

Posted by Nitko2 <ni...@gmail.com>.
I'd like to declare it in the pom.
Anyway, I looked at CompilerMojo and JarMojo code and I don't like what I saw. For instance, 
CompilerMojo sets artifact file to target/classes directory. After that JarMojo or WarMojo uses that 
information to create war/jar and sets artifact file it to war/jar. It isn't very transparent 
and(again in my opinion) is misuse of artifact file parameter. In my opinion it would be better that 
artifact file points to build.finalName (or some other parameter) by default. Than I could override 
this using
project.getArtifact().setFile( .... );

Filip




Wim Deblauwe wrote:
> What do you mean? I think it is easy this way. How else could you do it?
> 
> Wim
> 
> 2005/12/19, Nitko2 <ni...@gmail.com>:
> 
>>Wim, thank you for your answer.
>>It's strange that I have to write code for such trivial functionality.
>>
>>
>>
>>
>>
>>Wim Deblauwe wrote:
>>
>>>See
>>>
>>
>>http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.htmlunder
>>
>>>"specifying a new packaging".
>>>
>>>You need to do this:
>>>
>>>project.getArtifact().setFile( new File( "target/myFile-2.0.jar" ) );
>>>
>>>regards,
>>>
>>>Wim
>>>
>>>
>>>
>>>2005/12/19, Nitko2 <ni...@gmail.com>:
>>>
>>>
>>>>Hi.
>>>>
>>>>Can someone tell me how InstallMojo knows what artifact should be
>>>>installed? Or even better, how can
>>>>I tell InstallMojo what file is result of my build process, and therefor
>>>>should be installed?
>>>>
>>>>
>>>>Thanks, Filip
>>>>
>>>>---------------------------------------------------------------------
>>>>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
>>
>>
> 
> 

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


Re: Install artifact

Posted by Wim Deblauwe <wi...@gmail.com>.
What do you mean? I think it is easy this way. How else could you do it?

Wim

2005/12/19, Nitko2 <ni...@gmail.com>:
>
> Wim, thank you for your answer.
> It's strange that I have to write code for such trivial functionality.
>
>
>
>
>
> Wim Deblauwe wrote:
> > See
> >
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.htmlunder
> > "specifying a new packaging".
> >
> > You need to do this:
> >
> > project.getArtifact().setFile( new File( "target/myFile-2.0.jar" ) );
> >
> > regards,
> >
> > Wim
> >
> >
> >
> > 2005/12/19, Nitko2 <ni...@gmail.com>:
> >
> >>Hi.
> >>
> >>Can someone tell me how InstallMojo knows what artifact should be
> >>installed? Or even better, how can
> >>I tell InstallMojo what file is result of my build process, and therefor
> >>should be installed?
> >>
> >>
> >>Thanks, Filip
> >>
> >>---------------------------------------------------------------------
> >>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: Install artifact

Posted by Nitko2 <ni...@gmail.com>.
Wim, thank you for your answer.
It's strange that I have to write code for such trivial functionality.





Wim Deblauwe wrote:
> See
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.htmlunder
> "specifying a new packaging".
> 
> You need to do this:
> 
> project.getArtifact().setFile( new File( "target/myFile-2.0.jar" ) );
> 
> regards,
> 
> Wim
> 
> 
> 
> 2005/12/19, Nitko2 <ni...@gmail.com>:
> 
>>Hi.
>>
>>Can someone tell me how InstallMojo knows what artifact should be
>>installed? Or even better, how can
>>I tell InstallMojo what file is result of my build process, and therefor
>>should be installed?
>>
>>
>>Thanks, Filip
>>
>>---------------------------------------------------------------------
>>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: Install artifact

Posted by Wim Deblauwe <wi...@gmail.com>.
See
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.htmlunder
"specifying a new packaging".

You need to do this:

project.getArtifact().setFile( new File( "target/myFile-2.0.jar" ) );

regards,

Wim



2005/12/19, Nitko2 <ni...@gmail.com>:
>
> Hi.
>
> Can someone tell me how InstallMojo knows what artifact should be
> installed? Or even better, how can
> I tell InstallMojo what file is result of my build process, and therefor
> should be installed?
>
>
> Thanks, Filip
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>