This is an automated email from the ASF dual-hosted git repository.
pefernan pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-runtimes.git
The following commit(s) were added to refs/heads/main by this push:
new e7d1be4b83 NO_ISSUE: Copying resources directly to `target` instead to
`src/main/resources` to keep module sources clean. (#3691)
e7d1be4b83 is described below
commit e7d1be4b83783f97eae5c40b36ca070531889e3c
Author: Pere Fernández <[email protected]>
AuthorDate: Fri Oct 4 15:56:15 2024 +0200
NO_ISSUE: Copying resources directly to `target` instead to
`src/main/resources` to keep module sources clean. (#3691)
* NO_ISSUE: Copying resources directly to `target` instead to
`src/main/resources` to keep module sources clean.
* - fix formatting
* - renamed path variables
* - format
---
addons/common/persistence/postgresql/.gitignore | 20 --------------------
addons/common/persistence/postgresql/pom.xml | 25 ++++++++-----------------
2 files changed, 8 insertions(+), 37 deletions(-)
diff --git a/addons/common/persistence/postgresql/.gitignore
b/addons/common/persistence/postgresql/.gitignore
deleted file mode 100644
index 423a2b902f..0000000000
--- a/addons/common/persistence/postgresql/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-###
-# 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.
-###
-
-/src/main/resources/kie-flyway/db/persistence-postgresql/postgresql/*
\ No newline at end of file
diff --git a/addons/common/persistence/postgresql/pom.xml
b/addons/common/persistence/postgresql/pom.xml
index 581d6edf9f..4b3048dbdb 100644
--- a/addons/common/persistence/postgresql/pom.xml
+++ b/addons/common/persistence/postgresql/pom.xml
@@ -1,4 +1,4 @@
- <!--
+<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -31,9 +31,10 @@
<description>PostgreSQL based persistence for KIE</description>
<properties>
<path.to.jdbc.addon>../jdbc</path.to.jdbc.addon>
-
<path.to.script.folder>src/main/resources/kie-flyway/db/</path.to.script.folder>
-
<path.to.migration.scripts.from>${path.to.jdbc.addon}/${path.to.script.folder}/persistence-jdbc/postgresql</path.to.migration.scripts.from>
-
<path.to.migration.scripts.to>${path.to.script.folder}/persistence-postgresql/postgresql</path.to.migration.scripts.to>
+ <path.to.flyway.location>kie-flyway/db</path.to.flyway.location>
+
<path.to.script.folder>src/main/resources/${path.to.flyway.location}/persistence-jdbc/postgresql</path.to.script.folder>
+
<path.to.migration.scripts.source>${path.to.jdbc.addon}/${path.to.script.folder}</path.to.migration.scripts.source>
+
<path.to.migration.scripts.target>target/classes/${path.to.flyway.location}/persistence-postgresql/postgresql</path.to.migration.scripts.target>
<java.module.name>org.kie.kogito.persistence.postgresql</java.module.name>
</properties>
@@ -117,17 +118,7 @@
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>${path.to.script.folder}</directory>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
-<!-- The cleanest way would be to use the maven-dependency-plugin to unpack
and copy scripts from the built artifact `kie-addons-persistence-jdbc` but
there's a limitation to using this only in the `package` phase whereas we need
that into the `generate-sources` phase. See also
https://issues.apache.org/jira/browse/MDEP-98 -->
+ <!-- The cleanest way would be to use the maven-dependency-plugin to
unpack and copy scripts from the built artifact `kie-addons-persistence-jdbc`
but there's a limitation to using this only in the `package` phase whereas we
need that into the `generate-sources` phase. See also
https://issues.apache.org/jira/browse/MDEP-98 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
@@ -139,10 +130,10 @@
<goal>copy-resources</goal>
</goals>
<configuration>
-
<outputDirectory>${path.to.migration.scripts.to}</outputDirectory>
+
<outputDirectory>${path.to.migration.scripts.target}</outputDirectory>
<resources>
<resource>
- <directory>${path.to.migration.scripts.from}</directory>
+ <directory>${path.to.migration.scripts.source}</directory>
</resource>
</resources>
</configuration>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]