Skip to content

Commit

Permalink
KOGITO-10042: Migrate SWF Dev UI Java module from kogito-apps to kie-…
Browse files Browse the repository at this point in the history
…tools (apache#2167)

Co-authored-by: Yeser Amer <[email protected]>
Co-authored-by: Thiago Lugli <[email protected]>
Co-authored-by: Paulo Martins <[email protected]>
  • Loading branch information
4 people committed Mar 28, 2024
1 parent b6a7d55 commit daa1d40
Show file tree
Hide file tree
Showing 28 changed files with 1,855 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/sonataflow-quarkus-devui-extension/env/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/

const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env");

module.exports = composeEnv([require("@kie-tools/root-env/env")], {
vars: varsWithName({}),
get env() {
return {
sonataflowQuarkusDevuiExtension: {
version: require("../package.json").version,
},
};
},
});
25 changes: 25 additions & 0 deletions packages/sonataflow-quarkus-devui-extension/install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/

const buildEnv = require("./env");
const { setup } = require("@kie-tools/maven-config-setup-helper");

setup(`
-Drevision=${buildEnv.env.sonataflowQuarkusDevuiExtension.version}
`);
41 changes: 41 additions & 0 deletions packages/sonataflow-quarkus-devui-extension/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"private": true,
"name": "@kie-tools/sonataflow-quarkus-devui-extension",
"version": "0.0.0",
"description": "",
"license": "Apache-2.0",
"homepage": "https://github.com/apache/incubator-kie-tools",
"repository": {
"type": "git",
"url": "https://github.com/apache/incubator-kie-tools.git"
},
"bugs": {
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
"build:dev": "run-script-os",
"build:dev:darwin:linux": "mvn clean install -DskipTests",
"build:dev:win32": "pnpm powershell \"mvn clean install -DskipTests \"",
"build:prod": "pnpm lint && run-script-os",
"build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)",
"build:prod:win32": "pnpm powershell \"mvn clean install `-DskipTests `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"",
"install": "node install.js",
"lint": "echo 'Linting'",
"powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command",
"quarkus:dev": "run-script-os",
"quarkus:dev:darwin:linux": "mvn clean package quarkus:dev -DskipTests",
"quarkus:dev:win32": "mvn clean package quarkus:dev -DskipTests"
},
"devDependencies": {
"@kie-tools/maven-config-setup-helper": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/serverless-workflow-dev-ui-webapp": "workspace:*",
"run-script-os": "^1.1.6"
},
"kieTools": {
"requiredPreinstalledCliCommands": [
"java",
"mvn"
]
}
}
150 changes: 150 additions & 0 deletions packages/sonataflow-quarkus-devui-extension/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>

<modelVersion>4.0.0</modelVersion>
<name>KIE Tools :: SonataFlow Quarkus Dev UI Extension</name>
<groupId>org.apache.kie.sonataflow</groupId>
<version>${revision}</version>
<artifactId>sonataflow-quarkus-devui-extension-parent</artifactId>
<packaging>pom</packaging>

<repositories>
<repository>
<!-- Duplicating the Maven Central repository here (as it is already coming from Super POM) makes the build much faster,
as the Maven Central is now treated as the first (default) repository (because it is before the Apache Nexus one).
Artifacts with release (fixed) versions are being downloaded primarily from there. Without the central being the
first repository the Apache Nexus would be contacted first and since it is quite slow it slows down the build.
We use Apache repo only to download our SNAPSHOTs. -->
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>apache-public-repository-group</id>
<name>Apache Public Repository Group</name>
<url>https://repository.apache.org/content/groups/public/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>

<properties>
<compiler-plugin.version>3.12.1</compiler-plugin.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.resources.plugin>3.2.0</version.resources.plugin>
<java.module.name>org.kie.kogito.quarkus.swf.dev.ui</java.module.name>
<version.flatten.plugin>1.3.0</version.flatten.plugin>
<quarkus.platform.version>3.2.9.Final</quarkus.platform.version>
<version.org.kie.kogito>999-20240218-SNAPSHOT</version.org.kie.kogito>
</properties>

<modules>
<module>sonataflow-quarkus-devui-extension-deployment</module>
<module>sonataflow-quarkus-devui-extension</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${version.flatten.plugin}</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten-revision</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten-revision-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Loading

0 comments on commit daa1d40

Please sign in to comment.