Skip to content

Commit

Permalink
Improved settings.xml.dist file, docker-compose.yml now has a mount f…
Browse files Browse the repository at this point in the history
…or the .gunpg folder, sync script now runs deploy rather than install
  • Loading branch information
Aklakan committed Jan 20, 2024
1 parent 470ad26 commit 73ca2ed
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 45 deletions.
1 change: 1 addition & 0 deletions mvn-sync/v2/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
# - ~/.m2/repository:/home/user/.m2/host-repository
- ~/.m2/repository:/home/user/.m2/repository
- ~/.m2/repository:/repository
- ~/.gnupg:/home/user/.gnupg
- ./target/repository:/home/user/.m2/cache-repository
- ./settings.xml:/home/user/.m2/settings.xml
- ./workdir:/workdir
Expand Down
3 changes: 2 additions & 1 deletion mvn-sync/v2/resources/run-dcat-mvn-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ process-file() {
mkdir -p "$OUT_FOLDER"
cat "$SCRIPT_DIR/metadata.template.pom.xml" | envsubst '$IN_GROUPID $IN_ARTIFACTID $IN_VERSION $IN_TYPE $OUT_GROUPID $OUT_ARTIFACTID $OUT_VERSION' > "$OUT_FILE"

(cd "$OUT_FOLDER" && mvn install)
# (cd "$OUT_FOLDER" && mvn install)
(cd "$OUT_FOLDER" && mvn -Prelease deploy -Dmaven.install.skip)

echo "Completed processing as data artifact: $FILE"
#mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile=path-to-your-artifact-jar \
Expand Down
95 changes: 51 additions & 44 deletions mvn-sync/v2/settings.xml.dist
Original file line number Diff line number Diff line change
@@ -1,48 +1,55 @@
<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">


<profiles>
<profile>
<id>myProfile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>

<repositories>
<!--
<repository>
<id>host-repo</id>
<name>host repository</name>
<url>file://${user.home}/.m2/host-repository</url>
</repository>
-->

<repository>
<id>watched-repo</id>
<name>watched repository</name>
<url>file:///repository</url>
</repository>


<repository>
<id>cache-repo</id>
<name>cache repository</name>
<url>file://${user.home}/.m2/cache-repository</url>
</repository>

<!-- Always use the default repository for lookups even if it is overridden -->
<repository>
<id>default-repo</id>
<name>default repository</name>
<url>file://${user.home}/.m2/repository</url>
</repository>

</repositories>
<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">

<profiles>
<profile>
<id>myProfile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>

<repositories>
<!-- Always use the default repository for lookups even if it is overridden -->
<repository>
<id>default-repo</id>
<name>default repository</name>
<url>file://${user.home}/.m2/repository</url>
</repository>

<repository>
<id>watched-repo</id>
<name>watched repository</name>
<url>file:///repository</url>
</repository>

<repository>
<id>cache-repo</id>
<name>cache repository</name>
<url>file://${user.home}/.m2/cache-repository</url>
</repository>
</repositories>
</profile>

<profile>
<id>gpg-signing</id>
<properties>
<gpg.keyname>GPG_SIGNING_KEYNAME</gpg.keyname>
</properties>
</profile>
</profiles>
</profiles>

<!-- Adjust the server ids such that they match the repository configurations in the pom files -->
<servers>
<server>
<id>maven.aksw.internal</id>
<username>UserName</username>
<password>SECRET</password>
</server>
<server>
<id>maven.aksw.snapshots</id>
<username>UserName</username>
<password>SECRET</password>
</server>
</servers>

</settings>

0 comments on commit 73ca2ed

Please sign in to comment.