how to copy jar (also) to target installation dir

2009-11-22 Thread eyal edri
I want to config the pom project to copy the final jar file to an
installation dir and bind it to the 'install' phase.

meaning, when i "just" build the project, the jar will be built into the
default target/project.jar.

but when i "install" it should be also should be copied to
/usr/local/application/project.jar.

i tried adding " in the 'jar' plugin, but it just changed
the default target.

-- 
Eyal Edri


Re: how to copy jar (also) to target installation dir

2009-11-22 Thread Stephen Connolly
your best bet is to bind an execution of the antrun plugin to the  
install phase and use the ant copy task to copy the file for you


Sent from my [rhymes with tryPod] ;-)

On 22 Nov 2009, at 13:43, eyal edri  wrote:


I want to config the pom project to copy the final jar file to an
installation dir and bind it to the 'install' phase.

meaning, when i "just" build the project, the jar will be built into  
the

default target/project.jar.

but when i "install" it should be also should be copied to
/usr/local/application/project.jar.

i tried adding " in the 'jar' plugin, but it just  
changed

the default target.

--
Eyal Edri


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



Re: how to copy jar (also) to target installation dir

2009-11-22 Thread Sony Antony
It should work with the antrun plugin ( and ant's  task. )

( configure an antrun plugin execution to attach to install phase )

--sony

On Sun, Nov 22, 2009 at 8:43 AM, eyal edri  wrote:

> I want to config the pom project to copy the final jar file to an
> installation dir and bind it to the 'install' phase.
>
> meaning, when i "just" build the project, the jar will be built into the
> default target/project.jar.
>
> but when i "install" it should be also should be copied to
> /usr/local/application/project.jar.
>
> i tried adding " in the 'jar' plugin, but it just changed
> the default target.
>
> --
> Eyal Edri
>


Re: how to copy jar (also) to target installation dir

2009-11-23 Thread eyal edri
Maven says that antrun copy corresponds to "maven-resource-plugin",

(from http://maven.apache.org/plugins/maven-antrun-plugin/usage.html).

Can i use the maven-resources-plugin instead?

i'm already using it to copy conf & cron files:

 
maven-resources-plugin
2.4.1

  
copy-conf
install

  copy-resources



/etc/ct-urlf-increase-priority/
  

  src/main/resources
  true
  
**/*.properties
  

  

  
  

i just thought it's not intended to copy jars also resources...

Eyal.


On Sun, Nov 22, 2009 at 4:21 PM, Sony Antony  wrote:

> It should work with the antrun plugin ( and ant's  task. )
>
> ( configure an antrun plugin execution to attach to install phase )
>
> --sony
>
> On Sun, Nov 22, 2009 at 8:43 AM, eyal edri  wrote:
>
> > I want to config the pom project to copy the final jar file to an
> > installation dir and bind it to the 'install' phase.
> >
> > meaning, when i "just" build the project, the jar will be built into the
> > default target/project.jar.
> >
> > but when i "install" it should be also should be copied to
> > /usr/local/application/project.jar.
> >
> > i tried adding " in the 'jar' plugin, but it just
> changed
> > the default target.
> >
> > --
> > Eyal Edri
> >
>



-- 
Eyal Edri


Re: how to copy jar (also) to target installation dir

2009-11-23 Thread Stephen Connolly
technically, yes... but you'll be fighting with the standard bindings.

what you are trying to do is not "the maven way" so your best bet is
to just use antrun and 

2009/11/23 eyal edri :
> Maven says that antrun copy corresponds to "maven-resource-plugin",
>
> (from http://maven.apache.org/plugins/maven-antrun-plugin/usage.html).
>
> Can i use the maven-resources-plugin instead?
>
> i'm already using it to copy conf & cron files:
>
>  
>        maven-resources-plugin
>        2.4.1
>        
>          
>            copy-conf
>            install
>            
>              copy-resources
>            
>            
>
> /etc/ct-urlf-increase-priority/
>              
>                
>                  src/main/resources
>                  true
>                  
>                    **/*.properties
>                  
>                
>              
>            
>          
>          
>
> i just thought it's not intended to copy jars also resources...
>
> Eyal.
>
>
> On Sun, Nov 22, 2009 at 4:21 PM, Sony Antony  wrote:
>
>> It should work with the antrun plugin ( and ant's  task. )
>>
>> ( configure an antrun plugin execution to attach to install phase )
>>
>> --sony
>>
>> On Sun, Nov 22, 2009 at 8:43 AM, eyal edri  wrote:
>>
>> > I want to config the pom project to copy the final jar file to an
>> > installation dir and bind it to the 'install' phase.
>> >
>> > meaning, when i "just" build the project, the jar will be built into the
>> > default target/project.jar.
>> >
>> > but when i "install" it should be also should be copied to
>> > /usr/local/application/project.jar.
>> >
>> > i tried adding " in the 'jar' plugin, but it just
>> changed
>> > the default target.
>> >
>> > --
>> > Eyal Edri
>> >
>>
>
>
>
> --
> Eyal Edri
>

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