Geoffery,

I have been using ant that does the same thing you are basically asking
for.  Saves me from some fat-fingering one of the arguements.

<target name="mvn_install" description="Installs a jar into the maven
repository, useful for jars not available at ibiblio">

    <input message="What is the path to the file to be installed?"
addproperty="install.file" />
    <input message="What is the groupId?" addproperty="install.groupId" />
    <input message="What is the artifactId?" addproperty="install.artifactId"
/>
    <input message="What is the version?" addproperty="install.version" />

    <exec executable="cmd.exe" dir="." spawn="false">
        <arg line="/c mvn install:install-file" />
        <arg line="-Dfile=${install.file}" />
        <arg line="-DgroupId=${install.groupId}" />
        <arg line="-DartifactId=${install.artifactId}" />
        <arg line="-Dversion=${install.version}" />
        <arg line="-Dpackaging=jar" />
        <arg line="-DgeneratePom=true" />
    </exec>

</target>

-Greg Case

On 1/12/06, Geoffrey <[EMAIL PROTECTED]> wrote:
>
> Nice work :)
>
> I 've been anticipating deploy:deploy-file a while,
> to upload new jars to my internal repository.
>
> Still, to use it I need to copy paste a long command (with -Dfile etc).
> It would be nice if it works with command line input, like archetype:
>
> > mvn deploy:deploy-file-cmd-line-input
> What artifact?
> > hello.jar
> Which version?
> > 1.1
> Which type? [default: jar]
> >
> Do you want to create a pom? yes/no [default: no]
> hello.jar uploaded.
>
> With kind regards,
> Geoffrey De Smet
>
>

Reply via email to