Skip to content

Commit

Permalink
Merge pull request #1832 from olamy/improve-cache-when-using-remote
Browse files Browse the repository at this point in the history
Always run install/deploy even when getting build from remote to have artifacts locally installed when used by other builds in pipeline
  • Loading branch information
olamy authored Jan 30, 2025
2 parents 91a4f27 + efec33f commit eee6708
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--add-opens java.base/sun.nio.ch=ALL-UNNAMED

45 changes: 45 additions & 0 deletions .mvn/maven-build-cache-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<cache xmlns="https://maven.apache.org/BUILD-CACHE-CONFIG/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/BUILD-CACHE-CONFIG/1.2.0 https://maven.apache.org/xsd/build-cache-config-1.2.0.xsd">
<configuration>
<hashAlgorithm>XXMM</hashAlgorithm>
<enabled>true</enabled>
<!-- activated via cli -->
<!-- to disable it just use -Dmaven.build.cache.enabled=false -->
<!--
-Dmaven.build.cache.remote.url=http://nexus-service.nexus.svc.cluster.local:8081/repository/maven-build-cache -Dmaven.build.cache.remote.enabled=true
-Dmaven.build.cache.remote.save.enabled=true -Dmaven.build.cache.remote.server.id=nexus-cred
-->
<!-- <remote enabled="true" saveToRemote="true" id="nexus-cred">-->
<!-- <url>http://nexus-service.nexus.svc.cluster.local:8081/repository/maven-build-cache</url>-->
<!-- </remote>-->
</configuration>
<input>
<global>
<glob>{*.java,*.xml,*.properties,*.mod,*.adoc}</glob>
<includes>
<include glob="{*.xml,*.properties,*.jsp,*.css}">src/main/webapp</include>
</includes>
<excludes>
<exclude glob="*Jenkinsfile*" />
<exclude glob="./idea/*" />
</excludes>
</global>
</input>
<executionControl>
<runAlways>
<goalsLists>
<goalsList artifactId="maven-install-plugin">
<goals>
<goal>install</goal>
</goals>
</goalsList>
<goalsList artifactId="maven-deploy-plugin">
<goals>
<goal>deploy</goal>
</goals>
</goalsList>
</goalsLists>
</runAlways>
</executionControl>
</cache>

0 comments on commit eee6708

Please sign in to comment.