Here is an example with one key and one value pattern. Code Block |
---|
<profile>
<id>de.smartics.projectdoc</id>
<properties>
<ignore-property-keys>
<item>.*password.*</item>
<item>gpg.*</item>
</ignore-property-keys>
<ignore-property-values>
<item>\w:.*</item>
</ignore-property-values>
</properties>
</profile> |
Each pattern is the content of an item element. Since Maven does not allow complex content in a property tag, the tag delimiters have to be escaped. Here is the unescaped version of the XML above that is better readable (but unfortunately only the above escaped syntax will work). Code Block |
---|
<profile>
<id>de.smartics.projectdoc</id>
<properties>
<ignore-property-keys>
<item>.*password.*</item>
<item>gpg.*</item>
</ignore-property-keys>
<ignore-property-values>
<item>\w:.*</item>
</ignore-property-values>
</properties>
</profile> |
The key pattern will skip any key with the sequence password in it or starting with gpg . The value pattern will filter all Window paths (a letter followed by a colon and then any characters). Expand |
---|
title | Click to expand sample server.xml ... |
---|
| Code Block |
---|
language | xml |
---|
title | A sample Settings (please adjusts URLs and paths) |
---|
| <?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">
<interactiveMode>false</interactiveMode>
<offline>false</offline>
<localRepository>/path/to/repo<<localRepository>ADD PATH TO DIRECTORY TO DOWNLOAD ARTIFACTS</localRepository>
<servers>
<!-- Add if you need to authenticate to the artifact server -->
<server>
<id>IF NECESSARY ADD SERVER ID HERE</id>
<username>IF NECESSARY ADD USERNAME HERE</username>
<password>IF NECESSARY ADD PASSWORD HERE</password>
</server>
</servers>
<profiles>
<profile>
<id>local</id>
<repositories>
<!-- Add one or more artifact server -->
<repository>
<id>ADD SERVER ID HERE</id>
<url>ADD ARTIFACT SERVER URL</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<!-- Add one or more artifact server -->
<pluginRepository>
<id>ADD SERVER ID HERE</id>
<url>ADD ARTIFACT SERVER UR</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>de.smartics.projectdoc</id>
<properties>
<ignore-property-keys>
<item>.*password.*</item>
<item>gpg.*</item>
</ignore-property-keys>
<ignore-property-values>
<item>\w:.*</item>
</ignore-property-values>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>local</activeProfile>
</activeProfiles>
</settings>
|
|
|