maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yves Van Steen" <yve...@scarlet.be>
Subject RE: [M2] Deploy into Remote Repository
Date Thu, 12 Oct 2006 14:36:48 GMT
Hey,

This is an example of a pom with the settings to download to a repo server
and from a repo server.  For the deploying process just do "mvn deploy".
It then builds this project and places it in the local repo and then deploys
it to the remote repo.  It uses scp (ssh based).

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  
  <groupId>guide.management.snapshots</groupId>
  <artifactId>guide-management-snapshots</artifactId>
  <packaging>pom</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>Project Guide Management Snapshots</name>
  
  <repositories>
    <repository>
      <id>example-repo</id>
      <name>Example Repo</name>
      <url>http://192.168.1.2:9999/repository</url>
    </repository>
  </repositories>
  
  <distributionManagement>
    <repository>
    	<id>examplerepo</id> <!-- must match with server profile in your
settings.xml -->
    	<name>Example Repo Releases</name>
    	<url>scp://192.168.1.2/repo/maven/internal</url>
    </repository>
    <snapshotRepository>
    	<id>example-repo</id> <!-- must match with server profile in your
settings.xml -->
    	<name>Example Repo Snapshots</name>
    	<url>scp://192.168.1.2/repo/maven/snapshots</url>
    </snapshotRepository>
    <site>
       <id>example-repo</id> <!-- must match with server profile in your
settings.xml -->
       <url>scp://192.168.1.2/var/www/localhost/htdocs/test</url>
    </site>
  </distributionManagement>
  
  <modules>
    <module>guide-management-snapshots-core</module>
    <module>guide-management-snapshots-dep</module>
  </modules>
  
</project>

For the authentication i have a section in my settings.xml.
You can use ssh with password authentication or with RSA authentication.
Your choice.

  <servers>
    <server>
      <id>example-repo</id>
      <username>vansteeny</username>
      <password>vansteeny</password>
      <filePermissions>774</filePermissions>
      <directoryPermissions>774</directoryPermissions>
    </server>
    
    <!-- Another sample, using keys to authenticate.
    <server>
      <id>siteServer</id>
      <privateKey>/path/to/private/key</privateKey>
      <passphrase>optional; leave empty if not used.</passphrase>
    </server>
    -->
  </servers>

Haven fun with it.

-----Oorspronkelijk bericht-----
Van: Sebastian Krebs [mailto:krebs@quipsy.de] 
Verzonden: woensdag 11 oktober 2006 10:26
Aan: users@maven.apache.org
Onderwerp: [M2] Deploy into Remote Repository

Hello,

 

I want to achieve the following:

 

I have a remote repository on our local server and I want to say M2 that it
has to deploy projects artefacts into

this remote repository.

 

But without configure this directly in each pom.xml, 

because we have multiple projects and for each the repository will be the
same.

 

Is this possible?

 

Mit freundlichem Gruß / Best Regards

 

Sebastian Krebs

 

QUIPSY QUALITY GmbH

Stuttgarter Strasse 23

D-75179 Pforzheim

 

s.krebs@quipsy.de

 


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.2/472 - Release Date: 11/10/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.2/472 - Release Date: 11/10/2006
 


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


Mime
View raw message