You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mikkel Jensen <di...@gmail.com> on 2006/11/08 12:43:32 UTC

How to upload 3rd party source jars to external repository

How can I upload 3rd party source jars to an external repository?
Using the webdav plugin I am able to upload standard bytecode jars like this:

mvn deploy:deploy-file -DgroupId=<group-id>
                       -DartifactId=<artifact-id>
                       -Dversion=<version>
                       -Dfile=<path-to-file>
                       -Dpackaging=jar
                       -DrepositoryId=<repository-id>
                       -Durl=dav:http://www.myrepository.com/m2

But I cant find any mention of source jars (or javadoc jars for that matter)!

Any pointers?

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


Re: How to upload 3rd party source jars to external repository

Posted by Sanjiv Jivan <sa...@gmail.com>.
Can the maven docs be updated to reflect this useful piece of information.

Thanks,
Sanjiv

On 11/8/06, Wayne Fay <wa...@gmail.com> wrote:
>
> Give this a try... Use that same command, but add -Dclassifier=sources
> or -Dclassifier=javadoc as appropriate. I'm reasonably certain that
> will work.
>
> Wayne

Re: How to upload 3rd party source jars to external repository

Posted by Christofer Jennings <bo...@gmail.com>.
It seems to work if I set -DgeneratePom=true

On 11/15/06, Christofer Jennings <bo...@gmail.com> wrote:
>
> I'm having trouble using deploy:deploy-file to upload sources and javadoc
> too. I've set up an internal repository via SCP and have uploaded DWR
> version 2.0m4 to it. When I use the mvn command below for either the
> javadoc or sources jar, I get the NullPointerException.
>
> Am I using the command correctly?
>
> Thanks in advance!
> ,chris
>
>
> mvn deploy:deploy-file \
>    -DgroupId=dwr \
>    -DartifactId=dwr \
>    -Dversion=2.0m4 \
>    -Dpackaging=jar \
>    -DgeneratePom=false \
>    -Dclassifier=javadoc \
>    -Dfile=dwr-2.0m4-javadoc.jar \
>    -DrepositoryId=my.org-repository \
>    -Durl=scp://my.org/repository
>
>
>
> =========================================
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'deploy'.
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Building Maven Default Project
> [INFO]    task-segment: [deploy:deploy-file] (aggregator-style)
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] [deploy:deploy-file]
> Uploading: scp://my.org/repository/dwr/dwr/2.0m4/dwr-2.0m4-javadoc.jar
> 1134K uploaded
> [INFO] Retrieving previous metadata from my.org-repository
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] null
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
>         at java.io.FileInputStream.<init>(FileInputStream.java:103)
>         at java.io.FileReader.<init>(FileReader.java:55)
>         at
> org.apache.maven.project.artifact.ProjectArtifactMetadata.storeInLocalRepository(
> ProjectArtifactMetadata.java:89)
>         at
> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.deploy(
> DefaultRepositoryMetadataManager.java:420)
>         at
> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy (
> DefaultArtifactDeployer.java:83)
>         at org.apache.maven.plugin.deploy.DeployFileMojo.execute (
> DeployFileMojo.java:236)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java :412)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java :534)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
> DefaultLifecycleExecutor.java :488)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> (DefaultLifecycleExecutor.java :458)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java :306)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (
> DefaultLifecycleExecutor.java:219)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java :140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke (
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke (Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
>         at org.codehaus.classworlds.Launcher.launch (Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode (
> Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 9 seconds
> [INFO] Finished at: Mon Oct 09 16:48:17 PDT 2006
> [INFO] Final Memory: 3M/5M
> [INFO]
> ------------------------------------------------------------------------
>

Re: How to upload 3rd party source jars to external repository

Posted by Christofer Jennings <bo...@gmail.com>.
I'm having trouble using deploy:deploy-file to upload sources and javadoc
too. I've set up an internal repository via SCP and have uploaded DWR
version 2.0m4 to it. When I use the mvn command below for either the javadoc
or sources jar, I get the NullPointerException.

Am I using the command correctly?

Thanks in advance!
,chris


mvn deploy:deploy-file \
   -DgroupId=dwr \
   -DartifactId=dwr \
   -Dversion=2.0m4 \
   -Dpackaging=jar \
   -DgeneratePom=false \
   -Dclassifier=javadoc \
   -Dfile=dwr-2.0m4-javadoc.jar \
   -DrepositoryId=my.org-repository \
   -Durl=scp://my.org/repository



=========================================
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'deploy'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [deploy:deploy-file] (aggregator-style)
[INFO]
----------------------------------------------------------------------------
[INFO] [deploy:deploy-file]
Uploading: scp://my.org/repository/dwr/dwr/2.0m4/dwr-2.0m4-javadoc.jar
1134K uploaded
[INFO] Retrieving previous metadata from my.org-repository
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at java.io.FileInputStream.<init>(FileInputStream.java:103)
        at java.io.FileReader.<init>(FileReader.java:55)
        at
org.apache.maven.project.artifact.ProjectArtifactMetadata.storeInLocalRepository(
ProjectArtifactMetadata.java:89)
        at
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.deploy
(DefaultRepositoryMetadataManager.java:420)
        at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(
DefaultArtifactDeployer.java:83)
        at org.apache.maven.plugin.deploy.DeployFileMojo.execute(
DeployFileMojo.java:236)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java :412)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:534)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
DefaultLifecycleExecutor.java :488)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:458)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java :306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:219)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java :140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke (
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
        at org.codehaus.classworlds.Launcher.launch (Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Mon Oct 09 16:48:17 PDT 2006
[INFO] Final Memory: 3M/5M
[INFO]
------------------------------------------------------------------------

Re: How to upload 3rd party source jars to external repository

Posted by Mikkel Jensen <di...@gmail.com>.
Thanks a bunch, that did the trick!

- Mikkel

On 11/8/06, Wayne Fay <wa...@gmail.com> wrote:
> Give this a try... Use that same command, but add -Dclassifier=sources
> or -Dclassifier=javadoc as appropriate. I'm reasonably certain that
> will work.
>
> Wayne
>
> On 11/8/06, Mikkel Jensen <di...@gmail.com> wrote:
> > How can I upload 3rd party source jars to an external repository?
> > Using the webdav plugin I am able to upload standard bytecode jars like
> > this:
> >
> > mvn deploy:deploy-file -DgroupId=<group-id>
> >                        -DartifactId=<artifact-id>
> >                        -Dversion=<version>
> >                        -Dfile=<path-to-file>
> >                        -Dpackaging=jar
> >                        -DrepositoryId=<repository-id>
> >                        -Durl=dav:http://www.myrepository.com/m2
> >
> > But I cant find any mention of source jars (or javadoc jars for that
> > matter)!
> >
> > Any pointers?
> >
> > ---------------------------------------------------------------------
> > 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
>
>

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


Re: How to upload 3rd party source jars to external repository

Posted by Wayne Fay <wa...@gmail.com>.
Give this a try... Use that same command, but add -Dclassifier=sources
or -Dclassifier=javadoc as appropriate. I'm reasonably certain that
will work.

Wayne

On 11/8/06, Mikkel Jensen <di...@gmail.com> wrote:
> How can I upload 3rd party source jars to an external repository?
> Using the webdav plugin I am able to upload standard bytecode jars like
> this:
>
> mvn deploy:deploy-file -DgroupId=<group-id>
>                        -DartifactId=<artifact-id>
>                        -Dversion=<version>
>                        -Dfile=<path-to-file>
>                        -Dpackaging=jar
>                        -DrepositoryId=<repository-id>
>                        -Durl=dav:http://www.myrepository.com/m2
>
> But I cant find any mention of source jars (or javadoc jars for that
> matter)!
>
> Any pointers?
>
> ---------------------------------------------------------------------
> 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