You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kevin Krumwiede <kj...@gmail.com> on 2013/10/12 22:29:30 UTC

Deploying third-pary jar via scp

I think I've solved my earlier question about my poms.  Now I need to
deploy a third-party jar to my remote repo.  I tried this command:

$ mvn deploy:deploy-file -DgroupId=de.kuxfamily -DartifactId=glasslib
-Dversion=1.0 -Dpackaging=jar -Dfile=glasslib.jar
-DrepositoryId=chalcodes -Durl=scpexe://chalcodes.com/maven

It says there is no connector available.  I installed some jars in my
~/.m2/lib: wagon-ssh-2.5.jar, wagon-ssh-common-2.5.jar, and
wagon-ssh-external-2.5.jar.  I also tried changing the protocol to
scp.  No dice.

Should I write a pom to deploy this artifact?  Can I deploy it as part
of an existing project, and have it be available at compile time?

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


Re: Deploying third-pary jar via scp

Posted by Kevin Krumwiede <kj...@gmail.com>.
> No they said you can put the deps in $MAVEN_HOME/lib

Duh!  Thank you.  That led me to the solution.  I placed the ssh wagon
jars in /usr/share/maven/libs, and it almost worked.  Then I just had
to change the url parameter from the public alias to the actual
hostname and non-standard port my host requires me to use for ssh.

$ mvn deploy:deploy-file -DgroupId=de.kuxfamily -DartifactId=glasslib
-Dversion=1.0 -Dpackaging=jar -Dfile=glasslib.jar
-DrepositoryId=chalcodes
-Durl=scpexe://$SSH_HOST:$SSH_PORT/$HOME/public_html/maven


> But better is to use a real repository manager

Eh... overkill for my purposes.

Thanks again.

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


Re: Deploying third-pary jar via scp

Posted by Stephen Connolly <st...@gmail.com>.
On Sunday, 13 October 2013, Kevin Krumwiede wrote:

> > first of all, there is no ~/.m2/lib, Maven solely relies on plugins and
> > its dependencies. This isn't Ant.
>
> Weird.  I found a bunch of how-tos that said that was how to do it.
> Maybe in an older version?


No they said you can put the deps in $MAVEN_HOME/lib

But better is to use a real repository manager


>
>
> > Anyway, is there a reason why you don't use a repo manager like Nexus?
>
> Yeah... my $8/month host doesn't support it.  I'm just hosting my
> personal projects.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org <javascript:;>
> For additional commands, e-mail: users-help@maven.apache.org<javascript:;>
>
>

-- 
Sent from my phone

Re: Deploying third-pary jar via scp

Posted by Kevin Krumwiede <kj...@gmail.com>.
> first of all, there is no ~/.m2/lib, Maven solely relies on plugins and
> its dependencies. This isn't Ant.

Weird.  I found a bunch of how-tos that said that was how to do it.
Maybe in an older version?


> Anyway, is there a reason why you don't use a repo manager like Nexus?

Yeah... my $8/month host doesn't support it.  I'm just hosting my
personal projects.

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


Re: Deploying third-pary jar via scp

Posted by Michael-O <19...@gmx.net>.
Am 2013-10-12 22:29, schrieb Kevin Krumwiede:
> I think I've solved my earlier question about my poms.  Now I need to
> deploy a third-party jar to my remote repo.  I tried this command:
>
> $ mvn deploy:deploy-file -DgroupId=de.kuxfamily -DartifactId=glasslib
> -Dversion=1.0 -Dpackaging=jar -Dfile=glasslib.jar
> -DrepositoryId=chalcodes -Durl=scpexe://chalcodes.com/maven
>
> It says there is no connector available.  I installed some jars in my
> ~/.m2/lib: wagon-ssh-2.5.jar, wagon-ssh-common-2.5.jar, and
> wagon-ssh-external-2.5.jar.  I also tried changing the protocol to
> scp.  No dice.
>
> Should I write a pom to deploy this artifact?  Can I deploy it as part
> of an existing project, and have it be available at compile time?

Hi Kevin,

first of all, there is no ~/.m2/lib, Maven solely relies on plugins and 
its dependencies. This isn't Ant.

As far as I can remember, Maven 3 has one two default Wagon providers: 
File and HTTP. You need to declare additional dependencies [1]. 
Unfortunately, I do not know how to declare this dependency when you 
solely perform a deploy:deploy-file.

Anyway, is there a reason why you don't use a repo manager like Nexus?

Michael


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


Re: Deploying third-pary jar via scp

Posted by Russell Gold <ru...@gold-family.us>.
Hi Kevin,

Yes, you will need a POM unless your server understands the http PUT command. When you issue the mvn command, maven will look in your current directory for a POM even though it won't be using any of its standard life cycles. Those will define any plugins, connectors, and so on.

Assuming your server understands scp, you might put in your pom something like:

<build>
    <extensions>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh</artifactId>
            <version>1.0</version>
        </extension>
    </extensions>
</build>

Of course, you would still need a way to specify your credentials, preferably in your ~/.m2/settings.xml

There is a free version of the Nexus repository manager. That will be much easier to use than this.

Regards,
Russ

On Oct 12, 2013, at 4:29 PM, Kevin Krumwiede <kj...@gmail.com> wrote:

> I think I've solved my earlier question about my poms.  Now I need to
> deploy a third-party jar to my remote repo.  I tried this command:
> 
> $ mvn deploy:deploy-file -DgroupId=de.kuxfamily -DartifactId=glasslib
> -Dversion=1.0 -Dpackaging=jar -Dfile=glasslib.jar
> -DrepositoryId=chalcodes -Durl=scpexe://chalcodes.com/maven
> 
> It says there is no connector available.  I installed some jars in my
> ~/.m2/lib: wagon-ssh-2.5.jar, wagon-ssh-common-2.5.jar, and
> wagon-ssh-external-2.5.jar.  I also tried changing the protocol to
> scp.  No dice.
> 
> Should I write a pom to deploy this artifact?  Can I deploy it as part
> of an existing project, and have it be available at compile time?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

-----------------
Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!