Skip to content

Instantly share code, notes, and snippets.

@shyiko
Created July 27, 2013 19:33
Show Gist options
  • Save shyiko/6095996 to your computer and use it in GitHub Desktop.
Save shyiko/6095996 to your computer and use it in GitHub Desktop.
shyiko/servers-maven-extension inquiry (#1)
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>land.of.ooo</groupId>
<artifactId>adventure_time</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.github.goldin</groupId>
<artifactId>sshexec-maven-plugin</artifactId>
<version>0.2.5</version>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>sshexec</goal>
</goals>
<configuration>
<location>
scp://${settings.servers.server.eApp.username}:${settings.servers.server.eApp.password}@localhost
</location>
<command>ls -l</command>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>com.github.shyiko.servers-maven-extension</groupId>
<artifactId>servers-maven-extension</artifactId>
<version>1.0.0</version>
</extension>
</extensions>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>eApp</id>
<username>jake</username>
<password>the_dog</password>
</server>
</servers>
</settings>
@shyiko
Copy link
Author

shyiko commented Jul 27, 2013

Note that sshexec-maven-plugin is intentionaly configured to fail.
Download the gist, untar it and run "mvn deploy -s settings.xml" to see that ${settings.servers.server.eApp.*} interpolation works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment