Split daemon module into daemon and dist #130

This commit is contained in:
Peter Palaga
2020-10-23 18:21:23 +02:00
parent bc2fabe788
commit 8f322e7b0b
14 changed files with 92 additions and 56 deletions

View File

@@ -29,6 +29,9 @@ jobs:
- uses: actions/checkout@v1
- name: Set VERSION env var
run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: setup-graalvm-ce
uses: DeLaGuardo/setup-graalvm@3
with:
@@ -50,13 +53,13 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: daemon-test-logs-linux
path: daemon/target/maven-distro/daemon
path: dist/target/mvnd-${{ env.VERSION }}-linux-amd64/daemon
- name: Upload mvnd.zip
uses: actions/upload-artifact@v2
with:
name: mvnd-linux-amd64.zip
path: daemon/target/maven-distro/mvnd-*.zip
path: dist/target/mvnd-*.zip
windows:
runs-on: windows-2019
@@ -97,6 +100,10 @@ jobs:
- uses: actions/checkout@v1
- name: Set VERSION env var
shell: bash
run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Skip tests when releasing from a tag
if: startsWith(github.ref, 'refs/tags')
shell: bash
@@ -113,13 +120,13 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: daemon-test-logs-windows
path: daemon/target/maven-distro/daemon
path: dist/target/mvnd-${{ env.VERSION }}-windows-amd64/daemon
- name: Upload mvnd.zip
uses: actions/upload-artifact@v2
with:
name: mvnd-windows-amd64.zip
path: daemon/target/maven-distro/mvnd-*.zip
path: dist/target/mvnd-*.zip
darwin:
runs-on: macos-10.15
@@ -127,6 +134,9 @@ jobs:
- uses: actions/checkout@v1
- name: Set VERSION env var
run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: setup-graalvm-ce
uses: DeLaGuardo/setup-graalvm@3
with:
@@ -148,13 +158,13 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: daemon-test-logs-darwin
path: daemon/target/maven-distro/daemon
path: dist/target/mvnd-${{ env.VERSION }}-darwin-amd64/daemon
- name: Upload mvnd.zip
uses: actions/upload-artifact@v2
with:
name: mvnd-darwin-amd64.zip
path: daemon/target/maven-distro/mvnd-*.zip
path: dist/target/mvnd-*.zip
deploy:
runs-on: ubuntu-18.04

View File

@@ -41,10 +41,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.fuse.mvnd</groupId>
<artifactId>mvnd-client</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-embedder</artifactId>
@@ -96,23 +92,6 @@
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<mvnd.home>${project.basedir}/target/maven-distro/mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</mvnd.home>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.takari.maven.plugins</groupId>
<artifactId>takari-lifecycle-plugin</artifactId>
@@ -125,22 +104,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>ca.vanzyl.provisio.maven.plugins</groupId>
<artifactId>provisio-maven-plugin</artifactId>
<executions>
<execution>
<id>maven-distro</id>
<phase>package</phase>
<goals>
<goal>provision</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/maven-distro/mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

65
dist/pom.xml vendored Normal file
View File

@@ -0,0 +1,65 @@
<!--
Copyright 2019 the original author or authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.fuse.mvnd</groupId>
<artifactId>mvnd</artifactId>
<version>0.0.9-SNAPSHOT</version>
</parent>
<artifactId>mvnd-dist</artifactId>
<packaging>pom</packaging>
<name>Maven Daemon Distribution</name>
<dependencies>
<dependency>
<groupId>org.jboss.fuse.mvnd</groupId>
<artifactId>mvnd-client</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.fuse.mvnd</groupId>
<artifactId>mvnd-daemon</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>ca.vanzyl.provisio.maven.plugins</groupId>
<artifactId>provisio-maven-plugin</artifactId>
<executions>
<execution>
<id>maven-distro</id>
<phase>package</phase>
<goals>
<goal>provision</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -32,7 +32,7 @@
<properties>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<mvnd.home>${project.basedir}/../daemon/target/maven-distro/mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</mvnd.home>
<mvnd.home>${project.basedir}/../dist/target/mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</mvnd.home>
</properties>
<dependencies>
@@ -48,17 +48,8 @@
</dependency>
<dependency>
<groupId>org.jboss.fuse.mvnd</groupId>
<artifactId>mvnd-daemon</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.fuse.mvnd</groupId>
<artifactId>mvnd-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.fuse.mvnd</groupId>
<artifactId>mvnd-client</artifactId>
<artifactId>mvnd-dist</artifactId>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.fuse.mvnd.dist;
package org.jboss.fuse.mvnd.it;
import java.nio.file.Files;
import java.nio.file.Path;

View File

@@ -68,6 +68,7 @@
<module>common</module>
<module>client</module>
<module>daemon</module>
<module>dist</module>
<module>integration-tests</module>
</modules>
@@ -168,6 +169,12 @@
<artifactId>mvnd-common</artifactId>
<version>0.0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.fuse.mvnd</groupId>
<artifactId>mvnd-dist</artifactId>
<type>pom</type>
<version>0.0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.fuse.mvnd</groupId>
<artifactId>mvnd-daemon</artifactId>