aboutsummaryrefslogtreecommitdiffstats
path: root/aria/aria-rest-server/pom.xml
diff options
context:
space:
mode:
authordfilppi <dewayne@cloudify.co>2017-12-26 21:54:15 +0000
committerdfilppi <dewayne@cloudify.co>2017-12-26 21:59:19 +0000
commit18266f843b047531ba4ec5c5ef5cb5f148863a1a (patch)
tree5c0e7f947d2f4019a73f9280674ccd57ae38f5f2 /aria/aria-rest-server/pom.xml
parente90193610f292c7d000f51592d03ebefdb8cd8d6 (diff)
Updated build to create wheel and push to Pypi
Change-Id: I8cb80cf56ed5c0d459a64af8c6a9198c1c4f9fae Issue-ID: SO-362 Signed-off-by: DeWayne Filppi <dewayne@cloudify.co>
Diffstat (limited to 'aria/aria-rest-server/pom.xml')
-rw-r--r--aria/aria-rest-server/pom.xml88
1 files changed, 43 insertions, 45 deletions
diff --git a/aria/aria-rest-server/pom.xml b/aria/aria-rest-server/pom.xml
index 7af381c220..cf39f262e9 100644
--- a/aria/aria-rest-server/pom.xml
+++ b/aria/aria-rest-server/pom.xml
@@ -33,18 +33,13 @@
<version>1.1.0-SNAPSHOT</version>
</parent>
- <pluginRepositories>
- <pluginRepository>
- <id>jitpack.io</id>
- <url>https://jitpack.io</url>
- </pluginRepository>
- </pluginRepositories>
-
<properties>
- <python_version>2.7</python_version>
+ <python_version>2</python_version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <wheel.name>${project.artifactId}-${python_version}-py2-none-any.whl</wheel.name>
+ <wheel.name>${project.artifactId}-${project.version}-py${python_version}-none-any.whl</wheel.name>
<python.sourceDirectory>${project.basedir}/src/main/python/aria-rest</python.sourceDirectory>
+ <onap.nexus.pypiserver.baseurl>http://192.168.33.1:8081/repository/pypi-internal/</onap.nexus.pypiserver.baseurl>
+ <onap.nexus.pypiserver.serverid>ecomp-snapshots</onap.nexus.pypiserver.serverid>
</properties>
<build>
<plugins>
@@ -67,48 +62,51 @@
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
- <execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/maven-python/dist/${wheel.name}</file>
- <type>whl</type>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
</executions>
</plugin>
<plugin>
- <groupId>com.github.UltimateDogg</groupId>
- <artifactId>maven-python-distribute-plugin</artifactId>
- <version>0.2.0</version>
- <configuration>
- <packageVersion>${python_version}</packageVersion>
- <sourceDirectory>${python.sourceDirectory}</sourceDirectory>
- <distributionType>wheel</distributionType>
- </configuration>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.6.0</version>
<executions>
<execution>
- <id>package</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>package</goal>
- </goals>
- </execution>
- <execution>
- <id>process</id>
- <phase>process-sources</phase>
- <goals>
- <goal>process-sources</goal>
- </goals>
+ <id>package</id>
+ <phase>package</phase>
+ <goals><goal>exec</goal></goals>
+ <configuration>
+ <executable>python</executable>
+ <arguments>
+ <argument>${session.executionRootDirectory}/build.py</argument>
+ </arguments>
+ <environmentVariables>
+ <MVN_PHASE>package</MVN_PHASE>
+ <WHEEL_NAME>${wheel.name}</WHEEL_NAME>
+ <INPUT_DIR>${session.executionRootDirectory}/src/main/python/aria-rest</INPUT_DIR>
+ <OUTPUT_DIR>${project.build.directory}</OUTPUT_DIR>
+ </environmentVariables>
+ </configuration>
</execution>
- </executions>
+ <execution>
+ <id>deploy</id>
+ <phase>deploy</phase>
+ <goals><goal>exec</goal></goals>
+ <configuration>
+ <executable>python</executable>
+ <arguments>
+ <argument>${session.executionRootDirectory}/build.py</argument>
+ </arguments>
+ <environmentVariables>
+ <MVN_PHASE>deploy</MVN_PHASE>
+ <PROJECT_VERSION>${project.version}</PROJECT_VERSION>
+ <DOCKERREGISTRY_SNAPSHOT>${onap.nexus.dockerregistry.snapshot}</DOCKERREGISTRY_SNAPSHOT>
+ <DOCKERREGISTRY_RELEASE>${onap.nexus.dockerregistry.release}</DOCKERREGISTRY_RELEASE>
+ <PYPI_SERVER_BASEURL>${onap.nexus.pypiserver.baseurl}</PYPI_SERVER_BASEURL>
+ <PYPI_SERVERID>${onap.nexus.pypiserver.serverid}</PYPI_SERVERID>
+ <WHEEL_PATH>${project.build.directory}/${wheel.name}</WHEEL_PATH>
+ </environmentVariables>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>