This configuration has advantages when environments need to be added or removed. With the configuration explained above you would need to alter the POM file of every project. You can keep this configuration effort local to the settings file if you use the following configuration in your POMs: Code Block Placeholder |
---|
code-language | HTML and XML |
---|
code-title | pom.xml |
---|
| <build>
...
<pluginManagement>
<plugins>
...
<plugin>
<groupId>de.smartics.maven.plugin</groupId>
<artifactId>apptools-maven-plugin</artifactId>
<version>${project.version}</version>
<configuration>
... <!-- same as above, plus: -->
<serverId>${my-project.apptools.remote.server.id}</serverId>
<serverUrl>${my-project.apptools.remote.server.url}</serverUrl>
</configuration>
</plugin>
</plugins>
</pluginManagement>
...
</build> |
Then in your settings.xml add the following as a profile element for each of your environments. Code Block Placeholder |
---|
code-language | HTML and XML |
---|
code-title | settings.xml |
---|
| <settings>
...
<servers>
<server>
<id>my-server-id</id>
<username>janedoe</username>
<password>{swldfcm .... ssdfsdaf323=}</password>
</server>
</servers>
...
<profiles>
<profile>
<id>MY_ENV_ID</id>
<properties>
<projectdoc.apptools.remote.server.id>my-server-id</projectdoc.apptools.remote.server.id>
<projectdoc.apptools.remote.server.url>https://myserver/confluence</projectdoc.apptools.remote.server.url>
</properties>
</profile>
</profiles>
</settings> |
|