Because I'm such a nice guy :), here is a ruby script to install all jars in
a given directory to Maven. Just ensure there are no spaces in your
directory path.

Eric

----- BEGIN SCRIPT -----
# Set the MVN SCRIPT
# Eric Redmond / Propellors.net

MVN_SCRIPT = "C:/maven-2.1-SNAPSHOT/bin/mvn.bat"
VERSION = "1"

def install_jars( base_dir_name, group_id )
    gid_set = !group_id.nil?
    Dir.foreach( base_dir_name ) { |file_name|
        next unless file_name =~ /\.jar$/
        artifact_id = file_name.sub(/.jar$/, '')
        group_id = gid_set ? group_id : artifact_id
        file_name = "#{base_dir_name}/#{file_name}"
        puts
system("#{MVN_SCRIPT}","install:install-file","-DgroupId=#{group_id}","-DartifactId=#{artifact_id}","-Dversion=#{VERSION}","-Dpackaging=jar","-Dfile=#{file_name}")
    }
end

begin
    bdir, gid = ARGV[0],ARGV[1] unless ARGV[0].nil?&&(puts "usage:
install_jars.rb <BASE_DIR_WITH_JARS> [GROUP_ID]")|exit
    install_jars( bdir, gid )
end
------ END SCRIPT ------


On 4/5/06, Julio Oliveira <[EMAIL PROTECTED]> wrote:
>
> ok Wayne
>
> I think it will be modified .....
>
>
> But how to do the site without compile,   site:site doesn't work
>
> regards
>
>
> On 4/5/06, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > On 4/5/06, Julio Oliveira <[EMAIL PROTECTED]> wrote:
> > >
> > > For #1 what if i have 100 .jars  have i to do it one by one... or is
> > > there any tip to do in a one line ( take all a folder with the 100
> > > .jar's )
> > >
> >
> > Yes, one by one. So 100 will take a while. Have fun.
> >
> > Wayne
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to