diff options
author | TedHumphrey <Thomas.Humphrey@att.com> | 2019-08-13 15:56:33 +0000 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2019-08-21 05:55:06 -0700 |
commit | 4aedf73ee896f8bac3dce6d728cb40a9519b76d7 (patch) | |
tree | b83d18239300177dfa267153bb56429ed4630bad /pom.xml | |
parent | b0710ba41d0d0cc4f06a4dc27c5090867c26113e (diff) |
Changes to support npm publish of reactjs components
Modify the pom.xml to copy ui-react sources to target, add
maven-exec-plugin to run the "npm publish" step, update the package.json
to include where to publish
Issue-ID: CLAMP-450
Change-Id: Id0d15e71924867d1d4329a377661d125b21fee6c
Signed-off-by: TedHumphrey <Thomas.Humphrey@att.com>
Diffstat (limited to 'pom.xml')
-rw-r--r-- | pom.xml | 41 |
1 files changed, 27 insertions, 14 deletions
@@ -3,7 +3,7 @@ ============LICENSE_START======================================================= ONAP CLAMP ================================================================================ - Copyright (C) 2017-2018 AT&T Intellectual Property. All rights + Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -87,6 +87,8 @@ <skip.staging.artifacts>false</skip.staging.artifacts> <python.http.proxy.param/> <tomcat.version>9.0.20</tomcat.version> + <ui.react.src>ui-react</ui.react.src> + <npm.publish.url>https://nexus3.onap.org/repository/npm.snapshot/</npm.publish.url> </properties> <profiles> @@ -700,11 +702,15 @@ </includes> </resource> <resource> - <directory>src/main/docker</directory> - <includes> - <include>**/*</include> - </includes> - <filtering>true</filtering> + <directory>${ui.react.src}</directory> + <includes> + <include>src/**</include> + <include>public/**</include> + <include>package.json</include> + <include>package-lock.json</include> + </includes> + <filtering>false</filtering> + <targetPath>${project.build.directory}/${ui.react.src}</targetPath> </resource> </resources> @@ -1218,18 +1224,16 @@ <artifactId>frontend-maven-plugin</artifactId> <version>1.6</version> <configuration> - <installDirectory>${project.build.directory}/clamp-ui</installDirectory> - <workingDirectory>${project.build.directory}/clamp-ui</workingDirectory> - <skip>${maven.test.skip}</skip> + <installDirectory>${project.build.directory}/${ui.react.src}</installDirectory> + <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory> </configuration> - <executions> <execution> <id>install_node_and_npm</id> <goals> <goal>install-node-and-npm</goal> </goals> - <phase>test</phase> + <phase>generate-sources</phase> <configuration> <nodeVersion>v8.11.1</nodeVersion> <npmVersion>5.6.0</npmVersion> @@ -1240,7 +1244,7 @@ <goals> <goal>npm</goal> </goals> - <phase>test</phase> + <phase>compile</phase> <configuration> <arguments>install</arguments> </configuration> @@ -1252,10 +1256,19 @@ </goals> <phase>test</phase> <configuration> - <arguments>run-script test:coverage</arguments> + <arguments>run-script test</arguments> </configuration> </execution> - + <execution> + <id>npm_publish</id> + <goals> + <goal>npm</goal> + </goals> + <phase>deploy</phase> + <configuration> + <arguments>publish --registry ${npm.publish.url}</arguments> + </configuration> + </execution> </executions> </plugin> </plugins> |