Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NO_ISSUE: Copying resources directly to target instead to src/main/resources to keep module sources clean. #3691

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions addons/common/persistence/postgresql/.gitignore

This file was deleted.

25 changes: 8 additions & 17 deletions addons/common/persistence/postgresql/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
Expand Down Expand Up @@ -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>
pefernan marked this conversation as resolved.
Show resolved Hide resolved
<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>

Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class DecisionCodegen extends AbstractGenerator {
public static final String GENERATOR_NAME = "decisions";

/**
* (boolean) generate java classes to support strongly typed input (default false)
* (boolean) generate java classes to support strongly typed input (default false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gitgabrio looks like one of your Pr's introduced this and was breaking the build :S

*/
public static String STRONGLY_TYPED_CONFIGURATION_KEY = "kogito.decisions.stronglytyped";
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,17 +356,17 @@ protected Collection<GeneratedFile> internalGenerate() {
//Creating and adding the ResourceGenerator for REST generation
if (context().hasRest()) {
ProcessResourceGenerator processResourceGenerator = new ProcessResourceGenerator(
context(),
workFlowProcess,
modelClassGenerator.className(),
execModelGen.className(),
applicationCanonicalName());
context(),
workFlowProcess,
modelClassGenerator.className(),
execModelGen.className(),
applicationCanonicalName());

processResourceGenerator
.withUserTasks(processIdToUserTaskModel.get(workFlowProcess.getId()))
.withSignals(metaData.getSignals())
.withTriggers(metaData.isStartable(), metaData.isDynamic(), metaData.getTriggers())
.withTransaction(isTransactionEnabled());
.withUserTasks(processIdToUserTaskModel.get(workFlowProcess.getId()))
.withSignals(metaData.getSignals())
.withTriggers(metaData.isStartable(), metaData.isDynamic(), metaData.getTriggers())
.withTransaction(isTransactionEnabled());

rgs.add(processResourceGenerator);
}
Expand Down
Loading