Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated pom with GAR Config #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .ci/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
timeout: 6000s
steps:
- id: publish
name: us-central1-docker.pkg.dev/ox-registry-devint/container-registry-devint/java-base:latest
args:
- make
- ci_publish
waitFor:
- "-"
38 changes: 38 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
JAR_VERSION := $(shell echo 'cat /*[local-name()="project"]/*[local-name()="version"]/text()' | xmllint --shell pom.xml | grep -v '/')

.PHONY: compile build test clean release package version

usage:
@echo "USAGE:"
@echo " make command [options]"
@echo
@echo "COMMANDS:"
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed 's/^/ /' | sed -e 's/\\$$/AA/' | sed -e 's/#//g' | column -t -s ":" | sort -k1

compile:
mvn compile

package:
mvn package

test:
mvn verify

clean:
mvn clean

release:
mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true deploy

version:
@echo $(JAR_VERSION)

format: ## Format code
mvn com.coveo:fmt-maven-plugin:format

show-outdated-deps: ## Display which maven dependencies and plugins has newer stable versions
mvn versions:display-dependency-updates
mvn versions:display-plugin-updates

ci_publish:
mvn deploy
160 changes: 87 additions & 73 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,78 +1,92 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openx.market.ssrtb</groupId>
<artifactId>pricecrypter</artifactId>
<name>PriceCrypter</name>
<version>0.0.4</version>
<description>Can encrypt and decrypt price macros.</description>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openx.market.ssrtb</groupId>
<artifactId>pricecrypter</artifactId>
<name>PriceCrypter</name>
<version>0.0.4</version>
<description>Can encrypt and decrypt price macros.</description>

<distributionManagement>
<repository>
<id>artifactory-releases</id>
<name>artifactory-release</name>
<url>https://artifactory.prod.gcp.openx.org/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>artifactory-snapshots</id>
<name>artifactory-snapshots</name>
<url>https://artifactory.prod.gcp.openx.org/artifactory/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
<scm>
<connection>scm:git:https://github.com/openx/SSRTBPriceCrypter.git</connection>
<developerConnection>scm:git:https://github.com/openx/SSRTBPriceCrypter.git</developerConnection>
<url>https://github.com/openx/SSRTBPriceCrypter.git</url>
</scm>

<scm>
<connection>scm:git:https://github.com/openx/SSRTBPriceCrypter.git</connection>
<developerConnection>scm:git:https://github.com/openx/SSRTBPriceCrypter.git</developerConnection>
<url>https://github.com/openx/SSRTBPriceCrypter.git</url>
</scm>
<properties>
<ox.gar.maven.host>artifactregistry://us-central1-maven.pkg.dev/ox-registry-devint</ox.gar.maven.host>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
</dependency>
</dependencies>

<build>

<extensions>
<extension>
<groupId>com.google.cloud.artifactregistry</groupId>
<artifactId>artifactregistry-maven-wagon</artifactId>
<version>2.1.0</version>
</extension>
</extensions>


<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>org.openx.market.ssrtb.crypter.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>simple-command</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<distributionManagement>
<repository>
<id>artifact-registry</id>
<url>${ox.gar.maven.host}/ox-releases</url>
</repository>
<snapshotRepository>
<id>artifact-registry</id>
<url>${ox.gar.maven.host}/ox-snapshots</url>
</snapshotRepository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>org.openx.market.ssrtb.crypter.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>simple-command</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>