tiagobento commented on code in PR #2697: URL: https://github.com/apache/incubator-kie-tools/pull/2697#discussion_r1816994612
########## packages/kogito-db-migrator-tool/.dockerignore: ########## Review Comment: Unnecessary file? There's no Docker in this package. ########## packages/kogito-db-migrator-tool/.gitignore: ########## Review Comment: Unnecessary file? This is all handled by the top-level .gitignore already. ########## packages/kogito-db-migrator-tool/env/index.js: ########## @@ -0,0 +1,47 @@ +/* + * 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({ + KOGITO_DB_MIGRATOR_TOOL__ddl_version: { + default: "10.0.999-SNAPSHOT", + description: "The version to use for ddl.", + }, + KOGITO_DB_MIGRATOR_TOOL__ddl_file_name: { + default: "kogito-ddl-10.0.999-20241018.012042-73-db-scripts.zip", + description: "The file name for ddl.", + }, + KOGITO_DB_MIGRATOR_TOOL__ddl_base_url: { + default: "https://repository.apache.org/content/groups/snapshots/org/kie/kogito/kogito-ddl", + description: "The url from where the ddl file will be downloaded.", + }, Review Comment: Default values here don't make sense. We can't have it point to a fixed version like that, especially a SNAPSHOT version. ########## packages/kogito-db-migrator-tool/pom.xml: ########## @@ -0,0 +1,200 @@ +<?xml version="1.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. +--> +<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" +> + <parent> + <groupId>org.kie</groupId> + <artifactId>kie-tools-maven-base</artifactId> + <version>${revision}</version> + <relativePath>./node_modules/@kie-tools/maven-base/pom.xml</relativePath> + </parent> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.kie.kogito</groupId> + <artifactId>sonataflow-db-migrator</artifactId> + <properties> + <project.build.outputTimestamp>2024-11-01T00:00:00Z</project.build.outputTimestamp> + <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> + <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> + <quarkus.platform.version>3.13.0</quarkus.platform.version> Review Comment: Yes, this is all on `maven-base` already, no need to have it here. And we're currently on Quarkus 3.8.6. ########## packages/kogito-db-migrator-tool/install.js: ########## @@ -0,0 +1,53 @@ +/* + * 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 { env } = require("./env"); +const { setupMavenConfigFile, installMvnw, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); + +setupMavenConfigFile( + ` + --batch-mode + -Dstyle.color=always + -Drevision=${env.kogitoDBMigratorTool.version} + -Dversion.quarkus=${env.versions.quarkus} + -Dversion.org.kie.kogito=${env.versions.kogito} + -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} +`, + { ignoreDefault: true } // Can't have special <repositories> configuration that only works inside this repo. Review Comment: This is not necessary for this package, as it can (and does) declare `maven-base` as its parent. ########## packages/kogito-db-migrator-tool/package.json: ########## @@ -0,0 +1,33 @@ +{ + "private": true, + "name": "@kie-tools/kogito-db-migrator-tool", + "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": "./build-db-migrator-jar.sh true", + "build:prod": "./build-db-migrator-jar.sh false", Review Comment: Yeah, please don't externalize the build scripts. We don't need more indirection here. Especially with this un-nammed `true/false` argument. ########## packages/kogito-db-migrator-tool/pom.xml: ########## @@ -0,0 +1,200 @@ +<?xml version="1.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. +--> +<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" +> + <parent> + <groupId>org.kie</groupId> + <artifactId>kie-tools-maven-base</artifactId> + <version>${revision}</version> + <relativePath>./node_modules/@kie-tools/maven-base/pom.xml</relativePath> + </parent> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.kie.kogito</groupId> + <artifactId>sonataflow-db-migrator</artifactId> + <properties> + <project.build.outputTimestamp>2024-11-01T00:00:00Z</project.build.outputTimestamp> + <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> + <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> + <quarkus.platform.version>3.13.0</quarkus.platform.version> + <skipITs>true</skipITs> + + <jacoco.version>0.8.12</jacoco.version> + <systemrules.version>1.19.0</systemrules.version> Review Comment: These should be in `maven-base` and the necessary plugins declared in `pluginManagement`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
