diff options
author | Pavel Paroulek <pavel.paroulek@orange.com> | 2019-05-13 20:23:31 +0200 |
---|---|---|
committer | Pavel Paroulek <pavel.paroulek@orange.com> | 2019-05-14 10:17:34 +0200 |
commit | 48d76b552efaa7f3ac068519a0c06ab1ad65f2ea (patch) | |
tree | 45d7232f78b63fc704803426de265ffc56381dab /pom.xml | |
parent | 1722ddc1b782c79d881a11eb06df66c6e2ab6029 (diff) |
Maven based building
Building the project (docker, user interface) via maven
Change-Id: I94ef02b435f0684cedbafb63b5daeb44abfe22cc
Issue-ID: AAI-531
Signed-off-by: Pavel Paroulek <pavel.paroulek@orange.com>
Diffstat (limited to 'pom.xml')
-rw-r--r-- | pom.xml | 117 |
1 files changed, 112 insertions, 5 deletions
@@ -10,7 +10,7 @@ <properties> <nexusproxy>https://nexus.onap.org</nexusproxy> - <site.path>/content/sites/site/org/onap/aai/resources/${project.artifactId}/${project.version}</site.path> + <site.path>/content/sites/site/org/onap/aai/graphgraph/${project.artifactId}/${project.version}</site.path> <release.path>/content/repositories/releases/</release.path> <snapshot.path>/content/repositories/snapshots/</snapshot.path> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -18,6 +18,13 @@ <maven.compiler.target>1.8</maven.compiler.target> <java.version>1.8</java.version> <spring.boot.version>1.5.19.RELEASE</spring.boot.version> + + <docker.fabric.version>0.23.0</docker.fabric.version> + <docker.registry>docker.io</docker.registry> + <docker.push.registry>localhost:5000</docker.push.registry> + <aai.docker.namespace>onap</aai.docker.namespace> + <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/</aai.build.directory> + <graphgraph.startpath>src/main/resources/</graphgraph.startpath> </properties> <dependencyManagement> @@ -78,15 +85,116 @@ </dependency> </dependencies> + <profiles> + <profile> + <id>docker</id> + <properties> + <graphgraph.startpath>/graphgraph/</graphgraph.startpath> + </properties> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>fabric8-maven-plugin</artifactId> + <version>4.1.0</version> + <configuration> + <verbose>true</verbose> + <images> + <image> + <name>graphgraph:${project.version}</name> + <build> + <from>aaionap/aai-common:1.3.0</from> + <entryPoint> + <exec> + <arg>java</arg> + <arg>-jar</arg> + <arg>/graphgraph/${project.artifactId}-${project.version}.${project.packaging}</arg> + </exec> + </entryPoint> + <assembly> + <targetDir>/graphgraph</targetDir> + <descriptor>${project.basedir}/src/main/resources/docker-assembly.xml</descriptor> + </assembly> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>generate-images</id> + <phase>install</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + <execution> + <id>push-images</id> + <phase>deploy</phase> + <goals> + <goal>push</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <build> - <pluginManagement> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> <plugins> - <plugin> + <plugin> + <groupId>com.github.eirslett</groupId> + <artifactId>frontend-maven-plugin</artifactId> + <version>1.7.6</version> + <executions> + <execution> + <id>install node</id> + <goals> + <goal>install-node-and-npm</goal> + </goals> + <phase>generate-resources</phase> + <configuration> + <workingDirectory>${project.basedir}/graphgraph-fe</workingDirectory> + <nodeVersion>v10.10.0</nodeVersion> + </configuration> + </execution> + <execution> + <id>npm install</id> + <goals> + <goal>npm</goal> + </goals> + <phase>generate-resources</phase> + <configuration> + <workingDirectory>${project.basedir}/graphgraph-fe</workingDirectory> + <arguments>install</arguments> + </configuration> + </execution> + <execution> + <id>npm build</id> + <goals> + <goal>npm</goal> + </goals> + <phase>generate-resources</phase> + <configuration> + <workingDirectory>${project.basedir}/graphgraph-fe</workingDirectory> + <arguments>run build</arguments> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <artifactId>maven-resources-plugin</artifactId> <version>3.1.0</version> <executions> <execution> - <id>copy-resources</id> + <id>copy-resources-ui</id> <phase>validate</phase> <goals> <goal>copy-resources</goal> @@ -116,7 +224,6 @@ </executions> </plugin> </plugins> - </pluginManagement> </build> <distributionManagement> <repository> |