You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jonathan Gold <jg...@gmail.com> on 2009/12/12 02:15:37 UTC

Help understanding install:install-file and -Dsources or -Djavadoc

Based on what I read in the install-file doc here:

    http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html

I was under the impression that the following command line would install local
binary, javadoc, and source jars:

    mvn install:install-file \
        -DgroupId=com.group \
        -DartifactId=foo \
        -Dversion=1.0 \
        -DgeneratePom=true \
        -Dfile=foo.jar \
        -Dsources=foo-sources.jar \
        -Djavadoc=foo-javadoc.jar \
        -Dpackaging=jar

would install all three jars in my local repository. I found that it only
installed the main one (-Dfile). When I ran with --debug, I saw that the
-Dsources and -Djavadoc values didn't even appear to be read at all by the
install mojo.

I searched through the JIRA issues for install, and saw one from 2008 (maybe
2006) in which the -Dclassifier option was added, and I can in fact run three
different invocations, one for each classifier (none/default, sources, and
javadoc) and pointing -Dfile at the appropriate jar. It would be nicer to make
it all work in the single command line though, so can anyone see if I'm missing
something?

Thanks mavenites,

jon

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


Re: Help understanding install:install-file and -Dsources or -Djavadoc

Posted by Anders Hammar <an...@hammar.net>.
I believe the help plugin shows the wrong version. There was a discussion
around this some time ago. You're most likely using v2.2.
Best-practise is however to always pin down the version of your plugins.

/Anders

On Wed, Dec 30, 2009 at 19:32, Jonathan Gold <jg...@gmail.com> wrote:

> Anders --
>
> Thanks for the response. I'm just turning back to this now, and am not sure
> what
> version I'm using. According to:
>
>    mvn help:describe -Dplugin=install
>
> I'm using version 2.3:
>
>    [INFO] Scanning for projects...
>
>    [INFO] Searching repository for plugin with prefix: 'help'.
>    [INFO]
> ------------------------------------------------------------------------
>    [INFO] Building Maven Default Project
>    [INFO]    task-segment: [help:describe] (aggregator-style)
>    [INFO]
> ------------------------------------------------------------------------
>    [INFO] [help:describe {execution: default-cli}]
>    [INFO] org.apache.maven.plugins:maven-install-plugin:2.3
>
>    Name: Maven Install Plugin
>    Description: Copies the project artifacts to the user's local
> repository.
>    Group Id: org.apache.maven.plugins
>    Artifact Id: maven-install-plugin
>    Version: 2.3
>    Goal Prefix: install
>
>    This plugin has 3 goals:
>
>    install:help
>      Description: Display help information on maven-install-plugin.
>        Call
>         mvn install:help -Ddetail=true -Dgoal=<goal-name>
>        to display parameter details.
>      Deprecated. No reason given
>
>    install:install
>      Description: Installs the project's main artifact in the local
> repository.
>      Deprecated. No reason given
>
>    install:install-file
>      Description: Installs a file in the local repository.
>      Deprecated. No reason given
>
>    For more information, run 'mvn help:describe [...] -Ddetail'
>
>    [INFO]
> ------------------------------------------------------------------------
>    [INFO] BUILD SUCCESSFUL
>    [INFO]
> ------------------------------------------------------------------------
>    [INFO] Total time: 3 seconds
>    [INFO] Finished at: Wed Dec 30 10:28:30 PST 2009
>    [INFO] Final Memory: 11M/27M
>    [INFO]
> ------------------------------------------------------------------------
>
> But, running
>
>    mvn install:help -Ddetail=true -Dgoal=install-file
>
> the error seems to indicate that I'm using 2.2:
>
>    [INFO] Scanning for projects...
>
>    [INFO] Searching repository for plugin with prefix: 'install'.
>    [INFO]
> ------------------------------------------------------------------------
>    [ERROR] BUILD FAILURE
>    [INFO]
> ------------------------------------------------------------------------
>    [INFO] Required goal not found: install:help in
> org.apache.maven.plugins:maven-install-plugin:2.2
>    [INFO]
> ------------------------------------------------------------------------
>    [INFO] For more information, run Maven with the -e switch
>    [INFO]
> ------------------------------------------------------------------------
>    [INFO] Total time: < 1 second
>    [INFO] Finished at: Wed Dec 30 10:31:14 PST 2009
>    [INFO] Final Memory: 3M/8M
>    [INFO]
> ------------------------------------------------------------------------
>
> Any ideas on the discrepancy?
>
> jon
>
> On Sat, Dec 12, 2009 at 12:02:51PM +0100, Anders Hammar wrote:
> > What version of the plugin are you using? sources and javadoc params were
> > added in v2.3.
> >
> > /Anders
> >
> > On Sat, Dec 12, 2009 at 02:15, Jonathan Gold <jg...@gmail.com> wrote:
> >
> > > Based on what I read in the install-file doc here:
> > >
> > >
> > >
> http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html
> > >
> > > I was under the impression that the following command line would
> install
> > > local
> > > binary, javadoc, and source jars:
> > >
> > >    mvn install:install-file \
> > >        -DgroupId=com.group \
> > >        -DartifactId=foo \
> > >        -Dversion=1.0 \
> > >        -DgeneratePom=true \
> > >        -Dfile=foo.jar \
> > >        -Dsources=foo-sources.jar \
> > >        -Djavadoc=foo-javadoc.jar \
> > >        -Dpackaging=jar
> > >
> > > would install all three jars in my local repository. I found that it
> only
> > > installed the main one (-Dfile). When I ran with --debug, I saw that
> the
> > > -Dsources and -Djavadoc values didn't even appear to be read at all by
> the
> > > install mojo.
> > >
> > > I searched through the JIRA issues for install, and saw one from 2008
> > > (maybe
> > > 2006) in which the -Dclassifier option was added, and I can in fact run
> > > three
> > > different invocations, one for each classifier (none/default, sources,
> and
> > > javadoc) and pointing -Dfile at the appropriate jar. It would be nicer
> to
> > > make
> > > it all work in the single command line though, so can anyone see if I'm
> > > missing
> > > something?
> > >
> > > Thanks mavenites,
> > >
> > > jon
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Help understanding install:install-file and -Dsources or -Djavadoc

Posted by Jonathan Gold <jg...@gmail.com>.
Anders --

Thanks for the response. I'm just turning back to this now, and am not sure what
version I'm using. According to:

    mvn help:describe -Dplugin=install

I'm using version 2.3:
    
    [INFO] Scanning for projects...
    
    [INFO] Searching repository for plugin with prefix: 'help'.
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Maven Default Project
    [INFO]    task-segment: [help:describe] (aggregator-style)
    [INFO] ------------------------------------------------------------------------
    [INFO] [help:describe {execution: default-cli}]
    [INFO] org.apache.maven.plugins:maven-install-plugin:2.3
    
    Name: Maven Install Plugin
    Description: Copies the project artifacts to the user's local repository.
    Group Id: org.apache.maven.plugins
    Artifact Id: maven-install-plugin
    Version: 2.3
    Goal Prefix: install
    
    This plugin has 3 goals:
    
    install:help
      Description: Display help information on maven-install-plugin.
        Call
         mvn install:help -Ddetail=true -Dgoal=<goal-name>
        to display parameter details.
      Deprecated. No reason given
    
    install:install
      Description: Installs the project's main artifact in the local repository.
      Deprecated. No reason given
    
    install:install-file
      Description: Installs a file in the local repository.
      Deprecated. No reason given
    
    For more information, run 'mvn help:describe [...] -Ddetail'
    
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3 seconds
    [INFO] Finished at: Wed Dec 30 10:28:30 PST 2009
    [INFO] Final Memory: 11M/27M
    [INFO] ------------------------------------------------------------------------

But, running

    mvn install:help -Ddetail=true -Dgoal=install-file

the error seems to indicate that I'm using 2.2:

    [INFO] Scanning for projects...
    
    [INFO] Searching repository for plugin with prefix: 'install'.
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Required goal not found: install:help in org.apache.maven.plugins:maven-install-plugin:2.2
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: < 1 second
    [INFO] Finished at: Wed Dec 30 10:31:14 PST 2009
    [INFO] Final Memory: 3M/8M
    [INFO] ------------------------------------------------------------------------

Any ideas on the discrepancy?

jon

On Sat, Dec 12, 2009 at 12:02:51PM +0100, Anders Hammar wrote:
> What version of the plugin are you using? sources and javadoc params were
> added in v2.3.
> 
> /Anders
> 
> On Sat, Dec 12, 2009 at 02:15, Jonathan Gold <jg...@gmail.com> wrote:
> 
> > Based on what I read in the install-file doc here:
> >
> >
> > http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html
> >
> > I was under the impression that the following command line would install
> > local
> > binary, javadoc, and source jars:
> >
> >    mvn install:install-file \
> >        -DgroupId=com.group \
> >        -DartifactId=foo \
> >        -Dversion=1.0 \
> >        -DgeneratePom=true \
> >        -Dfile=foo.jar \
> >        -Dsources=foo-sources.jar \
> >        -Djavadoc=foo-javadoc.jar \
> >        -Dpackaging=jar
> >
> > would install all three jars in my local repository. I found that it only
> > installed the main one (-Dfile). When I ran with --debug, I saw that the
> > -Dsources and -Djavadoc values didn't even appear to be read at all by the
> > install mojo.
> >
> > I searched through the JIRA issues for install, and saw one from 2008
> > (maybe
> > 2006) in which the -Dclassifier option was added, and I can in fact run
> > three
> > different invocations, one for each classifier (none/default, sources, and
> > javadoc) and pointing -Dfile at the appropriate jar. It would be nicer to
> > make
> > it all work in the single command line though, so can anyone see if I'm
> > missing
> > something?
> >
> > Thanks mavenites,
> >
> > jon
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >

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


Re: Help understanding install:install-file and -Dsources or -Djavadoc

Posted by Anders Hammar <an...@hammar.net>.
What version of the plugin are you using? sources and javadoc params were
added in v2.3.

/Anders

On Sat, Dec 12, 2009 at 02:15, Jonathan Gold <jg...@gmail.com> wrote:

> Based on what I read in the install-file doc here:
>
>
> http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html
>
> I was under the impression that the following command line would install
> local
> binary, javadoc, and source jars:
>
>    mvn install:install-file \
>        -DgroupId=com.group \
>        -DartifactId=foo \
>        -Dversion=1.0 \
>        -DgeneratePom=true \
>        -Dfile=foo.jar \
>        -Dsources=foo-sources.jar \
>        -Djavadoc=foo-javadoc.jar \
>        -Dpackaging=jar
>
> would install all three jars in my local repository. I found that it only
> installed the main one (-Dfile). When I ran with --debug, I saw that the
> -Dsources and -Djavadoc values didn't even appear to be read at all by the
> install mojo.
>
> I searched through the JIRA issues for install, and saw one from 2008
> (maybe
> 2006) in which the -Dclassifier option was added, and I can in fact run
> three
> different invocations, one for each classifier (none/default, sources, and
> javadoc) and pointing -Dfile at the appropriate jar. It would be nicer to
> make
> it all work in the single command line though, so can anyone see if I'm
> missing
> something?
>
> Thanks mavenites,
>
> jon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>