I guess I meant to say I want to run:
  $mvn -P init

to run an init profile (I understand about build life cycles and do not want
to write a new one)
but rather want to type $mvn -P init

and have specific already built .jar files in /lib/*.jar to be installed
into my local repo.  These jars are not available in any public maven
repository.

thanks

jvsrvcs


Tim O'Brien wrote:
> 
> On Wed, Jul 29, 2009 at 6:06 PM, jvsrvcs<[email protected]> wrote:
>>
>>
>> I want to create a maven profile called "init", such
>> that a person would type:   $mvn init
> 
> This won't work, Maven has a lifecycle that consists of phases when
> you execute "mvn init", Maven is going to complain because there is no
> "init" phase.   What you need to do is configure a goal execution to
> execute during one of the phases in the Maven build lifecycle:
> 
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
> 
>>
>> and this profile would take jars from the lib/ directory
>> (on the same level as the pom.xml)
>> and install every jar in the lib (and subdirectories)
>> into the local maven repo only.
>>
> 
> You are looking to use the Maven Install plugin, but take a step back
> before you decide to do this with Maven.   The goal you want to run is
> here:
> http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html
> - but Maven isn't going to be able to traverse the lib directory and
> deploy every single file recursively.    It wasn't designed to do
> this, and my advice is not to attempt to try to get Maven to do this.
>  One Maven project, produces one artifact.
> 
> Do this using the Maven Ant Tasks, better yet... do this with a Groovy
> script that calls out to the Maven Ant Tasks.
> 
>> I have many docs on maven profiles, but no good
>> examples on integrating that with another plugin
>> where I could use XML (pom.xml) to configure and install
>> jars to the local repo.
>>
>> if anyone has done this and has a code sample
>> they can post please send.  I have read all
>> the docs that are available on the subject
>> and do not need to be pointed there
>> as I have read and googled all the
>> documentation for about 3 hrs with
>> no resolution.
>>
>> What I am looking for is the ability to type
>>        $mvn init
>>
>> and have all jars under lib/ get installed to
>> the local maven repo (and all /lib/<dir>/*.jar
>> and so on.
>>
>> thank you for your assistance
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-install-jars-into-local-maven-repo-%28with-%24mvn-%3Ctarget%3E%29---want-to-configure-init-profile-in-pom.xml-tp24729720p24729720.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-install-jars-into-local-maven-repo-%28with-%24mvn-%3Ctarget%3E%29---want-to-configure-init-profile-in-pom.xml-tp24729720p24739591.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to