Maven 3: Deploying an Artifact Using SCP

As far as I can tell, deploying a third-party binary artifact using maven is done as follows:

mvn deploy:deploy-file -DgroupId=<group-id> \
  -DartifactId=<artifact-id> \
  -Dversion=<version> \
  -Dpackaging=<type-of-packaging> \
  -Dfile=<path-to-file> \
  -DrepositoryId=<id-to-map-on-server-section-of-settings.xml> \
  -Durl=<url-of-the-repository-to-deploy>

Suppose my repository is accessible using scp, for example, in the command above

-Durl=scpexe://example.org//users/mvnrepo/maven

Using maven 3, this deployment command fails with an error message.

The workaround I used was to copy two banks: wagon-ssh-common-2.2.jarand wagon-ssh-external1.0.jarto my directory $M2_HOME/lib.

Hence my question: why can not Maven independently obtain the corresponding cars?

(and how to do it, if possible?)

+5
source share
2 answers

: , :

  • Maven (, Nexus Artifactory )
  • pom.xml( )

, , .

  • , , . , , . , - maven.

  • , , , , . , , , , , . - . Carlspring kinldy Nexus, . Artifactory . . , . , , ( , , , ).

  • , Maven . , :

    • ?
    • ( libs)?
    • ?
    • ?
    • ...

pom.xml, (. 1) , , , Maven (. 2). pom.xml... ... pom.xml:).


, : , , . , .

, , , . , - Maven, , , , " ", :)

+4

- Maven. :

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

Maven Wagon.

+7

All Articles