truezip-maven-plugin's at mojo sandbox allows you to copy a particular
file out of archive without unpack the whole thing,  give it a shot!!

-D

On Tue, Oct 21, 2008 at 12:35 PM, is_maximum <[EMAIL PROTECTED]> wrote:
>
>
>
> David Blevins wrote:
>>
>>
>> On Oct 21, 2008, at 5:38 AM, David Blevins wrote:
>>
>>
>> Just read this email a little closer and realized you are talking
>> about an offline scenario where all you have is an openejb zip file.
>>
>> Yea, in that scenario it would be nice if maven had an easy way to put
>> the files back into the repo for all the jars created via maven.  The
>> install:install-file mojo doesn't seem to have any smarts for when the
>> jar happens to have been built by maven.  It would be nice if it did.
>>
>> Till then this will get you pretty close.  Execute this from the
>> openejb/lib/ dir.
>>
>> ---------------------
>> #!/bin/bash
>>
>> for jar in *.jar; do
>>      pom=$(jar tvf $jar | grep pom.xml | perl -pe 's,.* ,,')
>>      props=$(jar tvf $jar | grep pom.properties | perl -pe 's,.* ,,')
>>
>>      if [ -n "$pom" ]; then
>>       jar xvf $jar $pom $props
>>       source $props
>>       mvn install:install-file -DgroupId=$groupId -DartifactId=$artifactId -
>> Dversion=$version -Dpackaging=jar -Dfile=$jar
>>       mvn install:install-file -DgroupId=$groupId -DartifactId=$artifactId -
>> Dversion=$version -Dpackaging=pom -Dfile=$pom
>>      else
>>       echo "must install manually $jar"
>>      fi
>> done | tee install.log
>> ---------------------
>>
>> Would be nice if there was a mojo that would look for these files in
>> the artifact and use the data there, if present.  Then all you'd need
>> to do is this:
>>
>> ---------------------
>> #!/bin/bash
>>
>> for jar in *.jar; do
>>      mvn install:install-artifact -Dfile=$jar
>> done | tee install.log
>> ---------------------
>>
>>
>> Anyway, hope this helps a bit more.
>>
>> -David
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> Thanks David, yes I meant in offline computers. and the approaches you said
> seems to be very great, I'll check it later. but it would be nice if they
> embed this in maven
> anyway, thanks and I will check your solution.
>
> -----
> --
> Regards
>
> Mohammad Norouzi
>
> Help each other to reach the future faster
>
> http://pixelshot.wordpress.com Pixelshot Photoblog
>
> http://brainable.blogspot.com Brainable Blog
>
>
> --
> View this message in context: 
> http://www.nabble.com/deploying-JAR-file-using-the-pom.xml-inside-the-JAR-tp20087846p20097840.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]

Reply via email to