diff --git a/packages/common/src/lib/types/index.ts b/packages/common/src/lib/types/index.ts index bfc53ef40..c95a07a4b 100644 --- a/packages/common/src/lib/types/index.ts +++ b/packages/common/src/lib/types/index.ts @@ -7,12 +7,6 @@ export type MvnBuildCommandType = 'compile' | 'package' | 'install'; export type ImageType = 'jvm' | 'legacy-jar' | 'native' | 'native-micro'; export type GetVersionFunction = (dir: string) => string; -export type MavenPluginType = - | '@jnxplus/nx-maven' - | '@jnxplus/nx-boot-maven' - | '@jnxplus/nx-quarkus-maven'; +export type MavenPluginType = '@jnxplus/nx-maven'; -export type GradlePluginType = - | '@jnxplus/nx-gradle' - | '@jnxplus/nx-boot-gradle' - | '@jnxplus/nx-quarkus-gradle'; +export type GradlePluginType = '@jnxplus/nx-gradle'; diff --git a/packages/gradle/src/generators/application/generator.ts b/packages/gradle/src/generators/application/generator.ts index 5a17f5245..ee9075d02 100644 --- a/packages/gradle/src/generators/application/generator.ts +++ b/packages/gradle/src/generators/application/generator.ts @@ -97,10 +97,7 @@ function normalizeOptions( const kotlinExtension = dsl === 'kotlin' ? '.kts' : ''; let qVersion = ''; - if ( - plugin === '@jnxplus/nx-quarkus-gradle' || - options.framework === 'quarkus' - ) { + if (options.framework === 'quarkus') { const gradlePropertiesPath = path.join(workspaceRoot, 'gradle.properties'); const gradlePropertiesContent = fs.readFileSync( gradlePropertiesPath, @@ -135,17 +132,11 @@ function addFiles( tree: Tree, options: NormalizedSchema ) { - if ( - plugin === '@jnxplus/nx-boot-gradle' || - options.framework === 'spring-boot' - ) { + if (options.framework === 'spring-boot') { addBootFiles(d, tree, options); } - if ( - plugin === '@jnxplus/nx-quarkus-gradle' || - options.framework === 'quarkus' - ) { + if (options.framework === 'quarkus') { addQuarkusFiles(d, tree, options); } @@ -416,10 +407,7 @@ export default async function ( const targets = projectConfiguration.targets ?? {}; - if ( - plugin === '@jnxplus/nx-boot-gradle' || - options.framework === 'spring-boot' - ) { + if (options.framework === 'spring-boot') { targets['build'].options = { ...targets['build'].options, task: normalizedOptions.packaging === 'war' ? 'bootWar' : 'bootJar', @@ -439,10 +427,7 @@ export default async function ( }; } - if ( - plugin === '@jnxplus/nx-quarkus-gradle' || - options.framework === 'quarkus' - ) { + if (options.framework === 'quarkus') { targets['build'].options = { ...targets['build'].options, task: 'quarkusBuild', diff --git a/packages/gradle/src/generators/library/generator.ts b/packages/gradle/src/generators/library/generator.ts index e77e297d2..ac828219c 100644 --- a/packages/gradle/src/generators/library/generator.ts +++ b/packages/gradle/src/generators/library/generator.ts @@ -109,17 +109,11 @@ function addFiles( tree: Tree, options: NormalizedSchema ) { - if ( - plugin === '@jnxplus/nx-boot-gradle' || - options.framework === 'spring-boot' - ) { + if (options.framework === 'spring-boot') { addBootFiles(d, tree, options); } - if ( - plugin === '@jnxplus/nx-quarkus-gradle' || - options.framework === 'quarkus' - ) { + if (options.framework === 'quarkus') { addQuarkusFiles(d, tree, options); } @@ -342,10 +336,7 @@ export default async function ( const targets = projectConfiguration.targets ?? {}; - if ( - plugin === '@jnxplus/nx-boot-gradle' || - options.framework === 'spring-boot' - ) { + if (options.framework === 'spring-boot') { targets['build'].options = { ...targets['build'].options, task: 'jar', diff --git a/packages/maven/src/generators/application/generator.ts b/packages/maven/src/generators/application/generator.ts index 97ed20f25..3cd25b36a 100644 --- a/packages/maven/src/generators/application/generator.ts +++ b/packages/maven/src/generators/application/generator.ts @@ -133,10 +133,7 @@ function normalizeOptions( const isCustomPort = !!options.port && +options.port !== 8080; let quarkusVersion = ''; - if ( - plugin === '@jnxplus/nx-quarkus-maven' || - options.framework === 'quarkus' - ) { + if (options.framework === 'quarkus') { quarkusVersion = rootPomXmlContent?.childNamed('properties')?.childNamed('quarkus.version') ?.val || 'quarkusVersion'; @@ -378,17 +375,11 @@ function addFiles( tree: Tree, options: NormalizedSchema ) { - if ( - plugin === '@jnxplus/nx-boot-maven' || - options.framework === 'spring-boot' - ) { + if (options.framework === 'spring-boot') { addBootFiles(d, tree, options); } - if ( - plugin === '@jnxplus/nx-quarkus-maven' || - options.framework === 'quarkus' - ) { + if (options.framework === 'quarkus') { addQuarkusFiles(d, tree, options); } @@ -457,10 +448,7 @@ export default async function ( const targets = projectConfiguration.targets ?? {}; - if ( - plugin === '@jnxplus/nx-boot-maven' || - options.framework === 'spring-boot' - ) { + if (options.framework === 'spring-boot') { targets['build'].options = { ...targets['build'].options, task: 'package spring-boot:repackage -DskipTests=true', @@ -480,10 +468,7 @@ export default async function ( }; } - if ( - plugin === '@jnxplus/nx-quarkus-maven' || - options.framework === 'quarkus' - ) { + if (options.framework === 'quarkus') { targets['build-image'] = { executor: `${plugin}:quarkus-build-image`, }; diff --git a/packages/maven/src/generators/library/generator.ts b/packages/maven/src/generators/library/generator.ts index e12315d06..04a18952d 100644 --- a/packages/maven/src/generators/library/generator.ts +++ b/packages/maven/src/generators/library/generator.ts @@ -320,17 +320,11 @@ function addFiles( tree: Tree, options: NormalizedSchema ) { - if ( - plugin === '@jnxplus/nx-boot-maven' || - options.framework === 'spring-boot' - ) { + if (options.framework === 'spring-boot') { addBootFiles(d, tree, options); } - if ( - plugin === '@jnxplus/nx-quarkus-maven' || - options.framework === 'quarkus' - ) { + if (options.framework === 'quarkus') { addQuarkusFiles(d, tree, options); } diff --git a/packages/maven/src/lib/utils/generators.ts b/packages/maven/src/lib/utils/generators.ts index ff7167588..15f02acdd 100644 --- a/packages/maven/src/lib/utils/generators.ts +++ b/packages/maven/src/lib/utils/generators.ts @@ -178,10 +178,7 @@ export function addMissedProperties( throw new Error('Properties tag undefined'); } - if ( - plugin === '@jnxplus/nx-boot-maven' || - options.framework === 'spring-boot' - ) { + if (options.framework === 'spring-boot') { const b = isParentPomExits(xmldoc, 'spring-boot-starter-parent'); if (!b) { const springBootVersion = properties.childNamed('spring.boot.version'); @@ -198,10 +195,7 @@ export function addMissedProperties( } } - if ( - plugin === '@jnxplus/nx-quarkus-maven' || - options.framework === 'quarkus' - ) { + if (options.framework === 'quarkus') { const quarkusVersion = properties.childNamed('quarkus.version'); if (quarkusVersion === undefined) { properties.children.push( diff --git a/packages/nx-boot-gradle/.babelrc b/packages/nx-boot-gradle/.babelrc deleted file mode 100644 index fd4cbcdef..000000000 --- a/packages/nx-boot-gradle/.babelrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "presets": [ - [ - "@nx/js/babel", - { - "useBuiltIns": "usage" - } - ] - ] -} diff --git a/packages/nx-boot-gradle/.eslintrc.json b/packages/nx-boot-gradle/.eslintrc.json deleted file mode 100644 index d8a301053..000000000 --- a/packages/nx-boot-gradle/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/packages/nx-boot-gradle/CHANGELOG.md b/packages/nx-boot-gradle/CHANGELOG.md deleted file mode 100644 index 9f1c36283..000000000 --- a/packages/nx-boot-gradle/CHANGELOG.md +++ /dev/null @@ -1,319 +0,0 @@ -# Changelog - -This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). - -## [9.1.2](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-9.1.1...nx-boot-gradle-9.1.2) (2023-09-10) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.2.0` -* `gradle` updated to version `0.17.0` - - -## [9.1.1](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-9.1.0...nx-boot-gradle-9.1.1) (2023-08-19) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `gradle` updated to version `0.16.1` -* `common` updated to version `0.11.0` - - -# [9.1.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-9.0.0...nx-boot-gradle-9.1.0) (2023-08-09) - -### Dependency Updates - -* `gradle` updated to version `0.16.0` - -### Features - -* deprecate some plugins and provide alternative ([e6725bd](https://github.com/khalilou88/jnxplus/commit/e6725bdbd340de19240c9713837798003cea4e1c)) - - - -# [9.0.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-8.1.0...nx-boot-gradle-9.0.0) (2023-08-05) - -### Dependency Updates - -* `gradle` updated to version `0.15.0` - -### Features - -* add repository to package.json ([f08724a](https://github.com/khalilou88/jnxplus/commit/f08724ac736499548c7dff23ad125f59ed257f73)) -* **executors:** remove deprecated executors from nx-boot plugins ([27ebe79](https://github.com/khalilou88/jnxplus/commit/27ebe793c2dcdf9afbcbc870d68fc6177b7dd086)) - - -### BREAKING CHANGES - -* **executors:** from now we need to change old executors by run-task executor - - - -# [8.1.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-8.0.0...nx-boot-gradle-8.1.0) (2023-07-28) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.2.0` -* `gradle` updated to version `0.14.0` -* `common` updated to version `0.10.0` - -### Features - -* **executors:** deprecate executors ([8afa24b](https://github.com/khalilou88/jnxplus/commit/8afa24b512993e56a012224ec81f07893a6cbce5)) - - - -# [8.0.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.3.5...nx-boot-gradle-8.0.0) (2023-07-12) - -### Dependency Updates - -* `gradle` updated to version `0.13.2` - -### Features - -* **graph:** use gradle task for dep-graph ([a339be5](https://github.com/khalilou88/jnxplus/commit/a339be502cf1447c27c52c7fbe89f1e7d2072268)) - - -### BREAKING CHANGES - -* **graph:** the graph will not work until you add jnxplus gradle plugin to the root project - - - -## [7.3.5](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.3.4...nx-boot-gradle-7.3.5) (2023-07-08) - -### Dependency Updates - -* `gradle` updated to version `0.13.1` -* `common` updated to version `0.9.1` - - -## [7.3.4](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.3.3...nx-boot-gradle-7.3.4) (2023-07-02) - -### Dependency Updates - -* `gradle` updated to version `0.13.0` - - -## [7.3.3](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.3.2...nx-boot-gradle-7.3.3) (2023-06-28) - -### Dependency Updates - -* `gradle` updated to version `0.12.0` - - -## [7.3.2](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.3.1...nx-boot-gradle-7.3.2) (2023-06-24) - -### Dependency Updates - -* `gradle` updated to version `0.11.0` - - -## [7.3.1](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.3.0...nx-boot-gradle-7.3.1) (2023-06-23) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `gradle` updated to version `0.10.1` - - -# [7.3.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.2.0...nx-boot-gradle-7.3.0) (2023-06-21) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `gradle` updated to version `0.10.0` -* `common` updated to version `0.9.0` - -### Bug Fixes - -* fix e2e tests ([#266](https://github.com/khalilou88/jnxplus/issues/266)) ([0e12db4](https://github.com/khalilou88/jnxplus/commit/0e12db4cb10b15142da482f3a63f9e7841f3ef88)) -* fix optional project.json ([#271](https://github.com/khalilou88/jnxplus/issues/271)) ([92e7064](https://github.com/khalilou88/jnxplus/commit/92e70640576a5943bc5be201f8c9885a51f49693)) - - -### Features - -* **generators:** add framework to nx-gradle ([#265](https://github.com/khalilou88/jnxplus/issues/265)) ([2148db4](https://github.com/khalilou88/jnxplus/commit/2148db46ba63acc5d292543142e47c20061a967e)) - - - -# [7.2.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.1.2...nx-boot-gradle-7.2.0) (2023-06-17) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.2.0` -* `internal-generators-files` updated to version `0.1.0` -* `gradle` updated to version `0.9.1` -* `common` updated to version `0.8.1` - -### Features - -* **generators:** reduce code duplication ([#251](https://github.com/khalilou88/jnxplus/issues/251)) ([dfdad1d](https://github.com/khalilou88/jnxplus/commit/dfdad1dfd2ef13303e1c12a4d824261d5bf407be)) -* **generators:** reduce linters files ([#252](https://github.com/khalilou88/jnxplus/issues/252)) ([75c0e76](https://github.com/khalilou88/jnxplus/commit/75c0e769e7917ef91584b4f5dcb5efbff80da6c2)) - - - -## [7.1.2](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.1.1...nx-boot-gradle-7.1.2) (2023-06-09) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.2.0` -* `gradle` updated to version `0.9.0` -* `common` updated to version `0.8.0` - - -## [7.1.1](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.1.0...nx-boot-gradle-7.1.1) (2023-06-09) - -### Dependency Updates - -* `gradle` updated to version `0.8.1` - - -# [7.1.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-7.0.0...nx-boot-gradle-7.1.0) (2023-06-07) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.1.5` -* `gradle` updated to version `0.8.0` -* `common` updated to version `0.7.0` - -### Features - -* **executors:** add publish executor ([0a6a9fa](https://github.com/khalilou88/jnxplus/commit/0a6a9fa36e0f86dd35d93e04b1dfbca7fc8ff3a2)) -* **generators:** export generators [skip ci] ([78a7730](https://github.com/khalilou88/jnxplus/commit/78a7730d83006da48eeff2b0d01227ee651cd5ff)) -* **graph:** use projectDependencyTask to add deps to the graph ([#248](https://github.com/khalilou88/jnxplus/issues/248)) ([f174562](https://github.com/khalilou88/jnxplus/commit/f174562cd77ca1d68ae378927651001c46527579)) - - - -# [7.0.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-6.7.0...nx-boot-gradle-7.0.0) (2023-06-01) - -### Dependency Updates - -* `gradle` updated to version `0.7.0` -* `common` updated to version `0.6.0` - -### Bug Fixes - -* **graph:** set minimum version of nx to 16.3.0 ([3559934](https://github.com/khalilou88/jnxplus/commit/355993462155a27ab620678b1fd358d2f4eed6de)) - - -### BREAKING CHANGES - -* **graph:** Nx version 16.3.0 move hashing to the daemon, that create a breaking change in the plugin - - - -# [6.7.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-6.6.0...nx-boot-gradle-6.7.0) (2023-05-28) - -### Dependency Updates - -* `gradle` updated to version `0.6.0` -* `common` updated to version `0.5.0` - -### Features - -* **executors:** move all gradle executors to gradle lib ([#235](https://github.com/khalilou88/jnxplus/issues/235)) ([86d6740](https://github.com/khalilou88/jnxplus/commit/86d67402517fd92cf505226c31c6af6fa0929b9d)) - - - -# [6.6.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-6.5.0...nx-boot-gradle-6.6.0) (2023-05-27) - -### Dependency Updates - -* `gradle` updated to version `0.5.0` -* `common` updated to version `0.4.0` - -### Bug Fixes - -* **executors:** use pipe output capture ([#233](https://github.com/khalilou88/jnxplus/issues/233)) ([1d295b4](https://github.com/khalilou88/jnxplus/commit/1d295b4548a2b2cbdeb4c7fbb5ceb4fb73a830d8)) - - -### Features - -* **generators:** update spring boot version to 3.1.0 ([#231](https://github.com/khalilou88/jnxplus/issues/231)) ([b050516](https://github.com/khalilou88/jnxplus/commit/b0505163fde06fbcf355a97a75e675c0c5fe8bc3)) - - - -# [6.5.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-6.4.1...nx-boot-gradle-6.5.0) (2023-05-26) - -### Dependency Updates - -* `gradle` updated to version `0.4.0` -* `common` updated to version `0.3.1` - -### Features - -* **generators:** update gradle wrapper version ([b9953ae](https://github.com/khalilou88/jnxplus/commit/b9953ae7607d8b9ca01542627711b79b131d629d)) - - - -## [6.4.1](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-6.4.0...nx-boot-gradle-6.4.1) (2023-05-22) - -### Dependency Updates - -* `gradle` updated to version `0.3.1` - -### Bug Fixes - -* **generators:** add `\t` when adding a dependency to a project ([#217](https://github.com/khalilou88/jnxplus/issues/217)) ([acb752f](https://github.com/khalilou88/jnxplus/commit/acb752f01a735cae98432e22934d457721378a4f)) - - - -# [6.4.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-6.3.1...nx-boot-gradle-6.4.0) (2023-05-21) - -### Dependency Updates - -* `gradle` updated to version `0.3.0` - -### Bug Fixes - -* **generators:** don't generate extras lines in templates ([#216](https://github.com/khalilou88/jnxplus/issues/216)) ([fd2835c](https://github.com/khalilou88/jnxplus/commit/fd2835ce58f0b67c0d02ec0586744735e94330b1)) - - -### Features - -* **generators:** read gradle dsl from root project ([#214](https://github.com/khalilou88/jnxplus/issues/214)) ([ddf52d0](https://github.com/khalilou88/jnxplus/commit/ddf52d0e0886081c2c4b3176488e1779457defeb)) - - - -## [6.3.1](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-6.3.0...nx-boot-gradle-6.3.1) (2023-05-19) - -### Dependency Updates - -* `gradle` updated to version `0.2.1` -* `common` updated to version `0.3.0` - -### Bug Fixes - -* **nx-boot-gradle:** refactor deps graph ([#212](https://github.com/khalilou88/jnxplus/issues/212)) ([ad50fc6](https://github.com/khalilou88/jnxplus/commit/ad50fc6302e981080040a9343def126015b1e216)) - - - -# [6.3.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-6.2.0...nx-boot-gradle-6.3.0) (2023-05-17) - -### Dependency Updates - -* `gradle` updated to version `0.2.0` -* `common` updated to version `0.2.4` - -### Bug Fixes - -* **nx-boot-gradle:** fix gitattributes content [skip ci] ([e4cd677](https://github.com/khalilou88/jnxplus/commit/e4cd677cb51b44ba371e4106861d758a9c90146a)) - - -### Features - -* **nx-boot-gradle:** use addOrUpdateGitattributes from gradle lib ([9eaf8dc](https://github.com/khalilou88/jnxplus/commit/9eaf8dcd944fa436184fc9d601b46538e038d138)) - - - -# [6.2.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-gradle-6.1.4...nx-boot-gradle-6.2.0) (2023-05-13) - -### Dependency Updates - -- `gradle` updated to version `0.1.6` -- `common` updated to version `0.2.3` - -### Features - -- **nx-boot-gradle:** add ktformat executor ([#196](https://github.com/khalilou88/jnxplus/issues/196)) ([9266914](https://github.com/khalilou88/jnxplus/commit/9266914a661b0ffa329a1a4470db14fd586e1dfe)) diff --git a/packages/nx-boot-gradle/CHANGELOG_ARCHIVE.md b/packages/nx-boot-gradle/CHANGELOG_ARCHIVE.md deleted file mode 100644 index ae24d5692..000000000 --- a/packages/nx-boot-gradle/CHANGELOG_ARCHIVE.md +++ /dev/null @@ -1,133 +0,0 @@ -# Changelog - -# 6.0.0 (2023-05-06) - -- Update Nx to version 16.1.0 -- Add port option to app generator -- Refactor code to use shared libs -- Install linters with postinstall script - -# 5.4.0 (2023-04-30) - -- Add .gitattributes -- Add simpleName option to app and lib generators -- Add minimal option to app generator -- Add skipStarterCode option to lib generator -- Rework lint and kformat executors to remove dependencies to checkstyle, ktlint and pmd internal projects -- Bug Fixes - -## BREAKING CHANGES - -- App and lib generators : Remove packageNameType option and add instead simplePackageName option -- Lint executor with PMD option : to use PMD, you need to install it on your machine. Please follow this link for the instruction : https://docs.pmd-code.org/latest/pmd_userdocs_installation.html#running-pmd-via-command-line - -# 5.3.0 (2023-04-10) - -- Add root project to the dep graph - -# 5.2.1 (2023-04-08) - -- Init Generator : Fix when prettierignore don't exist - -# 5.2.0 (2023-04-06) - -- Calculate dep graph for all gradle projects - -# 5.1.0 (2023-04-05) - -- Add run-task executor -- Update Nx to version 15.8.7 - -# 5.0.0 (2022-12-25) - -- Add Spring Boot 3 support - -# 3.1.0 (2022-12-03) - -- Remove dash from packageName when generating apps and libs -- Update Nx to version 15.2.4 - -# 3.0.0 (2022-11-28) - -- Update Nx to version 15 - -# 2.5.1 (2022-09-20) - -- Fix plugin install with better use of peerDependencies and dependencies - -# 2.4.0 (2022-08-26) - -- Use peerDependencies -- Add packageNameType option to choose between short and long packageName -- Update Nx to latest version (14.5.10) - -# 2.3.0 (2022-06-24) - -- Run commands from workspace root -- Update Nx - -# 2.2.1 (2022-06-14) - -- Fix serve app with no args -- Update Nx - -# 2.2.0 (2022-06-10) - -- Update Nx to version 14.2.4 - -# 2.1.1 (2022-06-10) - -- Use patch release for deps - -# 2.1.0 (2022-06-09) - -- Add args to serve executor -- Update Nx - -# 2.0.1 (2022-04-27) - -- Update Nx - -# 2.0.0 (2022-04-22) - -- Upgrade to Nx 14 - -# 1.5.2 (2022-03-16) - -- Init Generator : fix javaVersion type to match string and number - -# 1.5.1 (2022-03-09) - -- Make graph backward compatible - -# 1.5.0 (2022-03-08) - -- new build-image executor -- new migrate generator -- Refactor directory option - -# 1.3.1 (2022-02-23) - -- Fix dep graph for libs inside folders - -# 1.3.0 (2022-02-15) - -- Update Gradle wrapper and spring boot versions - -# 1.2.1 (2022-01-31) - -- Update lint deps - -# 1.2.0 (2022-01-25) - -- Fix lint kotlin projects -- Add kformat to format kotlin projects - -# 1.1.0 (2022-01-04) - -This release contains some deps update. - -# 1.0.2 (2021-12-24) - -This release adds Nx 13 support. -For Nx 12, use the version < 1. diff --git a/packages/nx-boot-gradle/README.md b/packages/nx-boot-gradle/README.md deleted file mode 100644 index c8f016e05..000000000 --- a/packages/nx-boot-gradle/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# Plugin deprecated - -Plugin deprecated, use @jnxplus/nx-gradle instead. - -# @jnxplus/nx-boot-gradle - -[![npm version](https://badge.fury.io/js/@jnxplus%2Fnx-boot-gradle.svg)](https://badge.fury.io/js/@jnxplus%2Fnx-boot-gradle) - -This plugin adds Spring Boot and Gradle multi-project builds capabilities to Nx workspace. - -Here is a quick overview of the plugin, to know more, please visit [the documentation](https://khalilou88.github.io/jnxplus/). - -## Supported versions - -| @jnxplus/nx-boot-gradle | Nx version range | Spring Boot | -| ----------------------- | ------------------- | ----------- | -| 7.x.x | >=16.3.0 | 3.x.x | -| 6.x.x | >=16.0.0 && <16.3.0 | 3.x.x | -| 5.x.x | 15.x.x | 3.x.x | - -## Getting Started - -### 0. Prerequisites - -`@jnxplus/nx-boot-gradle` requires a Java 17 or higher Runtime Environment and the current Long Term Support (LTS) version of node.js. - -### 1. Install the plugin - -In the Nx workspace root folder, run this command to install the plugin : - -```bash -npm install --save-dev @jnxplus/nx-boot-gradle -``` - -### 2. Add Spring boot and Gradle wrapper support - -The following command adds Spring boot and Gradle support (Gradle wrapper and config files) to the workspace. This only needs to be performed once per workspace. - -```bash -nx generate @jnxplus/nx-boot-gradle:init -``` - -### 3. Usage - -| Action | Command | -| ------------------------------------ | ------------------------------------------------------------- | -| Generate an application | `nx generate @jnxplus/nx-boot-gradle:application my-app-name` | -| Generate a library | `nx generate @jnxplus/nx-boot-gradle:library my-lib-name` | -| Build a project | `nx build my-project-name` | -| Serve an application | `nx serve my-app-name` | -| Test a project | `nx test my-project-name` | -| Lint a project | `nx lint my-project-name` | -| Format a java project | `nx format --projects my-project-name` | -| Format a kotlin project | `nx ktformat my-project-name` | -| Run a custom task | `nx run-task my-project-name --task="test"` | -| Visualize project's dependency graph | `nx graph` | - -## License - -MIT © 2021-2023 Khalil LAGRIDA diff --git a/packages/nx-boot-gradle/executors.json b/packages/nx-boot-gradle/executors.json deleted file mode 100644 index 78367dbcc..000000000 --- a/packages/nx-boot-gradle/executors.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "executors": { - "run-task": { - "implementation": "@jnxplus/gradle/src/executors/run-task/executor", - "schema": "@jnxplus/gradle/src/executors/run-task/schema.json", - "description": "run-task executor" - }, - "lint": { - "implementation": "@jnxplus/gradle/src/executors/lint/executor", - "schema": "@jnxplus/common/src/executors/lint/schema.json", - "description": "lint executor" - }, - "ktformat": { - "implementation": "@jnxplus/gradle/src/executors/ktformat/executor", - "schema": "@jnxplus/common/src/executors/ktformat/schema.json", - "description": "kotlin format executor" - } - } -} diff --git a/packages/nx-boot-gradle/generators.json b/packages/nx-boot-gradle/generators.json deleted file mode 100644 index 75b8c41d4..000000000 --- a/packages/nx-boot-gradle/generators.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "name": "nx-boot-gradle", - "version": "0.0.1", - "generators": { - "init": { - "factory": "./src/generators/init/generator", - "schema": "./src/generators/init/schema.json", - "description": "init generator" - }, - "migrate": { - "factory": "./src/generators/migrate/generator", - "schema": "./src/generators/migrate/schema.json", - "description": "migrate generator" - }, - "application": { - "factory": "./src/generators/application/generator", - "schema": "./src/generators/application/schema.json", - "aliases": ["app"], - "x-type": "application", - "description": "application generator" - }, - "library": { - "factory": "./src/generators/library/generator", - "schema": "./src/generators/library/schema.json", - "aliases": ["lib"], - "x-type": "library", - "description": "library generator" - } - } -} diff --git a/packages/nx-boot-gradle/jest.config.ts b/packages/nx-boot-gradle/jest.config.ts deleted file mode 100644 index f194f337d..000000000 --- a/packages/nx-boot-gradle/jest.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'nx-boot-gradle', - - globals: {}, - testEnvironment: 'node', - transform: { - '^.+\\.[tj]sx?$': [ - 'ts-jest', - { - tsconfig: '/tsconfig.spec.json', - }, - ], - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/packages/nx-boot-gradle', - preset: '../../jest.preset.js', -}; diff --git a/packages/nx-boot-gradle/package.json b/packages/nx-boot-gradle/package.json deleted file mode 100644 index 972a1b5a2..000000000 --- a/packages/nx-boot-gradle/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@jnxplus/nx-boot-gradle", - "version": "9.1.2", - "type": "commonjs", - "main": "src/index.js", - "generators": "./generators.json", - "executors": "./executors.json", - "private": false, - "publishConfig": { - "access": "public" - }, - "license": "MIT", - "author": "Khalil LAGRIDA", - "homepage": "https://github.com/khalilou88/jnxplus/blob/main/packages/nx-boot-gradle/README.md", - "bugs": { - "url": "https://github.com/khalilou88/jnxplus/issues" - }, - "keywords": [ - "nx", - "nx-workspace", - "nx-plugin", - "java", - "spring", - "spring-boot", - "gradle", - "gradle multi-project build" - ], - "scripts": { - "postinstall": "node src/scripts/install-linters.js" - }, - "dependencies": { - "prettier": "^2.8.7", - "prettier-plugin-java": "^2.1.0" - }, - "peerDependencies": { - "@nx/devkit": ">=16.3.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/khalilou88/jnxplus.git", - "directory": "packages/nx-boot-gradle" - } -} diff --git a/packages/nx-boot-gradle/project.json b/packages/nx-boot-gradle/project.json deleted file mode 100644 index b64166194..000000000 --- a/packages/nx-boot-gradle/project.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "name": "nx-boot-gradle", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "packages/nx-boot-gradle/src", - "projectType": "library", - "targets": { - "build": { - "executor": "@nx/js:tsc", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/packages/nx-boot-gradle", - "main": "packages/nx-boot-gradle/src/index.ts", - "packageJson": "packages/nx-boot-gradle/package.json", - "tsConfig": "packages/nx-boot-gradle/tsconfig.lib.json", - "updateBuildableProjectDepsInPackageJson": true, - "buildableProjectDepsInPackageJsonType": "dependencies", - "assets": [ - "packages/nx-boot-gradle/*.md", - { - "input": "./packages/nx-boot-gradle/src", - "glob": "**/!(*.ts)", - "output": "./src" - }, - { - "input": "./packages/nx-boot-gradle/src", - "glob": "**/*.d.ts", - "output": "./src" - }, - { - "input": "./packages/nx-boot-gradle", - "glob": "generators.json", - "output": "." - }, - { - "input": "./packages/nx-boot-gradle", - "glob": "executors.json", - "output": "." - }, - { - "input": "./packages/gradle-plugin", - "glob": "gradle/**", - "output": "./src/generators/init/files/gradle/wrapper" - }, - { - "input": "./packages/gradle-plugin", - "glob": "gradlew", - "output": "./src/generators/init/files/gradle/wrapper" - }, - { - "input": "./packages/gradle-plugin", - "glob": "gradlew.bat", - "output": "./src/generators/init/files/gradle/wrapper" - }, - { - "input": "./packages/internal/generators-files/boot/application/shared", - "glob": "**", - "output": "./src/generators/application/files/boot" - }, - { - "input": "./packages/internal/generators-files/boot/application/gradle", - "glob": "**", - "output": "./src/generators/application/files/boot" - }, - { - "input": "./packages/internal/generators-files/boot/library/shared", - "glob": "**", - "output": "./src/generators/library/files/boot" - }, - { - "input": "./packages/internal/generators-files/boot/library/gradle", - "glob": "**", - "output": "./src/generators/library/files/boot" - }, - { - "input": "./packages/internal/generators-files", - "glob": "linters/**", - "output": "./src/generators/init/files" - } - ] - } - }, - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["packages/nx-boot-gradle/**/*.ts"] - } - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/packages/nx-boot-gradle"], - "options": { - "jestConfig": "packages/nx-boot-gradle/jest.config.ts", - "passWithNoTests": true - } - }, - "version": { - "executor": "@jscutlery/semver:version", - "options": { - "preset": "angular", - "trackDeps": true, - "push": true, - "noVerify": true, - "postTargets": ["nx-boot-gradle:github", "nx-boot-gradle:publish"], - "commitMessageFormat": "release: cut release ${version} of ${projectName}" - } - }, - "github": { - "executor": "@jscutlery/semver:github", - "options": { - "tag": "${tag}", - "notes": "${notes}" - } - }, - "publish": { - "executor": "ngx-deploy-npm:deploy", - "options": { - "access": "public" - } - } - }, - "tags": [], - "implicitDependencies": ["gradle-plugin", "internal-generators-files"] -} diff --git a/packages/nx-boot-gradle/src/dep-graph/lookup-deps.ts b/packages/nx-boot-gradle/src/dep-graph/lookup-deps.ts deleted file mode 100644 index 0d59cd95a..000000000 --- a/packages/nx-boot-gradle/src/dep-graph/lookup-deps.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { addProjectsAndDependenciesFromTask } from '@jnxplus/gradle'; -import { - ProjectGraph, - ProjectGraphBuilder, - ProjectGraphProcessorContext, -} from '@nx/devkit'; - -export function processProjectGraph( - graph: ProjectGraph, - context: ProjectGraphProcessorContext -): ProjectGraph { - const builder = new ProjectGraphBuilder(graph); - addProjectsAndDependenciesFromTask( - builder, - context, - '@jnxplus/nx-boot-gradle' - ); - return builder.getUpdatedProjectGraph(); -} diff --git a/packages/nx-boot-gradle/src/generators/application/generator.ts b/packages/nx-boot-gradle/src/generators/application/generator.ts deleted file mode 100644 index f961eb669..000000000 --- a/packages/nx-boot-gradle/src/generators/application/generator.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { applicationGenerator } from '@jnxplus/gradle'; -import { Tree } from '@nx/devkit'; -import { NxBootGradleAppGeneratorSchema } from './schema'; - -export default async function ( - tree: Tree, - options: NxBootGradleAppGeneratorSchema -) { - await applicationGenerator( - __dirname, - '@jnxplus/nx-boot-gradle', - tree, - options - ); -} diff --git a/packages/nx-boot-gradle/src/generators/application/schema.d.ts b/packages/nx-boot-gradle/src/generators/application/schema.d.ts deleted file mode 100644 index 5442cab24..000000000 --- a/packages/nx-boot-gradle/src/generators/application/schema.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { LanguageType, PackagingType } from '@jnxplus/common'; - -export interface NxBootGradleAppGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - simplePackageName?: boolean; - language: LanguageType; - groupId: string; - projectVersion: string; - packaging: PackagingType; - configFormat: '.properties' | '.yml'; - minimal?: boolean; - port?: string | number; -} diff --git a/packages/nx-boot-gradle/src/generators/application/schema.json b/packages/nx-boot-gradle/src/generators/application/schema.json deleted file mode 100644 index 9ef2865bd..000000000 --- a/packages/nx-boot-gradle/src/generators/application/schema.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxBootGradleApp", - "title": "Create an application", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the app name", - "type": "boolean", - "default": false - }, - "simplePackageName": { - "description": "Don't include the directory in the package name", - "type": "boolean", - "default": false - }, - "language": { - "description": "Language of the project", - "type": "string", - "default": "java", - "x-prompt": { - "message": "Which language would you like to use?", - "type": "list", - "items": [ - { - "value": "java", - "label": "Java" - }, - { - "value": "kotlin", - "label": "Kotlin" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "com.example", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "packaging": { - "description": "Packaging of the project", - "type": "string", - "default": "jar", - "x-prompt": { - "message": "Which packaging would you like to use?", - "type": "list", - "items": [ - { - "value": "jar", - "label": "Jar" - }, - { - "value": "war", - "label": "War" - } - ] - } - }, - "configFormat": { - "description": "Configuration format of the project", - "type": "string", - "default": ".properties", - "x-prompt": { - "message": "Which configuration format would you like to use?", - "type": "list", - "items": [ - { - "value": ".properties", - "label": "Properties" - }, - { - "value": ".yml", - "label": "Yaml" - } - ] - } - }, - "minimal": { - "description": "Generate an app with a minimal setup", - "type": "boolean", - "default": false - }, - "port": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "default": 8080, - "description": "Port to start the server at. Default is 8080." - } - }, - "required": [ - "name", - "language", - "groupId", - "projectVersion", - "packaging", - "configFormat" - ] -} diff --git a/packages/nx-boot-gradle/src/generators/init/files/gradle/config/build.gradle__kotlinExtension__ b/packages/nx-boot-gradle/src/generators/init/files/gradle/config/build.gradle__kotlinExtension__ deleted file mode 100644 index 15642825a..000000000 --- a/packages/nx-boot-gradle/src/generators/init/files/gradle/config/build.gradle__kotlinExtension__ +++ /dev/null @@ -1,9 +0,0 @@ -plugins { -<% if(dsl === 'groovy') { -%> - id 'io.github.khalilou88.jnxplus' -<% } -%> -<% if(dsl === 'kotlin') { -%> - id("io.github.khalilou88.jnxplus") -<% } -%> -} - diff --git a/packages/nx-boot-gradle/src/generators/init/files/gradle/config/gradle.properties b/packages/nx-boot-gradle/src/generators/init/files/gradle/config/gradle.properties deleted file mode 100644 index 16d3eade0..000000000 --- a/packages/nx-boot-gradle/src/generators/init/files/gradle/config/gradle.properties +++ /dev/null @@ -1,9 +0,0 @@ -#Gradle properties -javaVersion=<%= javaVersion %> -kotlinVersion=<%= kotlinVersion %> -springBootVersion=<%= springBootVersion %> -springDependencyManagementVersion=<%= springDependencyManagementVersion %> -jnxplusGradlePluginVersion=<%= jnxplusGradlePluginVersion %> -checkstyleVersion=<%= checkstyleVersion %> -ktlintVersion=<%= ktlintVersion %> - diff --git a/packages/nx-boot-gradle/src/generators/init/files/gradle/config/settings.gradle__kotlinExtension__ b/packages/nx-boot-gradle/src/generators/init/files/gradle/config/settings.gradle__kotlinExtension__ deleted file mode 100644 index 63234045e..000000000 --- a/packages/nx-boot-gradle/src/generators/init/files/gradle/config/settings.gradle__kotlinExtension__ +++ /dev/null @@ -1,42 +0,0 @@ -<% if(dsl === 'groovy') { -%> -pluginManagement { - plugins { - id 'org.springframework.boot' version "${springBootVersion}" - id 'io.spring.dependency-management' version "${springDependencyManagementVersion}" - id 'org.jetbrains.kotlin.jvm' version "${kotlinVersion}" - id 'org.jetbrains.kotlin.plugin.spring' version "${kotlinVersion}" - id 'io.github.khalilou88.jnxplus' version "${jnxplusGradlePluginVersion}" - } -<% if(generateRepositories) { -%> - repositories { - mavenCentral() - gradlePluginPortal() - mavenLocal() - } -<% } -%> -} -rootProject.name = '<%= rootProjectName %>' -<% } -%> -<% if(dsl === 'kotlin') { -%> -pluginManagement { - val springBootVersion: String by settings - val springDependencyManagementVersion: String by settings - val kotlinVersion: String by settings - val jnxplusGradlePluginVersion: String by settings - plugins { - id("org.springframework.boot") version springBootVersion - id("io.spring.dependency-management") version springDependencyManagementVersion - id("org.jetbrains.kotlin.jvm") version kotlinVersion - id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion - id("io.github.khalilou88.jnxplus") version jnxplusGradlePluginVersion - } -<% if(generateRepositories) { -%> - repositories { - mavenCentral() - gradlePluginPortal() - mavenLocal() - } -<% } -%> -} -rootProject.name = "<%= rootProjectName %>" -<% } -%> diff --git a/packages/nx-boot-gradle/src/generators/init/generator.ts b/packages/nx-boot-gradle/src/generators/init/generator.ts deleted file mode 100644 index 3d6a545b0..000000000 --- a/packages/nx-boot-gradle/src/generators/init/generator.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { - checkstyleVersion, - springDependencyManagementVersion, - ktlintVersion, - springBootVersion, - kotlinVersion, - updateNxJson, - jnxplusGradlePluginVersion, -} from '@jnxplus/common'; -import { - addOrUpdateGitattributes, - addOrUpdatePrettierIgnore, - updateGitIgnore, -} from '@jnxplus/gradle'; -import { Tree, formatFiles, generateFiles, offsetFromRoot } from '@nx/devkit'; -import * as path from 'path'; -import { NxBootGradleGeneratorSchema } from './schema'; - -interface NormalizedSchema extends NxBootGradleGeneratorSchema { - kotlinExtension: string; - springBootVersion: string; - springDependencyManagementVersion: string; - kotlinVersion: string; - checkstyleVersion: string; - ktlintVersion: string; - jnxplusGradlePluginVersion: string; - generateRepositories: boolean; -} - -function normalizeOptions( - tree: Tree, - options: NxBootGradleGeneratorSchema -): NormalizedSchema { - const kotlinExtension = options.dsl === 'kotlin' ? '.kts' : ''; - - const generateRepositories = process.env['NODE_ENV'] === 'test'; - - return { - ...options, - kotlinExtension, - springBootVersion, - springDependencyManagementVersion, - kotlinVersion, - checkstyleVersion, - ktlintVersion, - jnxplusGradlePluginVersion, - generateRepositories, - }; -} - -function addFiles(tree: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - offsetFromRoot: offsetFromRoot(tree.root), - template: '', - }; - generateFiles( - tree, - path.join(__dirname, 'files', 'gradle', 'wrapper'), - '', - templateOptions - ); - generateFiles( - tree, - path.join(__dirname, 'files', 'gradle', 'config'), - '', - templateOptions - ); - generateFiles( - tree, - path.join(__dirname, 'files', 'linters'), - 'tools/linters', - templateOptions - ); -} - -export default async function ( - tree: Tree, - options: NxBootGradleGeneratorSchema -) { - const normalizedOptions = normalizeOptions(tree, options); - addFiles(tree, normalizedOptions); - updateNxJson(tree, '@jnxplus/nx-boot-gradle'); - updateGitIgnore(tree); - addOrUpdatePrettierIgnore(tree); - addOrUpdateGitattributes(tree); - tree.changePermissions('gradlew', '755'); - tree.changePermissions('gradlew.bat', '755'); - await formatFiles(tree); -} diff --git a/packages/nx-boot-gradle/src/generators/init/schema.d.ts b/packages/nx-boot-gradle/src/generators/init/schema.d.ts deleted file mode 100644 index 7a808d7f7..000000000 --- a/packages/nx-boot-gradle/src/generators/init/schema.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { DSLType } from '@jnxplus/common'; - -export interface NxBootGradleGeneratorSchema { - javaVersion: string | number; - dsl: DSLType; - rootProjectName: string; -} diff --git a/packages/nx-boot-gradle/src/generators/init/schema.json b/packages/nx-boot-gradle/src/generators/init/schema.json deleted file mode 100644 index 7bebf9da0..000000000 --- a/packages/nx-boot-gradle/src/generators/init/schema.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxBootGradleInit", - "title": "Init", - "type": "object", - "properties": { - "javaVersion": { - "description": "Java version", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "default": "17", - "x-prompt": { - "message": "Which version of Java would you like to use?", - "type": "list", - "items": [ - { - "value": "21", - "label": "21" - }, - { - "value": "17", - "label": "17" - } - ] - } - }, - "dsl": { - "description": "Build DSL", - "type": "string", - "default": "groovy", - "x-prompt": { - "message": "Which build DSL would you like to use?", - "type": "list", - "items": [ - { - "value": "groovy", - "label": "Groovy build DSL" - }, - { - "value": "kotlin", - "label": "Kotlin build DSL" - } - ] - } - }, - "rootProjectName": { - "type": "string", - "default": "spring-boot-root-project", - "x-prompt": "What rootProjectName would you like to use?", - "pattern": "^[a-zA-Z].*$" - } - }, - "required": ["javaVersion", "dsl", "rootProjectName"] -} diff --git a/packages/nx-boot-gradle/src/generators/library/generator.ts b/packages/nx-boot-gradle/src/generators/library/generator.ts deleted file mode 100644 index f3fe14691..000000000 --- a/packages/nx-boot-gradle/src/generators/library/generator.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { libraryGenerator } from '@jnxplus/gradle'; -import { Tree } from '@nx/devkit'; -import { NxBootGradleLibGeneratorSchema } from './schema'; - -export default async function ( - tree: Tree, - options: NxBootGradleLibGeneratorSchema -) { - await libraryGenerator(__dirname, '@jnxplus/nx-boot-gradle', tree, options); -} diff --git a/packages/nx-boot-gradle/src/generators/library/schema.d.ts b/packages/nx-boot-gradle/src/generators/library/schema.d.ts deleted file mode 100644 index 8d83df611..000000000 --- a/packages/nx-boot-gradle/src/generators/library/schema.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { LanguageType } from '@jnxplus/common'; - -export interface NxBootGradleLibGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - simplePackageName?: boolean; - language: LanguageType; - groupId: string; - projectVersion: string; - projects?: string; - skipStarterCode?: boolean; -} diff --git a/packages/nx-boot-gradle/src/generators/library/schema.json b/packages/nx-boot-gradle/src/generators/library/schema.json deleted file mode 100644 index aa44fdcab..000000000 --- a/packages/nx-boot-gradle/src/generators/library/schema.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxBootGradleLib", - "title": "Create a library", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the lib name", - "type": "boolean", - "default": false - }, - "simplePackageName": { - "description": "Don't include the directory in the package name", - "type": "boolean", - "default": false - }, - "language": { - "description": "Language of the project", - "type": "string", - "default": "java", - "x-prompt": { - "message": "Which language would you like to use?", - "type": "list", - "items": [ - { - "value": "java", - "label": "Java" - }, - { - "value": "kotlin", - "label": "Kotlin" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "com.example", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "projects": { - "type": "string", - "description": "Projects where the library should be added (comma delimited)" - }, - "skipStarterCode": { - "description": "Skip starter code", - "type": "boolean", - "default": false - } - }, - "required": ["name", "language", "groupId", "projectVersion"] -} diff --git a/packages/nx-boot-gradle/src/generators/migrate/generator.ts b/packages/nx-boot-gradle/src/generators/migrate/generator.ts deleted file mode 100644 index 995607340..000000000 --- a/packages/nx-boot-gradle/src/generators/migrate/generator.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { formatFiles, generateFiles, offsetFromRoot, Tree } from '@nx/devkit'; -import * as path from 'path'; -import { NxBootGradleMigrateGeneratorSchema } from './schema'; - -interface NormalizedSchema extends NxBootGradleMigrateGeneratorSchema {} // eslint-disable-line - -function normalizeOptions( - tree: Tree, - options: NxBootGradleMigrateGeneratorSchema -): NormalizedSchema { - return { - ...options, - }; -} - -function addFiles(tree: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - offsetFromRoot: offsetFromRoot(tree.root), - template: '', - }; - generateFiles( - tree, - path.join(__dirname, '..', 'init', 'files', 'gradle', 'wrapper'), - '', - templateOptions - ); -} - -export default async function ( - tree: Tree, - options: NxBootGradleMigrateGeneratorSchema -) { - const normalizedOptions = normalizeOptions(tree, options); - addFiles(tree, normalizedOptions); - tree.changePermissions('gradlew', '755'); - tree.changePermissions('gradlew.bat', '755'); - await formatFiles(tree); -} diff --git a/packages/nx-boot-gradle/src/generators/migrate/schema.d.ts b/packages/nx-boot-gradle/src/generators/migrate/schema.d.ts deleted file mode 100644 index 23085beea..000000000 --- a/packages/nx-boot-gradle/src/generators/migrate/schema.d.ts +++ /dev/null @@ -1 +0,0 @@ -export interface NxBootGradleMigrateGeneratorSchema {} // eslint-disable-line diff --git a/packages/nx-boot-gradle/src/generators/migrate/schema.json b/packages/nx-boot-gradle/src/generators/migrate/schema.json deleted file mode 100644 index 1f85e3218..000000000 --- a/packages/nx-boot-gradle/src/generators/migrate/schema.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxBootGradleMigrate", - "title": "Migrate", - "type": "object", - "properties": {}, - "required": [] -} diff --git a/packages/nx-boot-gradle/src/index.ts b/packages/nx-boot-gradle/src/index.ts deleted file mode 100644 index 57cd00dc0..000000000 --- a/packages/nx-boot-gradle/src/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export { processProjectGraph } from './dep-graph/lookup-deps'; - -import initGenerator from './generators/init/generator'; -import libraryGenerator from './generators/library/generator'; -import applicationGenerator from './generators/application/generator'; -import migrateGenerator from './generators/migrate/generator'; - -export { - initGenerator, - libraryGenerator, - applicationGenerator, - migrateGenerator, -}; diff --git a/packages/nx-boot-gradle/src/scripts/install-linters.ts b/packages/nx-boot-gradle/src/scripts/install-linters.ts deleted file mode 100644 index b7369c8bc..000000000 --- a/packages/nx-boot-gradle/src/scripts/install-linters.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { getCheckstylePath, getKtlintPath, isE2eTest } from '@jnxplus/common'; -import { getCheckstyleVersion, getKtlintVersion } from '@jnxplus/gradle'; -import { logger, workspaceRoot } from '@nx/devkit'; -import * as path from 'path'; - -(async () => { - if (process.env['NX_VERBOSE_LOGGING'] === 'true') { - logger.debug('Install Linters'); - } - - let workspaceRootToUse = workspaceRoot; - const tmpWorkspaceRoot = path.join( - workspaceRootToUse, - 'tmp', - 'nx-e2e', - 'proj' - ); - - if (isE2eTest(tmpWorkspaceRoot)) { - workspaceRootToUse = tmpWorkspaceRoot; - } - - await getCheckstylePath(getCheckstyleVersion, workspaceRootToUse); - await getKtlintPath(getKtlintVersion, workspaceRootToUse); -})(); diff --git a/packages/nx-boot-gradle/tsconfig.json b/packages/nx-boot-gradle/tsconfig.json deleted file mode 100644 index f5b85657a..000000000 --- a/packages/nx-boot-gradle/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "module": "commonjs", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} diff --git a/packages/nx-boot-gradle/tsconfig.lib.json b/packages/nx-boot-gradle/tsconfig.lib.json deleted file mode 100644 index 8c2b823a8..000000000 --- a/packages/nx-boot-gradle/tsconfig.lib.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "../../dist/out-tsc", - "declaration": true, - "types": ["node"] - }, - "exclude": ["**/*.spec.ts", "jest.config.ts"], - "include": ["**/*.ts"] -} diff --git a/packages/nx-boot-gradle/tsconfig.spec.json b/packages/nx-boot-gradle/tsconfig.spec.json deleted file mode 100644 index 46bad9671..000000000 --- a/packages/nx-boot-gradle/tsconfig.spec.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.d.ts", - "jest.config.ts" - ] -} diff --git a/packages/nx-boot-maven/.babelrc b/packages/nx-boot-maven/.babelrc deleted file mode 100644 index fd4cbcdef..000000000 --- a/packages/nx-boot-maven/.babelrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "presets": [ - [ - "@nx/js/babel", - { - "useBuiltIns": "usage" - } - ] - ] -} diff --git a/packages/nx-boot-maven/.eslintrc.json b/packages/nx-boot-maven/.eslintrc.json deleted file mode 100644 index d8a301053..000000000 --- a/packages/nx-boot-maven/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/packages/nx-boot-maven/CHANGELOG.md b/packages/nx-boot-maven/CHANGELOG.md deleted file mode 100644 index ef5f7e252..000000000 --- a/packages/nx-boot-maven/CHANGELOG.md +++ /dev/null @@ -1,235 +0,0 @@ -# Changelog - -This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). - -## [8.0.3](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-8.0.2...nx-boot-maven-8.0.3) (2023-09-10) - -### Dependency Updates - -* `maven` updated to version `0.11.0` - - -## [8.0.2](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-8.0.1...nx-boot-maven-8.0.2) (2023-08-19) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `maven` updated to version `0.10.0` -* `common` updated to version `0.11.0` - - -## [8.0.1](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-8.0.0...nx-boot-maven-8.0.1) (2023-08-09) - -### Dependency Updates - -* `maven` updated to version `0.9.0` - - -# [8.0.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-7.3.0...nx-boot-maven-8.0.0) (2023-08-05) - -### Dependency Updates - -* `maven` updated to version `0.8.0` - -### Features - -* add repository to package.json ([f08724a](https://github.com/khalilou88/jnxplus/commit/f08724ac736499548c7dff23ad125f59ed257f73)) -* **executors:** remove deprecated executors from nx-boot plugins ([27ebe79](https://github.com/khalilou88/jnxplus/commit/27ebe793c2dcdf9afbcbc870d68fc6177b7dd086)) - - -### BREAKING CHANGES - -* **executors:** from now we need to change old executors by run-task executor - - - -# [7.3.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-7.2.3...nx-boot-maven-7.3.0) (2023-07-28) - -### Dependency Updates - -* `maven` updated to version `0.7.0` -* `common` updated to version `0.10.0` - -### Features - -* **executors:** deprecate executors ([8afa24b](https://github.com/khalilou88/jnxplus/commit/8afa24b512993e56a012224ec81f07893a6cbce5)) - - - -## [7.2.3](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-7.2.2...nx-boot-maven-7.2.3) (2023-07-08) - -### Dependency Updates - -* `maven` updated to version `0.6.1` -* `common` updated to version `0.9.1` - - -## [7.2.2](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-7.2.1...nx-boot-maven-7.2.2) (2023-06-24) - -### Dependency Updates - -* `maven` updated to version `0.6.0` - - -## [7.2.1](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-7.2.0...nx-boot-maven-7.2.1) (2023-06-23) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `maven` updated to version `0.5.1` - - -# [7.2.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-7.1.0...nx-boot-maven-7.2.0) (2023-06-21) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `maven` updated to version `0.5.0` -* `common` updated to version `0.9.0` - -### Features - -* **generators:** add framework generation to nx-maven plugin ([#259](https://github.com/khalilou88/jnxplus/issues/259)) ([7eeded8](https://github.com/khalilou88/jnxplus/commit/7eeded89e41c1feac148bf3cc119da30b42bc3df)) -* **generators:** remove generators code duplication ([#260](https://github.com/khalilou88/jnxplus/issues/260)) ([a4d495e](https://github.com/khalilou88/jnxplus/commit/a4d495ed73a23dc2e146f798b29ac37383dbe923)) - - - -# [7.1.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-7.0.2...nx-boot-maven-7.1.0) (2023-06-17) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `internal-maven-wrapper` updated to version `0.0.1` -* `maven` updated to version `0.4.3` -* `common` updated to version `0.8.1` - -### Bug Fixes - -* **graph:** fix optional project.json ([#256](https://github.com/khalilou88/jnxplus/issues/256)) ([0db8e12](https://github.com/khalilou88/jnxplus/commit/0db8e12a1d7056d6423ae664ae70725099ad33bd)) - - -### Features - -* **generators:** reduce code duplication ([#251](https://github.com/khalilou88/jnxplus/issues/251)) ([dfdad1d](https://github.com/khalilou88/jnxplus/commit/dfdad1dfd2ef13303e1c12a4d824261d5bf407be)) -* **generators:** reduce linters files ([#252](https://github.com/khalilou88/jnxplus/issues/252)) ([75c0e76](https://github.com/khalilou88/jnxplus/commit/75c0e769e7917ef91584b4f5dcb5efbff80da6c2)) - - - -## [7.0.2](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-7.0.1...nx-boot-maven-7.0.2) (2023-06-09) - -### Dependency Updates - -* `maven` updated to version `0.4.2` -* `common` updated to version `0.8.0` - - -## [7.0.1](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-7.0.0...nx-boot-maven-7.0.1) (2023-06-07) - -### Dependency Updates - -* `maven` updated to version `0.4.1` -* `common` updated to version `0.7.0` - - -# [7.0.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-6.4.0...nx-boot-maven-7.0.0) (2023-06-01) - -### Dependency Updates - -* `maven` updated to version `0.4.0` -* `common` updated to version `0.6.0` - -### Bug Fixes - -* **graph:** set minimum version of nx to 16.3.0 ([3559934](https://github.com/khalilou88/jnxplus/commit/355993462155a27ab620678b1fd358d2f4eed6de)) - - -### BREAKING CHANGES - -* **graph:** Nx version 16.3.0 move hashing to the daemon, that create a breaking change in the plugin - - - -# [6.4.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-6.3.0...nx-boot-maven-6.4.0) (2023-05-28) - -### Dependency Updates - -* `maven` updated to version `0.3.0` -* `common` updated to version `0.5.0` - -### Features - -* **executors:** move all maven executors to maven lib ([#234](https://github.com/khalilou88/jnxplus/issues/234)) ([00f7f88](https://github.com/khalilou88/jnxplus/commit/00f7f88008637fd98d48402343ccb95878bc1182)) - - - -# [6.3.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-6.2.4...nx-boot-maven-6.3.0) (2023-05-27) - -### Dependency Updates - -* `maven` updated to version `0.2.1` -* `common` updated to version `0.4.0` - -### Bug Fixes - -* **executors:** use pipe output capture ([#233](https://github.com/khalilou88/jnxplus/issues/233)) ([1d295b4](https://github.com/khalilou88/jnxplus/commit/1d295b4548a2b2cbdeb4c7fbb5ceb4fb73a830d8)) -* **generators:** disable unit tests ([a08d0f2](https://github.com/khalilou88/jnxplus/commit/a08d0f2cd396f6f7dddbb41e0bcd532a8a800778)) -* **generators:** remove old syntax ([#232](https://github.com/khalilou88/jnxplus/issues/232)) ([a390029](https://github.com/khalilou88/jnxplus/commit/a39002963b2c66a1295fa42925b76994a24748c3)) - - -### Features - -* **generators:** update maven wrapper to version 3.9.2 ([b5486de](https://github.com/khalilou88/jnxplus/commit/b5486ded2f418a606d2f4ca957cbd97ed4956596)) -* **generators:** update spring boot version to 3.1.0 ([#231](https://github.com/khalilou88/jnxplus/issues/231)) ([b050516](https://github.com/khalilou88/jnxplus/commit/b0505163fde06fbcf355a97a75e675c0c5fe8bc3)) - - - -## [6.2.4](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-6.2.3...nx-boot-maven-6.2.4) (2023-05-26) - -### Dependency Updates - -* `maven` updated to version `0.2.0` -* `common` updated to version `0.3.1` - - -## [6.2.3](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-6.2.2...nx-boot-maven-6.2.3) (2023-05-21) - - -### Bug Fixes - -* **generators:** don't generate extras lines in templates ([#215](https://github.com/khalilou88/jnxplus/issues/215)) ([2a5da31](https://github.com/khalilou88/jnxplus/commit/2a5da31470aedb7658e9283555c89f1d28782e06)) - - - -## [6.2.2](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-6.2.1...nx-boot-maven-6.2.2) (2023-05-19) - -### Dependency Updates - -* `maven` updated to version `0.1.8` -* `common` updated to version `0.3.0` - - -## [6.2.1](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-6.2.0...nx-boot-maven-6.2.1) (2023-05-17) - -### Dependency Updates - -* `maven` updated to version `0.1.7` -* `common` updated to version `0.2.4` - -### Bug Fixes - -* **nx-boot-maven:** refactor maven dep graph ([#206](https://github.com/khalilou88/jnxplus/issues/206)) ([0a704a4](https://github.com/khalilou88/jnxplus/commit/0a704a4acbfa1db93a072b37a8c2db0e3ea275ce)) - - - -# [6.2.0](https://github.com/khalilou88/jnxplus/compare/nx-boot-maven-6.1.4...nx-boot-maven-6.2.0) (2023-05-13) - -### Dependency Updates - -- `maven` updated to version `0.1.6` -- `common` updated to version `0.2.3` - -### Features - -- **nx-boot-maven:** add ktformat executor ([#195](https://github.com/khalilou88/jnxplus/issues/195)) ([c36c154](https://github.com/khalilou88/jnxplus/commit/c36c154e02f4daf2f9d171e11512bd359b789b63)) -- **nx-boot-maven:** add NX_MAVEN_CLI_OPTS env var to pass args to maven ([#193](https://github.com/khalilou88/jnxplus/issues/193)) ([7aec617](https://github.com/khalilou88/jnxplus/commit/7aec617eb23c1d8be4a96b7b0bef9a583082e75d)) -- **nx-boot-maven:** add publish executor [ci skip] ([#189](https://github.com/khalilou88/jnxplus/issues/189)) ([4b9bda7](https://github.com/khalilou88/jnxplus/commit/4b9bda7e077c01914b785b78b107ae20c0829ab3)) diff --git a/packages/nx-boot-maven/CHANGELOG_ARCHIVE.md b/packages/nx-boot-maven/CHANGELOG_ARCHIVE.md deleted file mode 100644 index 6999a84f3..000000000 --- a/packages/nx-boot-maven/CHANGELOG_ARCHIVE.md +++ /dev/null @@ -1,167 +0,0 @@ -# Changelog - -# 6.0.0 (2023-05-06) - -- Update Nx to version 16.1.0 -- Add port option to app generator -- Refactor code to use shared libs - -# 5.4.2 (2023-05-04) - -- Install linters with postinstall script - -# 5.4.0 (2023-04-30) - -- Add .gitattributes -- Update Maven wrapper -- Add parent project generator to have multi pom projects inside the workspace -- Optional project.json: If project.json don't exists, we will add project to the graph based on pom.xml -- Add simpleName option to app and lib generators -- Add minimal option to app generator -- Add skipStarterCode option to lib generator -- Add skipClean option to build executor -- Add mvnArgs option to Test Executor -- Rework lint and kformat executors to remove dependencies to checkstyle, ktlint and pmd internal projects -- Bug Fixes - -## BREAKING CHANGES - -- App and lib generators : Remove packageNameType option and add instead simplePackageName option -- Lint executor with PMD option : to use PMD, you need to install it on your machine. Please follow this link for the instruction : https://docs.pmd-code.org/latest/pmd_userdocs_installation.html#running-pmd-via-command-line - -# 5.3.1 (2023-04-15) - -- Add 'run-task' executor to the parent project - -# 5.3.0 (2023-04-09) - -- Add parent project to the dep graph - -# 5.2.2 (2023-04-08) - -- Init Generator : Fix when prettierrc and prettierignore don't exist - -# 5.2.1 (2023-04-07) - -- Fix dep graph when dependencies tag is undefined - -# 5.2.0 (2023-04-06) - -- Calculate dep graph for all maven projects - -# 5.1.1 (2023-04-05) - -- Name the exported generators to be able to import them individually - -# 5.1.0 (2023-04-05) - -- Add run-task executor -- Add exports of all generators to be able to import and extend them -- Update Nx to version 15.8.7 - -# 5.0.0 (2022-12-25) - -- Add Spring Boot 3 support - -# 3.1.0 (2022-12-03) - -- Update Maven to 3.8.6 version -- Remove dash from packageName when generating apps and libs -- Update Nx to version 15.2.4 - -# 3.0.0 (2022-11-26) - -- Update Nx to version 15 -- Add mvnArgs option to pass arguments to the maven cli for build executor - -# 2.5.1 (2022-09-20) - -- Fix plugin install with better use of peerDependencies and dependencies - -# 2.4.1 (2022-08-23) - -- Add xmldoc to the plugin deps - -# 2.4.0 (2022-08-23) - -- Use peerDependencies -- Add packageNameType option to choose between short and long packageName -- Update Nx to latest version (14.5.8) - -# 2.3.0 (2022-06-24) - -- Run commands from workspace root -- Update Nx - -# 2.2.1 (2022-06-14) - -- Fix serve app with no args -- Update Nx - -# 2.2.0 (2022-06-10) - -- Update Nx to version 14.2.4 - -# 2.1.1 (2022-06-10) - -- Fix dep-graph for nx > 14.2.x -- Use patch release for deps - -# 2.1.0 (2022-06-08) - -- Add args to serve executor -- Update Nx - -# 2.0.1 (2022-04-27) - -- Update Nx - -# 2.0.0 (2022-04-22) - -- Upgrade to Nx 14 - -# 1.6.1 (2022-03-16) - -- Init Generator : fix javaVersion type to match string and number - -# 1.6.0 (2022-03-14) - -- App and lib Generators : Add outputs option to build executor - -# 1.5.2 (2022-03-11) - -- App Generator : Make serve and test executors depends on build executor - -# 1.5.1 (2022-03-10) - -- Fix build executor - -# 1.5.0 (2022-03-08) - -- new build-image executor -- new migrate generator -- Refactor directory option - -# 1.3.0 (2022-02-15) - -- Update Maven wrapper and spring boot versions - -# 1.2.1 (2022-01-31) - -- Update lint deps - -# 1.2.0 (2022-01-25) - -- Fix lint kotlin projects -- Add kformat to format kotlin projects - -# 1.1.0 (2022-01-04) - -- This release contains some deps update. -- Breaking Changes: - We moved spring-boot-starter-parent to the parent POM at the workspace root for better maintenance. - -# 1.0.2 (2021-12-24) - -This release adds Nx 13 support. -For Nx 12, use the version < 1. diff --git a/packages/nx-boot-maven/README.md b/packages/nx-boot-maven/README.md deleted file mode 100644 index 7981327a9..000000000 --- a/packages/nx-boot-maven/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Plugin deprecated - -Plugin deprecated, use @jnxplus/nx-maven instead. - -# @jnxplus/nx-boot-maven - -[![npm version](https://badge.fury.io/js/@jnxplus%2Fnx-boot-maven.svg)](https://badge.fury.io/js/@jnxplus%2Fnx-boot-maven) - -This plugin adds Spring Boot and Maven multi-module capabilities to Nx workspace. - -Here is a quick overview of the plugin, to know more, please visit [the documentation](https://khalilou88.github.io/jnxplus/). - -## Supported versions - -| @jnxplus/nx-boot-maven | Nx version range | Spring Boot | -| ---------------------- | ------------------- | ----------- | -| 7.x.x | >=16.3.0 | 3.x.x | -| 6.x.x | >=16.0.0 && <16.3.0 | 3.x.x | -| 5.x.x | 15.x.x | 3.x.x | - -## Getting Started - -### 0. Prerequisites - -`@jnxplus/nx-boot-maven` requires a Java 17 or higher Runtime Environment and the current Long Term Support (LTS) version of node.js. - -### 1. Install the plugin - -In the Nx workspace root folder, run this command to install the plugin : - -```bash -npm install --save-dev @jnxplus/nx-boot-maven -``` - -### 2. Add Spring boot and Maven wrapper support - -The following command adds Spring boot and Maven support (Maven wrapper and config files) to the workspace. This only needs to be performed once per workspace. - -```bash -nx generate @jnxplus/nx-boot-maven:init -``` - -### 3. Usage - -| Action | Command | -| ------------------------------------ | --------------------------------------------------------------------- | -| Generate an application | `nx generate @jnxplus/nx-boot-maven:application my-app-name` | -| Generate a library | `nx generate @jnxplus/nx-boot-maven:library my-lib-name` | -| Generate a parent project | `nx generate @jnxplus/nx-boot-maven:parent-project my-parent-project` | -| Build a project | `nx build my-project-name` | -| Serve an application | `nx serve my-app-name` | -| Test a project | `nx test my-project-name` | -| Lint a project | `nx lint my-project-name` | -| Format a java project | `nx format --projects my-project-name` | -| Format a kotlin project | `nx ktformat my-project-name` | -| Run a custom task | `nx run-task my-project-name --task="clean install -DskipTests=true"` | -| Publish a project | `nx publish my-project-name` | -| Visualize project's dependency graph | `nx graph` | - -## License - -MIT © 2021-2023 Khalil LAGRIDA diff --git a/packages/nx-boot-maven/executors.json b/packages/nx-boot-maven/executors.json deleted file mode 100644 index 70378c196..000000000 --- a/packages/nx-boot-maven/executors.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "executors": { - "run-task": { - "implementation": "@jnxplus/maven/src/executors/run-task/executor", - "schema": "@jnxplus/maven/src/executors/run-task/schema.json", - "description": "run-task executor" - }, - "lint": { - "implementation": "@jnxplus/maven/src/executors/lint/executor", - "schema": "@jnxplus/common/src/executors/lint/schema.json", - "description": "lint executor" - }, - "ktformat": { - "implementation": "@jnxplus/maven/src/executors/ktformat/executor", - "schema": "@jnxplus/common/src/executors/ktformat/schema.json", - "description": "kotlin format executor" - } - } -} diff --git a/packages/nx-boot-maven/generators.json b/packages/nx-boot-maven/generators.json deleted file mode 100644 index 502dc7f95..000000000 --- a/packages/nx-boot-maven/generators.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "name": "nx-boot-maven", - "version": "0.0.1", - "generators": { - "init": { - "factory": "./src/generators/init/generator", - "schema": "./src/generators/init/schema.json", - "description": "init generator" - }, - "migrate": { - "factory": "./src/generators/migrate/generator", - "schema": "./src/generators/migrate/schema.json", - "description": "migrate generator" - }, - "application": { - "factory": "./src/generators/application/generator", - "schema": "./src/generators/application/schema.json", - "aliases": ["app"], - "x-type": "application", - "description": "application generator" - }, - "library": { - "factory": "./src/generators/library/generator", - "schema": "./src/generators/library/schema.json", - "aliases": ["lib"], - "x-type": "library", - "description": "library generator" - }, - "parent-project": { - "factory": "./src/generators/parent-project/generator", - "schema": "./src/generators/parent-project/schema.json", - "description": "parent-project generator" - } - } -} diff --git a/packages/nx-boot-maven/jest.config.ts b/packages/nx-boot-maven/jest.config.ts deleted file mode 100644 index ac2d23e83..000000000 --- a/packages/nx-boot-maven/jest.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'nx-boot-maven', - - globals: {}, - testEnvironment: 'node', - transform: { - '^.+\\.[tj]sx?$': [ - 'ts-jest', - { - tsconfig: '/tsconfig.spec.json', - }, - ], - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/packages/nx-boot-maven', - preset: '../../jest.preset.js', -}; diff --git a/packages/nx-boot-maven/package.json b/packages/nx-boot-maven/package.json deleted file mode 100644 index eea9862a1..000000000 --- a/packages/nx-boot-maven/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@jnxplus/nx-boot-maven", - "version": "8.0.3", - "type": "commonjs", - "main": "src/index.js", - "generators": "./generators.json", - "executors": "./executors.json", - "private": false, - "publishConfig": { - "access": "public" - }, - "license": "MIT", - "author": "Khalil LAGRIDA", - "homepage": "https://github.com/khalilou88/jnxplus/blob/main/packages/nx-boot-maven/README.md", - "bugs": { - "url": "https://github.com/khalilou88/jnxplus/issues" - }, - "keywords": [ - "nx", - "nx-workspace", - "nx-plugin", - "java", - "spring", - "spring-boot", - "maven", - "maven multi-module project" - ], - "scripts": { - "postinstall": "node src/scripts/install-linters.js" - }, - "dependencies": { - "prettier": "^2.8.7", - "prettier-plugin-java": "^2.1.0", - "@prettier/plugin-xml": "^2.2.0", - "xmldoc": "~1.3.0" - }, - "peerDependencies": { - "@nx/devkit": ">=16.3.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/khalilou88/jnxplus.git", - "directory": "packages/nx-boot-maven" - } -} diff --git a/packages/nx-boot-maven/project.json b/packages/nx-boot-maven/project.json deleted file mode 100644 index cb85a5525..000000000 --- a/packages/nx-boot-maven/project.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "name": "nx-boot-maven", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "packages/nx-boot-maven/src", - "projectType": "library", - "targets": { - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["packages/nx-boot-maven/**/*.ts"] - } - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/packages/nx-boot-maven"], - "options": { - "jestConfig": "packages/nx-boot-maven/jest.config.ts", - "passWithNoTests": true - } - }, - "build": { - "executor": "@nx/js:tsc", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/packages/nx-boot-maven", - "main": "packages/nx-boot-maven/src/index.ts", - "packageJson": "packages/nx-boot-maven/package.json", - "tsConfig": "packages/nx-boot-maven/tsconfig.lib.json", - "updateBuildableProjectDepsInPackageJson": true, - "buildableProjectDepsInPackageJsonType": "dependencies", - "assets": [ - "packages/nx-boot-maven/*.md", - { - "input": "./packages/nx-boot-maven/src", - "glob": "**/!(*.ts)", - "output": "./src" - }, - { - "input": "./packages/nx-boot-maven/src", - "glob": "**/*.d.ts", - "output": "./src" - }, - { - "input": "./packages/nx-boot-maven", - "glob": "generators.json", - "output": "." - }, - { - "input": "./packages/nx-boot-maven", - "glob": "executors.json", - "output": "." - }, - { - "input": "./packages/internal/maven-wrapper/.mvn", - "glob": "wrapper/**", - "output": "./src/generators/init/files/maven/wrapper/__dot__mvn" - }, - { - "input": "./packages/internal/maven-wrapper", - "glob": "mvnw", - "output": "./src/generators/init/files/maven/wrapper" - }, - { - "input": "./packages/internal/maven-wrapper", - "glob": "mvnw.cmd", - "output": "./src/generators/init/files/maven/wrapper" - }, - { - "input": "./packages/internal/generators-files/boot/application/shared", - "glob": "**", - "output": "./src/generators/application/files/boot" - }, - { - "input": "./packages/internal/generators-files/boot/application/maven", - "glob": "**", - "output": "./src/generators/application/files/boot" - }, - { - "input": "./packages/internal/generators-files/boot/library/shared", - "glob": "**", - "output": "./src/generators/library/files/boot" - }, - { - "input": "./packages/internal/generators-files/boot/library/maven", - "glob": "**", - "output": "./src/generators/library/files/boot" - }, - { - "input": "./packages/internal/generators-files", - "glob": "linters/**", - "output": "./src/generators/init/files" - } - ] - } - }, - "version": { - "executor": "@jscutlery/semver:version", - "options": { - "preset": "angular", - "trackDeps": true, - "push": true, - "noVerify": true, - "postTargets": ["nx-boot-maven:github", "nx-boot-maven:publish"], - "commitMessageFormat": "release: cut release ${version} of ${projectName}" - } - }, - "github": { - "executor": "@jscutlery/semver:github", - "options": { - "tag": "${tag}", - "notes": "${notes}" - } - }, - "publish": { - "executor": "ngx-deploy-npm:deploy", - "options": { - "access": "public" - } - } - }, - "tags": ["maven", "boot"], - "implicitDependencies": [ - "internal-generators-files", - "internal-maven-wrapper" - ] -} diff --git a/packages/nx-boot-maven/src/dep-graph/lookup-deps.ts b/packages/nx-boot-maven/src/dep-graph/lookup-deps.ts deleted file mode 100644 index 1c7b9638b..000000000 --- a/packages/nx-boot-maven/src/dep-graph/lookup-deps.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { addProjectsAndDependencies } from '@jnxplus/maven'; -import { - ProjectGraph, - ProjectGraphBuilder, - ProjectGraphProcessorContext, -} from '@nx/devkit'; - -export function processProjectGraph( - graph: ProjectGraph, - context: ProjectGraphProcessorContext -): ProjectGraph { - const builder = new ProjectGraphBuilder(graph); - addProjectsAndDependencies(builder, context, '@jnxplus/nx-boot-maven'); - return builder.getUpdatedProjectGraph(); -} diff --git a/packages/nx-boot-maven/src/generators/application/generator.ts b/packages/nx-boot-maven/src/generators/application/generator.ts deleted file mode 100644 index 5aa2fc717..000000000 --- a/packages/nx-boot-maven/src/generators/application/generator.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Tree } from '@nx/devkit'; - -import { applicationGenerator } from '@jnxplus/maven'; -import { NxMavenAppGeneratorSchema } from './schema'; - -export default async function (tree: Tree, options: NxMavenAppGeneratorSchema) { - await applicationGenerator( - __dirname, - '@jnxplus/nx-boot-maven', - tree, - options - ); -} diff --git a/packages/nx-boot-maven/src/generators/application/schema.d.ts b/packages/nx-boot-maven/src/generators/application/schema.d.ts deleted file mode 100644 index 91f9c1d4e..000000000 --- a/packages/nx-boot-maven/src/generators/application/schema.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { LanguageType, PackagingType } from '@jnxplus/common'; - -export interface NxMavenAppGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - simplePackageName?: boolean; - language: LanguageType; - groupId: string; - projectVersion: string; - packaging: PackagingType; - configFormat: '.properties' | '.yml'; - parentProject?: string; - aggregatorProject?: string; - minimal?: boolean; - port?: string | number; -} diff --git a/packages/nx-boot-maven/src/generators/application/schema.json b/packages/nx-boot-maven/src/generators/application/schema.json deleted file mode 100644 index ed4547275..000000000 --- a/packages/nx-boot-maven/src/generators/application/schema.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxBootMavenApp", - "title": "Create an application", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the app name", - "type": "boolean", - "default": false - }, - "simplePackageName": { - "description": "Don't include the directory in the package name", - "type": "boolean", - "default": false - }, - "language": { - "description": "Language of the project", - "type": "string", - "default": "java", - "x-prompt": { - "message": "Which language would you like to use?", - "type": "list", - "items": [ - { - "value": "java", - "label": "Java" - }, - { - "value": "kotlin", - "label": "Kotlin" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "com.example", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "packaging": { - "description": "Packaging of the project", - "type": "string", - "default": "jar", - "x-prompt": { - "message": "Which packaging would you like to use?", - "type": "list", - "items": [ - { - "value": "jar", - "label": "Jar" - }, - { - "value": "war", - "label": "War" - } - ] - } - }, - "configFormat": { - "description": "Configuration format of the project", - "type": "string", - "default": ".properties", - "x-prompt": { - "message": "Which configuration format would you like to use?", - "type": "list", - "items": [ - { - "value": ".properties", - "label": "Properties" - }, - { - "value": ".yml", - "label": "Yaml" - } - ] - } - }, - "parentProject": { - "type": "string", - "description": "ArtifactId of the parent project or leave it blank for the root project" - }, - "aggregatorProject": { - "type": "string", - "description": "ArtifactId of the aggregator project (that manages a group of submodules) or leave it blank for the root project" - }, - "minimal": { - "description": "Generate an app with a minimal setup", - "type": "boolean", - "default": false - }, - "port": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "default": 8080, - "description": "Port to start the server at. Default is 8080." - } - }, - "required": [ - "name", - "language", - "groupId", - "projectVersion", - "packaging", - "configFormat" - ] -} diff --git a/packages/nx-boot-maven/src/generators/init/files/maven/config/pom.xml__template__ b/packages/nx-boot-maven/src/generators/init/files/maven/config/pom.xml__template__ deleted file mode 100644 index d1116542d..000000000 --- a/packages/nx-boot-maven/src/generators/init/files/maven/config/pom.xml__template__ +++ /dev/null @@ -1,28 +0,0 @@ - - - 4.0.0 - - - org.springframework.boot - spring-boot-starter-parent - <%= springBootVersion %> - - - - <%= groupId %> - <%= parentProjectName %> - <%= parentProjectVersion %> - pom - - - <%= javaVersion %> - <%= kotlinVersion %> - <%= checkstyleVersion %> - <%= ktlintVersion %> - - - - - - diff --git a/packages/nx-boot-maven/src/generators/init/generator.ts b/packages/nx-boot-maven/src/generators/init/generator.ts deleted file mode 100644 index 183e47e58..000000000 --- a/packages/nx-boot-maven/src/generators/init/generator.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { - checkstyleVersion, - ktlintVersion, - springBootVersion, - kotlinVersion, - updateNxJson, -} from '@jnxplus/common'; -import { - addOrUpdateGitattributes, - addOrUpdatePrettierIgnore, - addOrUpdatePrettierRc, - updateGitIgnore, -} from '@jnxplus/maven'; -import { Tree, formatFiles, generateFiles, offsetFromRoot } from '@nx/devkit'; -import * as path from 'path'; -import { NxBootMavenGeneratorSchema } from './schema'; - -interface NormalizedSchema extends NxBootMavenGeneratorSchema { - dot: string; - kotlinVersion: string; - springBootVersion: string; - checkstyleVersion: string; - ktlintVersion: string; -} - -function normalizeOptions( - tree: Tree, - options: NxBootMavenGeneratorSchema -): NormalizedSchema { - const dot = '.'; - - return { - ...options, - dot, - kotlinVersion, - springBootVersion, - checkstyleVersion, - ktlintVersion, - }; -} - -function addFiles(tree: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - offsetFromRoot: offsetFromRoot(tree.root), - template: '', - }; - generateFiles( - tree, - path.join(__dirname, 'files', 'maven', 'wrapper'), - '', - templateOptions - ); - generateFiles( - tree, - path.join(__dirname, 'files', 'maven', 'config'), - '', - templateOptions - ); - generateFiles( - tree, - path.join(__dirname, 'files', 'linters'), - 'tools/linters', - templateOptions - ); -} - -export default async function ( - tree: Tree, - options: NxBootMavenGeneratorSchema -) { - const normalizedOptions = normalizeOptions(tree, options); - addFiles(tree, normalizedOptions); - updateNxJson(tree, '@jnxplus/nx-boot-maven'); - updateGitIgnore(tree); - addOrUpdatePrettierRc(tree); - addOrUpdatePrettierIgnore(tree); - addOrUpdateGitattributes(tree); - tree.changePermissions('mvnw', '755'); - tree.changePermissions('mvnw.cmd', '755'); - await formatFiles(tree); -} diff --git a/packages/nx-boot-maven/src/generators/init/schema.d.ts b/packages/nx-boot-maven/src/generators/init/schema.d.ts deleted file mode 100644 index b5df4279c..000000000 --- a/packages/nx-boot-maven/src/generators/init/schema.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface NxBootMavenGeneratorSchema { - javaVersion: string | number; - groupId: string; - parentProjectName: string; - parentProjectVersion: string; -} diff --git a/packages/nx-boot-maven/src/generators/init/schema.json b/packages/nx-boot-maven/src/generators/init/schema.json deleted file mode 100644 index fd9ee27f9..000000000 --- a/packages/nx-boot-maven/src/generators/init/schema.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxBootMavenInit", - "title": "Init", - "type": "object", - "properties": { - "javaVersion": { - "description": "Java version", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "default": "17", - "x-prompt": { - "message": "Which version of Java would you like to use?", - "type": "list", - "items": [ - { - "value": "21", - "label": "21" - }, - { - "value": "17", - "label": "17" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "com.example", - "x-prompt": "What groupId would you like to use?" - }, - "parentProjectName": { - "type": "string", - "default": "boot-multi-module", - "x-prompt": "What parentProjectName would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "parentProjectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - } - }, - "required": [ - "javaVersion", - "groupId", - "parentProjectName", - "parentProjectVersion" - ] -} diff --git a/packages/nx-boot-maven/src/generators/library/generator.ts b/packages/nx-boot-maven/src/generators/library/generator.ts deleted file mode 100644 index cdd949306..000000000 --- a/packages/nx-boot-maven/src/generators/library/generator.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { libraryGenerator } from '@jnxplus/maven'; -import { Tree } from '@nx/devkit'; -import { NxMavenLibGeneratorSchema } from './schema'; - -export default async function (tree: Tree, options: NxMavenLibGeneratorSchema) { - await libraryGenerator(__dirname, '@jnxplus/nx-boot-maven', tree, options); -} diff --git a/packages/nx-boot-maven/src/generators/library/schema.d.ts b/packages/nx-boot-maven/src/generators/library/schema.d.ts deleted file mode 100644 index 50f7f7fb0..000000000 --- a/packages/nx-boot-maven/src/generators/library/schema.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { LanguageType } from '@jnxplus/common'; - -export interface NxMavenLibGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - simplePackageName?: boolean; - language: LanguageType; - groupId: string; - projectVersion: string; - parentProject?: string; - aggregatorProject?: string; - projects?: string; - skipStarterCode?: boolean; -} diff --git a/packages/nx-boot-maven/src/generators/library/schema.json b/packages/nx-boot-maven/src/generators/library/schema.json deleted file mode 100644 index 6eb6dc828..000000000 --- a/packages/nx-boot-maven/src/generators/library/schema.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxBootMavenLib", - "title": "Create a library", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the lib name", - "type": "boolean", - "default": false - }, - "simplePackageName": { - "description": "Don't include the directory in the package name", - "type": "boolean", - "default": false - }, - "language": { - "description": "Language of the project", - "type": "string", - "default": "java", - "x-prompt": { - "message": "Which language would you like to use?", - "type": "list", - "items": [ - { - "value": "java", - "label": "Java" - }, - { - "value": "kotlin", - "label": "Kotlin" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "com.example", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "parentProject": { - "type": "string", - "description": "ArtifactId of the parent project or leave it blank for the root project" - }, - "aggregatorProject": { - "type": "string", - "description": "ArtifactId of the aggregator project (that manages a group of submodules) or leave it blank for the root project" - }, - "projects": { - "type": "string", - "description": "Projects where the library should be added (comma delimited)" - }, - "skipStarterCode": { - "description": "Skip starter code", - "type": "boolean", - "default": false - } - }, - "required": ["name", "language", "groupId", "projectVersion"] -} diff --git a/packages/nx-boot-maven/src/generators/migrate/generator.ts b/packages/nx-boot-maven/src/generators/migrate/generator.ts deleted file mode 100644 index 6fbd7ce25..000000000 --- a/packages/nx-boot-maven/src/generators/migrate/generator.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { formatFiles, generateFiles, offsetFromRoot, Tree } from '@nx/devkit'; -import * as path from 'path'; -import { NxBootMavenMigrateGeneratorSchema } from './schema'; - -interface NormalizedSchema extends NxBootMavenMigrateGeneratorSchema { - dot: string; -} - -function normalizeOptions( - tree: Tree, - options: NxBootMavenMigrateGeneratorSchema -): NormalizedSchema { - const dot = '.'; - - return { - ...options, - dot, - }; -} - -function addFiles(tree: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - offsetFromRoot: offsetFromRoot(tree.root), - template: '', - }; - generateFiles( - tree, - path.join(__dirname, '..', 'init', 'files', 'maven', 'wrapper'), - '', - templateOptions - ); -} - -export default async function ( - tree: Tree, - options: NxBootMavenMigrateGeneratorSchema -) { - const normalizedOptions = normalizeOptions(tree, options); - addFiles(tree, normalizedOptions); - tree.changePermissions('mvnw', '755'); - tree.changePermissions('mvnw.cmd', '755'); - await formatFiles(tree); -} diff --git a/packages/nx-boot-maven/src/generators/migrate/schema.d.ts b/packages/nx-boot-maven/src/generators/migrate/schema.d.ts deleted file mode 100644 index 82c2742ec..000000000 --- a/packages/nx-boot-maven/src/generators/migrate/schema.d.ts +++ /dev/null @@ -1 +0,0 @@ -export interface NxBootMavenMigrateGeneratorSchema {} // eslint-disable-line diff --git a/packages/nx-boot-maven/src/generators/migrate/schema.json b/packages/nx-boot-maven/src/generators/migrate/schema.json deleted file mode 100644 index 54305bdf3..000000000 --- a/packages/nx-boot-maven/src/generators/migrate/schema.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxBootMavenMigrate", - "title": "Migrate", - "type": "object", - "properties": {}, - "required": [] -} diff --git a/packages/nx-boot-maven/src/generators/parent-project/files/pom.xml__template__ b/packages/nx-boot-maven/src/generators/parent-project/files/pom.xml__template__ deleted file mode 100644 index 46ad1f09b..000000000 --- a/packages/nx-boot-maven/src/generators/parent-project/files/pom.xml__template__ +++ /dev/null @@ -1,18 +0,0 @@ - - - 4.0.0 - - <%= parentGroupId %> - <%= parentProjectName %> - <%= parentProjectVersion %> - <%= relativePath %> - - <%= groupId %> - <%= projectName %> - <%= projectVersion %> - pom - <%= projectName %> - This project was generated with nx-boot-maven - - \ No newline at end of file diff --git a/packages/nx-boot-maven/src/generators/parent-project/generator.ts b/packages/nx-boot-maven/src/generators/parent-project/generator.ts deleted file mode 100644 index 144e19abc..000000000 --- a/packages/nx-boot-maven/src/generators/parent-project/generator.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { parentProjectGenerator } from '@jnxplus/maven'; -import { Tree } from '@nx/devkit'; -import { NxBootMavenParentProjectGeneratorSchema } from './schema'; - -export default async function ( - tree: Tree, - options: NxBootMavenParentProjectGeneratorSchema -) { - await parentProjectGenerator( - __dirname, - '@jnxplus/nx-boot-maven', - tree, - options - ); -} diff --git a/packages/nx-boot-maven/src/generators/parent-project/schema.d.ts b/packages/nx-boot-maven/src/generators/parent-project/schema.d.ts deleted file mode 100644 index 59ddcaf9e..000000000 --- a/packages/nx-boot-maven/src/generators/parent-project/schema.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ProjectType } from '@jnxplus/common'; - -export interface NxBootMavenParentProjectGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - projectType: ProjectType; - groupId: string; - projectVersion?: string; - parentProject?: string; - aggregatorProject?: string; -} diff --git a/packages/nx-boot-maven/src/generators/parent-project/schema.json b/packages/nx-boot-maven/src/generators/parent-project/schema.json deleted file mode 100644 index 5fbce616c..000000000 --- a/packages/nx-boot-maven/src/generators/parent-project/schema.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxBootMavenParentProject", - "title": "Create a parent project", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the project name", - "type": "boolean", - "default": false - }, - "projectType": { - "description": "Type of the parent project", - "type": "string", - "default": "application", - "x-prompt": { - "message": "Which projectType would you like to generate?", - "type": "list", - "items": [ - { - "value": "application", - "label": "Application" - }, - { - "value": "library", - "label": "Library" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "com.example", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "parentProject": { - "type": "string", - "description": "ArtifactId of the parent project or leave it blank for the root project" - }, - "aggregatorProject": { - "type": "string", - "description": "ArtifactId of the aggregator project (that manages a group of submodules) or leave it blank for the root project" - } - }, - "required": ["name", "projectType", "groupId", "projectVersion"] -} diff --git a/packages/nx-boot-maven/src/index.ts b/packages/nx-boot-maven/src/index.ts deleted file mode 100644 index 507baa840..000000000 --- a/packages/nx-boot-maven/src/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -export { processProjectGraph } from './dep-graph/lookup-deps'; - -import initGenerator from './generators/init/generator'; -import parentProjectGenerator from './generators/parent-project/generator'; -import libraryGenerator from './generators/library/generator'; -import applicationGenerator from './generators/application/generator'; -import migrateGenerator from './generators/migrate/generator'; - -export { - initGenerator, - parentProjectGenerator, - libraryGenerator, - applicationGenerator, - migrateGenerator, -}; diff --git a/packages/nx-boot-maven/src/scripts/install-linters.ts b/packages/nx-boot-maven/src/scripts/install-linters.ts deleted file mode 100644 index 61ee2143f..000000000 --- a/packages/nx-boot-maven/src/scripts/install-linters.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { getCheckstylePath, getKtlintPath, isE2eTest } from '@jnxplus/common'; -import { getCheckstyleVersion, getKtlintVersion } from '@jnxplus/maven'; -import { logger, workspaceRoot } from '@nx/devkit'; -import * as path from 'path'; - -(async () => { - if (process.env['NX_VERBOSE_LOGGING'] === 'true') { - logger.debug('Install Linters'); - } - - let workspaceRootToUse = workspaceRoot; - const tmpWorkspaceRoot = path.join( - workspaceRootToUse, - 'tmp', - 'nx-e2e', - 'proj' - ); - - if (isE2eTest(tmpWorkspaceRoot)) { - workspaceRootToUse = tmpWorkspaceRoot; - } - - await getCheckstylePath(getCheckstyleVersion, workspaceRootToUse); - await getKtlintPath(getKtlintVersion, workspaceRootToUse); -})(); diff --git a/packages/nx-boot-maven/tsconfig.json b/packages/nx-boot-maven/tsconfig.json deleted file mode 100644 index f5b85657a..000000000 --- a/packages/nx-boot-maven/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "module": "commonjs", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} diff --git a/packages/nx-boot-maven/tsconfig.lib.json b/packages/nx-boot-maven/tsconfig.lib.json deleted file mode 100644 index 8c2b823a8..000000000 --- a/packages/nx-boot-maven/tsconfig.lib.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "../../dist/out-tsc", - "declaration": true, - "types": ["node"] - }, - "exclude": ["**/*.spec.ts", "jest.config.ts"], - "include": ["**/*.ts"] -} diff --git a/packages/nx-boot-maven/tsconfig.spec.json b/packages/nx-boot-maven/tsconfig.spec.json deleted file mode 100644 index 46bad9671..000000000 --- a/packages/nx-boot-maven/tsconfig.spec.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.d.ts", - "jest.config.ts" - ] -} diff --git a/packages/nx-quarkus-gradle/.babelrc b/packages/nx-quarkus-gradle/.babelrc deleted file mode 100644 index fd4cbcdef..000000000 --- a/packages/nx-quarkus-gradle/.babelrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "presets": [ - [ - "@nx/js/babel", - { - "useBuiltIns": "usage" - } - ] - ] -} diff --git a/packages/nx-quarkus-gradle/.eslintrc.json b/packages/nx-quarkus-gradle/.eslintrc.json deleted file mode 100644 index d8a301053..000000000 --- a/packages/nx-quarkus-gradle/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/packages/nx-quarkus-gradle/CHANGELOG.md b/packages/nx-quarkus-gradle/CHANGELOG.md deleted file mode 100644 index 7ef992f36..000000000 --- a/packages/nx-quarkus-gradle/CHANGELOG.md +++ /dev/null @@ -1,313 +0,0 @@ -# Changelog - -This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). - -## [0.17.2](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.17.1...nx-quarkus-gradle-0.17.2) (2023-09-10) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.2.0` -* `gradle` updated to version `0.17.0` - - -## [0.17.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.17.0...nx-quarkus-gradle-0.17.1) (2023-08-19) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `gradle` updated to version `0.16.1` -* `common` updated to version `0.11.0` - - -# [0.17.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.16.0...nx-quarkus-gradle-0.17.0) (2023-08-09) - -### Dependency Updates - -* `gradle` updated to version `0.16.0` - -### Features - -* deprecate some plugins and provide alternative ([e6725bd](https://github.com/khalilou88/jnxplus/commit/e6725bdbd340de19240c9713837798003cea4e1c)) - - - -# [0.16.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.15.0...nx-quarkus-gradle-0.16.0) (2023-08-05) - -### Dependency Updates - -* `gradle` updated to version `0.15.0` - -### Features - -* add repository to package.json ([f08724a](https://github.com/khalilou88/jnxplus/commit/f08724ac736499548c7dff23ad125f59ed257f73)) - - - -# [0.15.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.14.5...nx-quarkus-gradle-0.15.0) (2023-07-28) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.2.0` -* `gradle` updated to version `0.14.0` -* `common` updated to version `0.10.0` - -### Features - -* **executors:** use run-task instead of others executors ([#344](https://github.com/khalilou88/jnxplus/issues/344)) ([3b40dc6](https://github.com/khalilou88/jnxplus/commit/3b40dc668b69d8dcd6f934bd894d46768d574e8c)) - - - -## [0.14.5](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.14.4...nx-quarkus-gradle-0.14.5) (2023-07-12) - -### Dependency Updates - -* `gradle` updated to version `0.13.2` - - -## [0.14.4](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.14.3...nx-quarkus-gradle-0.14.4) (2023-07-08) - -### Dependency Updates - -* `gradle` updated to version `0.13.1` -* `common` updated to version `0.9.1` - - -## [0.14.3](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.14.2...nx-quarkus-gradle-0.14.3) (2023-07-02) - -### Dependency Updates - -* `gradle` updated to version `0.13.0` - - -## [0.14.2](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.14.1...nx-quarkus-gradle-0.14.2) (2023-06-28) - -### Dependency Updates - -* `gradle` updated to version `0.12.0` - - -## [0.14.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.14.0...nx-quarkus-gradle-0.14.1) (2023-06-24) - -### Dependency Updates - -* `gradle` updated to version `0.11.0` - - -# [0.14.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.13.1...nx-quarkus-gradle-0.14.0) (2023-06-23) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `gradle` updated to version `0.10.1` - -### Features - -* **generators:** export generators ([0cb4584](https://github.com/khalilou88/jnxplus/commit/0cb4584613b4ee14d2a7aa9529a708e41a0aa49d)) - - - -## [0.13.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.13.0...nx-quarkus-gradle-0.13.1) (2023-06-21) - - - -# [0.13.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.12.0...nx-quarkus-gradle-0.13.0) (2023-06-21) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `gradle` updated to version `0.10.0` -* `common` updated to version `0.9.0` - -### Bug Fixes - -* fix e2e tests ([#266](https://github.com/khalilou88/jnxplus/issues/266)) ([0e12db4](https://github.com/khalilou88/jnxplus/commit/0e12db4cb10b15142da482f3a63f9e7841f3ef88)) -* fix optional project.json ([#271](https://github.com/khalilou88/jnxplus/issues/271)) ([92e7064](https://github.com/khalilou88/jnxplus/commit/92e70640576a5943bc5be201f8c9885a51f49693)) - - -### Features - -* **generators:** add framework to nx-gradle ([#265](https://github.com/khalilou88/jnxplus/issues/265)) ([2148db4](https://github.com/khalilou88/jnxplus/commit/2148db46ba63acc5d292543142e47c20061a967e)) - - - -# [0.12.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.11.2...nx-quarkus-gradle-0.12.0) (2023-06-17) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.2.0` -* `internal-generators-files` updated to version `0.1.0` -* `gradle` updated to version `0.9.1` -* `common` updated to version `0.8.1` - -### Features - -* **generators:** reduce code duplication ([#251](https://github.com/khalilou88/jnxplus/issues/251)) ([dfdad1d](https://github.com/khalilou88/jnxplus/commit/dfdad1dfd2ef13303e1c12a4d824261d5bf407be)) -* **generators:** reduce linters files ([#252](https://github.com/khalilou88/jnxplus/issues/252)) ([75c0e76](https://github.com/khalilou88/jnxplus/commit/75c0e769e7917ef91584b4f5dcb5efbff80da6c2)) - - - -## [0.11.2](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.11.1...nx-quarkus-gradle-0.11.2) (2023-06-09) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.2.0` -* `gradle` updated to version `0.9.0` -* `common` updated to version `0.8.0` - - -## [0.11.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.11.0...nx-quarkus-gradle-0.11.1) (2023-06-09) - -### Dependency Updates - -* `gradle` updated to version `0.8.1` - - -# [0.11.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.10.1...nx-quarkus-gradle-0.11.0) (2023-06-07) - -### Dependency Updates - -* `gradle-plugin` updated to version `0.1.5` -* `gradle` updated to version `0.8.0` -* `common` updated to version `0.7.0` - -### Features - -* **executors:** add publish executor ([0a6a9fa](https://github.com/khalilou88/jnxplus/commit/0a6a9fa36e0f86dd35d93e04b1dfbca7fc8ff3a2)) -* **graph:** use projectDependencyTask to add deps to the graph ([#248](https://github.com/khalilou88/jnxplus/issues/248)) ([f174562](https://github.com/khalilou88/jnxplus/commit/f174562cd77ca1d68ae378927651001c46527579)) - - - -## [0.10.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.10.0...nx-quarkus-gradle-0.10.1) (2023-06-01) - -### Dependency Updates - -* `gradle` updated to version `0.7.0` -* `common` updated to version `0.6.0` - -### Bug Fixes - -* **graph:** set minimum version of nx to 16.3.0 ([2f4fcde](https://github.com/khalilou88/jnxplus/commit/2f4fcdeb26886bc808e9ab72f49379e9096d7c23)) - - - -# [0.10.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.9.0...nx-quarkus-gradle-0.10.0) (2023-05-28) - -### Dependency Updates - -* `gradle` updated to version `0.6.0` -* `common` updated to version `0.5.0` - -### Features - -* **executors:** move all gradle executors to gradle lib ([#235](https://github.com/khalilou88/jnxplus/issues/235)) ([86d6740](https://github.com/khalilou88/jnxplus/commit/86d67402517fd92cf505226c31c6af6fa0929b9d)) -* **executors:** move quarkus build-image executor to common lib ([#236](https://github.com/khalilou88/jnxplus/issues/236)) ([0400100](https://github.com/khalilou88/jnxplus/commit/04001009afb1f2d4e3f195a877a9d1123304f90e)) - - - -# [0.9.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.8.0...nx-quarkus-gradle-0.9.0) (2023-05-27) - -### Dependency Updates - -* `gradle` updated to version `0.5.0` -* `common` updated to version `0.4.0` - -### Bug Fixes - -* **executors:** use pipe output capture ([#233](https://github.com/khalilou88/jnxplus/issues/233)) ([1d295b4](https://github.com/khalilou88/jnxplus/commit/1d295b4548a2b2cbdeb4c7fbb5ceb4fb73a830d8)) - - -### Features - -* **generators:** update spring boot version to 3.1.0 ([#231](https://github.com/khalilou88/jnxplus/issues/231)) ([b050516](https://github.com/khalilou88/jnxplus/commit/b0505163fde06fbcf355a97a75e675c0c5fe8bc3)) - - - -# [0.8.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.7.1...nx-quarkus-gradle-0.8.0) (2023-05-26) - -### Dependency Updates - -* `gradle` updated to version `0.4.0` -* `common` updated to version `0.3.1` - -### Bug Fixes - -* **generators:** add messing quarkusPluginVersion property [skip ci] ([f6ac1b4](https://github.com/khalilou88/jnxplus/commit/f6ac1b44ada971d36c15d357810fd8ee4ce5ee0e)) - - -### Features - -* **generators:** update gradle wrapper version ([b9953ae](https://github.com/khalilou88/jnxplus/commit/b9953ae7607d8b9ca01542627711b79b131d629d)) - - - -## [0.7.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.7.0...nx-quarkus-gradle-0.7.1) (2023-05-22) - -### Dependency Updates - -* `gradle` updated to version `0.3.1` - -### Bug Fixes - -* **generators:** add `\t` when adding a dependency to a project ([#217](https://github.com/khalilou88/jnxplus/issues/217)) ([acb752f](https://github.com/khalilou88/jnxplus/commit/acb752f01a735cae98432e22934d457721378a4f)) - - - -# [0.7.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.6.0...nx-quarkus-gradle-0.7.0) (2023-05-21) - -### Dependency Updates - -* `gradle` updated to version `0.3.0` - -### Bug Fixes - -* **generators:** don't generate extras lines in templates ([#216](https://github.com/khalilou88/jnxplus/issues/216)) ([fd2835c](https://github.com/khalilou88/jnxplus/commit/fd2835ce58f0b67c0d02ec0586744735e94330b1)) - - -### Features - -* **generators:** read gradle dsl from root project ([#214](https://github.com/khalilou88/jnxplus/issues/214)) ([ddf52d0](https://github.com/khalilou88/jnxplus/commit/ddf52d0e0886081c2c4b3176488e1779457defeb)) - - - -# [0.6.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.5.0...nx-quarkus-gradle-0.6.0) (2023-05-19) - -### Dependency Updates - -* `gradle` updated to version `0.2.1` -* `common` updated to version `0.3.0` - -### Bug Fixes - -* **nx-boot-gradle:** refactor deps graph ([#212](https://github.com/khalilou88/jnxplus/issues/212)) ([ad50fc6](https://github.com/khalilou88/jnxplus/commit/ad50fc6302e981080040a9343def126015b1e216)) - - -### Features - -* **nx-quarkus-maven:** migrate to quarkus 3 ([#209](https://github.com/khalilou88/jnxplus/issues/209)) ([b72bc15](https://github.com/khalilou88/jnxplus/commit/b72bc15c7426c33095cf2da14e7178d7b042557c)) - - - -# [0.5.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.4.5...nx-quarkus-gradle-0.5.0) (2023-05-17) - -### Dependency Updates - -* `gradle` updated to version `0.2.0` -* `common` updated to version `0.2.4` - -### Bug Fixes - -* **nx-quarkus-gradle:** fix gitattributes content ([5a168d3](https://github.com/khalilou88/jnxplus/commit/5a168d3c5dbf011e28cfdaaaf1dd5fe75fe62fda)) - - -### Features - -* **nx-quarkus-gradle:** use addOrUpdateGitattributes from gradle lib ([b27a198](https://github.com/khalilou88/jnxplus/commit/b27a1981ae5c41a4862048c37d0a1250260d9680)) - - - -## [0.4.5](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-gradle-0.4.4...nx-quarkus-gradle-0.4.5) (2023-05-13) - -### Dependency Updates - -- `gradle` updated to version `0.1.6` -- `common` updated to version `0.2.3` diff --git a/packages/nx-quarkus-gradle/README.md b/packages/nx-quarkus-gradle/README.md deleted file mode 100644 index 0adaa8699..000000000 --- a/packages/nx-quarkus-gradle/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# Plugin deprecated - -Plugin deprecated, use @jnxplus/nx-gradle instead. - -# @jnxplus/nx-quarkus-gradle - -[![npm version](https://badge.fury.io/js/@jnxplus%2Fnx-quarkus-gradle.svg)](https://badge.fury.io/js/@jnxplus%2Fnx-quarkus-gradle) - -This plugin adds Quarkus and Gradle multi-project builds capabilities to Nx workspace. - -## Supported versions - -| @jnxplus/nx-quarkus-gradle | Nx | Quarkus | -| -------------------------- | ------ | ----------- | -| 0.x.x | 16.x.x | 3.x.x.Final | - -## Getting Started - -### 0. Prerequisites - -`@jnxplus/nx-quarkus-gradle` requires a Java 17 or higher Runtime Environment and the current Long Term Support (LTS) version of node.js. - -### 1. Install the plugin - -In the Nx workspace root folder, run this command to install the plugin : - -```bash -npm install --save-dev @jnxplus/nx-quarkus-gradle -``` - -### 2. Add Quarkus and Gradle wrapper support - -The following command adds Quarkus and Gradle support (Gradle wrapper and config files) to the workspace. This only needs to be performed once per workspace. - -```bash -nx generate @jnxplus/nx-quarkus-gradle:init -``` - -### 3. Usage - -| Action | Command | -| ------------------------------------ | ---------------------------------------------------------------- | -| Generate an application | `nx generate @jnxplus/nx-quarkus-gradle:application my-app-name` | -| Generate a library | `nx generate @jnxplus/nx-quarkus-gradle:library my-lib-name` | -| Build a project | `nx build my-project-name` | -| Build an image | `nx build-image my-app-name` | -| Serve an application | `nx serve my-app-name` | -| Test a project | `nx test my-project-name` | -| Integration Test an application | `nx integration-test my-app-name` | -| Lint a project | `nx lint my-project-name` | -| Format a java project | `nx format --projects my-project-name` | -| Format a kotlin project | `nx ktformat my-project-name` | -| Run a custom task | `nx run-task my-project-name --task="test"` | -| Visualize project's dependency graph | `nx graph` | - -## License - -MIT © 2023-2023 Khalil LAGRIDA diff --git a/packages/nx-quarkus-gradle/executors.json b/packages/nx-quarkus-gradle/executors.json deleted file mode 100644 index d3afb3305..000000000 --- a/packages/nx-quarkus-gradle/executors.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "executors": { - "run-task": { - "implementation": "@jnxplus/gradle/src/executors/run-task/executor", - "schema": "@jnxplus/gradle/src/executors/run-task/schema.json", - "description": "run-task executor" - }, - "lint": { - "implementation": "@jnxplus/gradle/src/executors/lint/executor", - "schema": "@jnxplus/common/src/executors/lint/schema.json", - "description": "lint executor" - }, - "ktformat": { - "implementation": "@jnxplus/gradle/src/executors/ktformat/executor", - "schema": "@jnxplus/common/src/executors/ktformat/schema.json", - "description": "kotlin format executor" - }, - "quarkus-build-image": { - "implementation": "@jnxplus/common/src/executors/build-image/quarkus/executor", - "schema": "@jnxplus/common/src/executors/build-image/quarkus/schema.json", - "description": "quarkus build-image executor" - } - } -} diff --git a/packages/nx-quarkus-gradle/generators.json b/packages/nx-quarkus-gradle/generators.json deleted file mode 100644 index 48c2ddd66..000000000 --- a/packages/nx-quarkus-gradle/generators.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "name": "nx-quarkus-gradle", - "version": "0.0.1", - "generators": { - "init": { - "factory": "./src/generators/init/generator", - "schema": "./src/generators/init/schema.json", - "description": "init generator" - }, - "migrate": { - "factory": "./src/generators/migrate/generator", - "schema": "./src/generators/migrate/schema.json", - "description": "migrate generator" - }, - "application": { - "factory": "./src/generators/application/generator", - "schema": "./src/generators/application/schema.json", - "aliases": ["app"], - "x-type": "application", - "description": "application generator" - }, - "library": { - "factory": "./src/generators/library/generator", - "schema": "./src/generators/library/schema.json", - "aliases": ["lib"], - "x-type": "library", - "description": "library generator" - } - } -} diff --git a/packages/nx-quarkus-gradle/jest.config.ts b/packages/nx-quarkus-gradle/jest.config.ts deleted file mode 100644 index a21b73199..000000000 --- a/packages/nx-quarkus-gradle/jest.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'nx-quarkus-gradle', - - globals: {}, - testEnvironment: 'node', - transform: { - '^.+\\.[tj]sx?$': [ - 'ts-jest', - { - tsconfig: '/tsconfig.spec.json', - }, - ], - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/packages/nx-quarkus-gradle', - preset: '../../jest.preset.js', -}; diff --git a/packages/nx-quarkus-gradle/package.json b/packages/nx-quarkus-gradle/package.json deleted file mode 100644 index 8640d9c0c..000000000 --- a/packages/nx-quarkus-gradle/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@jnxplus/nx-quarkus-gradle", - "version": "0.17.2", - "type": "commonjs", - "main": "src/index.js", - "generators": "./generators.json", - "executors": "./executors.json", - "private": false, - "publishConfig": { - "access": "public" - }, - "license": "MIT", - "author": "Khalil LAGRIDA", - "homepage": "https://github.com/khalilou88/jnxplus/blob/main/packages/nx-quarkus-gradle/README.md", - "bugs": { - "url": "https://github.com/khalilou88/jnxplus/issues" - }, - "keywords": [ - "nx", - "nx-workspace", - "nx-plugin", - "java", - "quarkus", - "gradle", - "gradle multi-project build" - ], - "scripts": { - "postinstall": "node src/scripts/install-linters.js" - }, - "dependencies": { - "prettier": "^2.8.7", - "prettier-plugin-java": "^2.1.0" - }, - "peerDependencies": { - "@nx/devkit": ">=16.3.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/khalilou88/jnxplus.git", - "directory": "packages/nx-quarkus-gradle" - } -} diff --git a/packages/nx-quarkus-gradle/project.json b/packages/nx-quarkus-gradle/project.json deleted file mode 100644 index 4ba6db0bf..000000000 --- a/packages/nx-quarkus-gradle/project.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "name": "nx-quarkus-gradle", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "packages/nx-quarkus-gradle/src", - "projectType": "library", - "targets": { - "build": { - "executor": "@nx/js:tsc", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/packages/nx-quarkus-gradle", - "main": "packages/nx-quarkus-gradle/src/index.ts", - "packageJson": "packages/nx-quarkus-gradle/package.json", - "tsConfig": "packages/nx-quarkus-gradle/tsconfig.lib.json", - "updateBuildableProjectDepsInPackageJson": true, - "buildableProjectDepsInPackageJsonType": "dependencies", - "assets": [ - "packages/nx-quarkus-gradle/*.md", - { - "input": "./packages/nx-quarkus-gradle/src", - "glob": "**/!(*.ts)", - "output": "./src" - }, - { - "input": "./packages/nx-quarkus-gradle/src", - "glob": "**/*.d.ts", - "output": "./src" - }, - { - "input": "./packages/nx-quarkus-gradle", - "glob": "generators.json", - "output": "." - }, - { - "input": "./packages/nx-quarkus-gradle", - "glob": "executors.json", - "output": "." - }, - { - "input": "./packages/gradle-plugin", - "glob": "gradle/**", - "output": "./src/generators/init/files/gradle/wrapper" - }, - { - "input": "./packages/gradle-plugin", - "glob": "gradlew", - "output": "./src/generators/init/files/gradle/wrapper" - }, - { - "input": "./packages/gradle-plugin", - "glob": "gradlew.bat", - "output": "./src/generators/init/files/gradle/wrapper" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/shared", - "glob": "**", - "output": "./src/generators/application/files/quarkus" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/gradle/java", - "glob": "**", - "output": "./src/generators/application/files/quarkus/java" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/gradle", - "glob": "docker/**", - "output": "./src/generators/application/files/quarkus/java/src/main" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/gradle/kotlin", - "glob": "**", - "output": "./src/generators/application/files/quarkus/kotlin" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/gradle", - "glob": "docker/**", - "output": "./src/generators/application/files/quarkus/kotlin/src/main" - }, - { - "input": "./packages/internal/generators-files/quarkus/library/shared", - "glob": "**", - "output": "./src/generators/library/files/quarkus" - }, - { - "input": "./packages/internal/generators-files/quarkus/library/gradle", - "glob": "**", - "output": "./src/generators/library/files/quarkus" - }, - { - "input": "./packages/internal/generators-files", - "glob": "linters/**", - "output": "./src/generators/init/files" - } - ] - } - }, - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["packages/nx-quarkus-gradle/**/*.ts"] - } - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/packages/nx-quarkus-gradle"], - "options": { - "jestConfig": "packages/nx-quarkus-gradle/jest.config.ts", - "passWithNoTests": true - } - }, - "version": { - "executor": "@jscutlery/semver:version", - "options": { - "preset": "angular", - "trackDeps": true, - "push": true, - "noVerify": true, - "postTargets": [ - "nx-quarkus-gradle:github", - "nx-quarkus-gradle:publish" - ], - "commitMessageFormat": "release: cut release ${version} of ${projectName}" - } - }, - "github": { - "executor": "@jscutlery/semver:github", - "options": { - "tag": "${tag}", - "notes": "${notes}" - } - }, - "publish": { - "executor": "ngx-deploy-npm:deploy", - "options": { - "access": "public" - } - } - }, - "tags": [], - "implicitDependencies": ["gradle-plugin", "internal-generators-files"] -} diff --git a/packages/nx-quarkus-gradle/src/dep-graph/lookup-deps.ts b/packages/nx-quarkus-gradle/src/dep-graph/lookup-deps.ts deleted file mode 100644 index 073fc1bec..000000000 --- a/packages/nx-quarkus-gradle/src/dep-graph/lookup-deps.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { addProjectsAndDependenciesFromTask } from '@jnxplus/gradle'; -import { - ProjectGraph, - ProjectGraphBuilder, - ProjectGraphProcessorContext, -} from '@nx/devkit'; - -export function processProjectGraph( - graph: ProjectGraph, - context: ProjectGraphProcessorContext -): ProjectGraph { - const builder = new ProjectGraphBuilder(graph); - addProjectsAndDependenciesFromTask( - builder, - context, - '@jnxplus/nx-quarkus-gradle' - ); - return builder.getUpdatedProjectGraph(); -} diff --git a/packages/nx-quarkus-gradle/src/generators/application/generator.ts b/packages/nx-quarkus-gradle/src/generators/application/generator.ts deleted file mode 100644 index a9bbda58c..000000000 --- a/packages/nx-quarkus-gradle/src/generators/application/generator.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { applicationGenerator } from '@jnxplus/gradle'; -import { Tree } from '@nx/devkit'; -import { NxQuarkusGradleAppGeneratorSchema } from './schema'; - -export default async function ( - tree: Tree, - options: NxQuarkusGradleAppGeneratorSchema -) { - await applicationGenerator( - __dirname, - '@jnxplus/nx-quarkus-gradle', - tree, - options - ); -} diff --git a/packages/nx-quarkus-gradle/src/generators/application/schema.d.ts b/packages/nx-quarkus-gradle/src/generators/application/schema.d.ts deleted file mode 100644 index d198fc21e..000000000 --- a/packages/nx-quarkus-gradle/src/generators/application/schema.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { LanguageType, PackagingType } from '@jnxplus/common'; - -export interface NxQuarkusGradleAppGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - simplePackageName?: boolean; - language: LanguageType; - groupId: string; - projectVersion: string; - configFormat: '.properties' | '.yml'; - minimal?: boolean; - port?: string | number; - packaging: PackagingType; -} diff --git a/packages/nx-quarkus-gradle/src/generators/application/schema.json b/packages/nx-quarkus-gradle/src/generators/application/schema.json deleted file mode 100644 index acc6905cb..000000000 --- a/packages/nx-quarkus-gradle/src/generators/application/schema.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxQuarkusGradleApp", - "title": "Create an application", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the app name", - "type": "boolean", - "default": false - }, - "simplePackageName": { - "description": "Don't include the directory in the package name", - "type": "boolean", - "default": false - }, - "language": { - "description": "Language of the project", - "type": "string", - "default": "java", - "x-prompt": { - "message": "Which language would you like to use?", - "type": "list", - "items": [ - { - "value": "java", - "label": "Java" - }, - { - "value": "kotlin", - "label": "Kotlin" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "org.acme", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "configFormat": { - "description": "Configuration format of the project", - "type": "string", - "default": ".properties", - "x-prompt": { - "message": "Which configuration format would you like to use?", - "type": "list", - "items": [ - { - "value": ".properties", - "label": "Properties" - }, - { - "value": ".yml", - "label": "Yaml" - } - ] - } - }, - "minimal": { - "description": "Skip starter code", - "type": "boolean", - "default": false - }, - "port": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "default": 8080, - "description": "Port to start the server at. Default is 8080." - } - }, - "required": ["name", "language", "groupId", "projectVersion", "configFormat"] -} diff --git a/packages/nx-quarkus-gradle/src/generators/init/files/gradle/config/build.gradle__kotlinExtension__ b/packages/nx-quarkus-gradle/src/generators/init/files/gradle/config/build.gradle__kotlinExtension__ deleted file mode 100644 index 15642825a..000000000 --- a/packages/nx-quarkus-gradle/src/generators/init/files/gradle/config/build.gradle__kotlinExtension__ +++ /dev/null @@ -1,9 +0,0 @@ -plugins { -<% if(dsl === 'groovy') { -%> - id 'io.github.khalilou88.jnxplus' -<% } -%> -<% if(dsl === 'kotlin') { -%> - id("io.github.khalilou88.jnxplus") -<% } -%> -} - diff --git a/packages/nx-quarkus-gradle/src/generators/init/files/gradle/config/gradle.properties b/packages/nx-quarkus-gradle/src/generators/init/files/gradle/config/gradle.properties deleted file mode 100644 index b7ad9a9ba..000000000 --- a/packages/nx-quarkus-gradle/src/generators/init/files/gradle/config/gradle.properties +++ /dev/null @@ -1,12 +0,0 @@ -#Gradle properties -javaVersion=<%= javaVersion %> -kotlinVersion=<%= kotlinVersion %> -quarkusVersion=<%= quarkusVersion %> -jnxplusGradlePluginVersion=<%= jnxplusGradlePluginVersion %> -checkstyleVersion=<%= checkstyleVersion %> -ktlintVersion=<%= ktlintVersion %> - - - - - diff --git a/packages/nx-quarkus-gradle/src/generators/init/files/gradle/config/settings.gradle__kotlinExtension__ b/packages/nx-quarkus-gradle/src/generators/init/files/gradle/config/settings.gradle__kotlinExtension__ deleted file mode 100644 index 53c12cc2b..000000000 --- a/packages/nx-quarkus-gradle/src/generators/init/files/gradle/config/settings.gradle__kotlinExtension__ +++ /dev/null @@ -1,39 +0,0 @@ -<% if(dsl === 'groovy') { -%> -pluginManagement { - plugins { - id "io.quarkus" version "${quarkusVersion}" - id "org.jetbrains.kotlin.jvm" version "${kotlinVersion}" - id "org.jetbrains.kotlin.plugin.allopen" version "${kotlinVersion}" - id "io.github.khalilou88.jnxplus" version "${jnxplusGradlePluginVersion}" - } -<% if(generateRepositories) { -%> - repositories { - mavenCentral() - gradlePluginPortal() - mavenLocal() - } -<% } -%> -} -rootProject.name = '<%= rootProjectName %>' -<% } -%> -<% if(dsl === 'kotlin') { -%> -pluginManagement { - val quarkusVersion: String by settings - val kotlinVersion: String by settings - val jnxplusGradlePluginVersion: String by settings - plugins { - id("io.quarkus") version quarkusVersion - kotlin("jvm") version kotlinVersion - kotlin("plugin.allopen") version kotlinVersion - id("io.github.khalilou88.jnxplus") version jnxplusGradlePluginVersion - } -<% if(generateRepositories) { -%> - repositories { - mavenCentral() - gradlePluginPortal() - mavenLocal() - } -<% } -%> -} -rootProject.name = "<%= rootProjectName %>" -<% } -%> diff --git a/packages/nx-quarkus-gradle/src/generators/init/generator.ts b/packages/nx-quarkus-gradle/src/generators/init/generator.ts deleted file mode 100644 index 92a13f846..000000000 --- a/packages/nx-quarkus-gradle/src/generators/init/generator.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { - checkstyleVersion, - ktlintVersion, - kotlinVersion, - quarkusVersion, - updateNxJson, - jnxplusGradlePluginVersion, -} from '@jnxplus/common'; -import { - addOrUpdateGitattributes, - addOrUpdatePrettierIgnore, - updateGitIgnore, -} from '@jnxplus/gradle'; -import { Tree, formatFiles, generateFiles, offsetFromRoot } from '@nx/devkit'; -import * as path from 'path'; -import { NxQuarkusGradleGeneratorSchema } from './schema'; - -interface NormalizedSchema extends NxQuarkusGradleGeneratorSchema { - kotlinExtension: string; - quarkusVersion: string; - kotlinVersion: string; - checkstyleVersion: string; - ktlintVersion: string; - jnxplusGradlePluginVersion: string; - generateRepositories: boolean; -} - -function normalizeOptions( - tree: Tree, - options: NxQuarkusGradleGeneratorSchema -): NormalizedSchema { - const kotlinExtension = options.dsl === 'kotlin' ? '.kts' : ''; - - const generateRepositories = process.env['NODE_ENV'] === 'test'; - - return { - ...options, - kotlinExtension, - quarkusVersion, - kotlinVersion, - checkstyleVersion, - ktlintVersion, - jnxplusGradlePluginVersion, - generateRepositories, - }; -} - -function addFiles(tree: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - offsetFromRoot: offsetFromRoot(tree.root), - template: '', - }; - generateFiles( - tree, - path.join(__dirname, 'files', 'gradle', 'wrapper'), - '', - templateOptions - ); - generateFiles( - tree, - path.join(__dirname, 'files', 'gradle', 'config'), - '', - templateOptions - ); - generateFiles( - tree, - path.join(__dirname, 'files', 'linters'), - 'tools/linters', - templateOptions - ); -} - -export default async function ( - tree: Tree, - options: NxQuarkusGradleGeneratorSchema -) { - const normalizedOptions = normalizeOptions(tree, options); - addFiles(tree, normalizedOptions); - updateNxJson(tree, '@jnxplus/nx-quarkus-gradle'); - updateGitIgnore(tree); - addOrUpdatePrettierIgnore(tree); - addOrUpdateGitattributes(tree); - tree.changePermissions('gradlew', '755'); - tree.changePermissions('gradlew.bat', '755'); - await formatFiles(tree); -} diff --git a/packages/nx-quarkus-gradle/src/generators/init/schema.d.ts b/packages/nx-quarkus-gradle/src/generators/init/schema.d.ts deleted file mode 100644 index 980ecb327..000000000 --- a/packages/nx-quarkus-gradle/src/generators/init/schema.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { DSLType } from '@jnxplus/common'; - -export interface NxQuarkusGradleGeneratorSchema { - javaVersion: string | number; - dsl: DSLType; - rootProjectName: string; -} diff --git a/packages/nx-quarkus-gradle/src/generators/init/schema.json b/packages/nx-quarkus-gradle/src/generators/init/schema.json deleted file mode 100644 index 428e5b9a4..000000000 --- a/packages/nx-quarkus-gradle/src/generators/init/schema.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxQuarkusGradleInit", - "title": "Init", - "type": "object", - "properties": { - "javaVersion": { - "description": "Java version", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "default": "17", - "x-prompt": { - "message": "Which version of Java would you like to use?", - "type": "list", - "items": [ - { - "value": "21", - "label": "21" - }, - { - "value": "17", - "label": "17" - } - ] - } - }, - "dsl": { - "description": "Build DSL", - "type": "string", - "default": "groovy", - "x-prompt": { - "message": "Which build DSL would you like to use?", - "type": "list", - "items": [ - { - "value": "groovy", - "label": "Groovy build DSL" - }, - { - "value": "kotlin", - "label": "Kotlin build DSL" - } - ] - } - }, - "rootProjectName": { - "type": "string", - "default": "quarkus-root-project", - "x-prompt": "What rootProjectName would you like to use?", - "pattern": "^[a-zA-Z].*$" - } - }, - "required": ["javaVersion", "dsl", "rootProjectName"] -} diff --git a/packages/nx-quarkus-gradle/src/generators/library/generator.ts b/packages/nx-quarkus-gradle/src/generators/library/generator.ts deleted file mode 100644 index f912a68bb..000000000 --- a/packages/nx-quarkus-gradle/src/generators/library/generator.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { libraryGenerator } from '@jnxplus/gradle'; -import { Tree } from '@nx/devkit'; -import { NxQuarkusGradleLibGeneratorSchema } from './schema'; - -export default async function ( - tree: Tree, - options: NxQuarkusGradleLibGeneratorSchema -) { - await libraryGenerator( - __dirname, - '@jnxplus/nx-quarkus-gradle', - tree, - options - ); -} diff --git a/packages/nx-quarkus-gradle/src/generators/library/schema.d.ts b/packages/nx-quarkus-gradle/src/generators/library/schema.d.ts deleted file mode 100644 index 210d6daea..000000000 --- a/packages/nx-quarkus-gradle/src/generators/library/schema.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { LanguageType } from '@jnxplus/common'; - -export interface NxQuarkusGradleLibGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - simplePackageName?: boolean; - language: LanguageType; - groupId: string; - projectVersion: string; - projects?: string; - skipStarterCode?: boolean; -} diff --git a/packages/nx-quarkus-gradle/src/generators/library/schema.json b/packages/nx-quarkus-gradle/src/generators/library/schema.json deleted file mode 100644 index 1ea681daa..000000000 --- a/packages/nx-quarkus-gradle/src/generators/library/schema.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxQuarkusGradleLib", - "title": "Create a library", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the lib name", - "type": "boolean", - "default": false - }, - "simplePackageName": { - "description": "Don't include the directory in the package name", - "type": "boolean", - "default": false - }, - "language": { - "description": "Language of the project", - "type": "string", - "default": "java", - "x-prompt": { - "message": "Which language would you like to use?", - "type": "list", - "items": [ - { - "value": "java", - "label": "Java" - }, - { - "value": "kotlin", - "label": "Kotlin" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "org.acme", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "projects": { - "type": "string", - "description": "Projects where the library should be added (comma delimited)" - }, - "skipStarterCode": { - "description": "Skip starter code", - "type": "boolean", - "default": false - } - }, - "required": ["name", "language", "groupId", "projectVersion"] -} diff --git a/packages/nx-quarkus-gradle/src/generators/migrate/generator.ts b/packages/nx-quarkus-gradle/src/generators/migrate/generator.ts deleted file mode 100644 index ccd24ae84..000000000 --- a/packages/nx-quarkus-gradle/src/generators/migrate/generator.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { formatFiles, generateFiles, offsetFromRoot, Tree } from '@nx/devkit'; -import * as path from 'path'; -import { NxQuarkusGradleMigrateGeneratorSchema } from './schema'; - -interface NormalizedSchema extends NxQuarkusGradleMigrateGeneratorSchema {} // eslint-disable-line - -function normalizeOptions( - tree: Tree, - options: NxQuarkusGradleMigrateGeneratorSchema -): NormalizedSchema { - return { - ...options, - }; -} - -function addFiles(tree: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - offsetFromRoot: offsetFromRoot(tree.root), - template: '', - }; - generateFiles( - tree, - path.join(__dirname, '..', 'init', 'files', 'gradle', 'wrapper'), - '', - templateOptions - ); -} - -export default async function ( - tree: Tree, - options: NxQuarkusGradleMigrateGeneratorSchema -) { - const normalizedOptions = normalizeOptions(tree, options); - addFiles(tree, normalizedOptions); - tree.changePermissions('gradlew', '755'); - tree.changePermissions('gradlew.bat', '755'); - await formatFiles(tree); -} diff --git a/packages/nx-quarkus-gradle/src/generators/migrate/schema.d.ts b/packages/nx-quarkus-gradle/src/generators/migrate/schema.d.ts deleted file mode 100644 index d06eba14f..000000000 --- a/packages/nx-quarkus-gradle/src/generators/migrate/schema.d.ts +++ /dev/null @@ -1 +0,0 @@ -export interface NxQuarkusGradleMigrateGeneratorSchema {} // eslint-disable-line diff --git a/packages/nx-quarkus-gradle/src/generators/migrate/schema.json b/packages/nx-quarkus-gradle/src/generators/migrate/schema.json deleted file mode 100644 index 4cbd917d5..000000000 --- a/packages/nx-quarkus-gradle/src/generators/migrate/schema.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxQuarkusGradleMigrate", - "title": "Migrate", - "type": "object", - "properties": {}, - "required": [] -} diff --git a/packages/nx-quarkus-gradle/src/index.ts b/packages/nx-quarkus-gradle/src/index.ts deleted file mode 100644 index 57cd00dc0..000000000 --- a/packages/nx-quarkus-gradle/src/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export { processProjectGraph } from './dep-graph/lookup-deps'; - -import initGenerator from './generators/init/generator'; -import libraryGenerator from './generators/library/generator'; -import applicationGenerator from './generators/application/generator'; -import migrateGenerator from './generators/migrate/generator'; - -export { - initGenerator, - libraryGenerator, - applicationGenerator, - migrateGenerator, -}; diff --git a/packages/nx-quarkus-gradle/src/scripts/install-linters.ts b/packages/nx-quarkus-gradle/src/scripts/install-linters.ts deleted file mode 100644 index b7369c8bc..000000000 --- a/packages/nx-quarkus-gradle/src/scripts/install-linters.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { getCheckstylePath, getKtlintPath, isE2eTest } from '@jnxplus/common'; -import { getCheckstyleVersion, getKtlintVersion } from '@jnxplus/gradle'; -import { logger, workspaceRoot } from '@nx/devkit'; -import * as path from 'path'; - -(async () => { - if (process.env['NX_VERBOSE_LOGGING'] === 'true') { - logger.debug('Install Linters'); - } - - let workspaceRootToUse = workspaceRoot; - const tmpWorkspaceRoot = path.join( - workspaceRootToUse, - 'tmp', - 'nx-e2e', - 'proj' - ); - - if (isE2eTest(tmpWorkspaceRoot)) { - workspaceRootToUse = tmpWorkspaceRoot; - } - - await getCheckstylePath(getCheckstyleVersion, workspaceRootToUse); - await getKtlintPath(getKtlintVersion, workspaceRootToUse); -})(); diff --git a/packages/nx-quarkus-gradle/tsconfig.json b/packages/nx-quarkus-gradle/tsconfig.json deleted file mode 100644 index f5b85657a..000000000 --- a/packages/nx-quarkus-gradle/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "module": "commonjs", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} diff --git a/packages/nx-quarkus-gradle/tsconfig.lib.json b/packages/nx-quarkus-gradle/tsconfig.lib.json deleted file mode 100644 index 8c2b823a8..000000000 --- a/packages/nx-quarkus-gradle/tsconfig.lib.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "../../dist/out-tsc", - "declaration": true, - "types": ["node"] - }, - "exclude": ["**/*.spec.ts", "jest.config.ts"], - "include": ["**/*.ts"] -} diff --git a/packages/nx-quarkus-gradle/tsconfig.spec.json b/packages/nx-quarkus-gradle/tsconfig.spec.json deleted file mode 100644 index 46bad9671..000000000 --- a/packages/nx-quarkus-gradle/tsconfig.spec.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.d.ts", - "jest.config.ts" - ] -} diff --git a/packages/nx-quarkus-maven/.babelrc b/packages/nx-quarkus-maven/.babelrc deleted file mode 100644 index fd4cbcdef..000000000 --- a/packages/nx-quarkus-maven/.babelrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "presets": [ - [ - "@nx/js/babel", - { - "useBuiltIns": "usage" - } - ] - ] -} diff --git a/packages/nx-quarkus-maven/.eslintrc.json b/packages/nx-quarkus-maven/.eslintrc.json deleted file mode 100644 index d8a301053..000000000 --- a/packages/nx-quarkus-maven/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/packages/nx-quarkus-maven/CHANGELOG.md b/packages/nx-quarkus-maven/CHANGELOG.md deleted file mode 100644 index 92856149b..000000000 --- a/packages/nx-quarkus-maven/CHANGELOG.md +++ /dev/null @@ -1,243 +0,0 @@ -# Changelog - -This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). - -## [0.13.2](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.13.1...nx-quarkus-maven-0.13.2) (2023-09-10) - -### Dependency Updates - -* `maven` updated to version `0.11.0` - - -## [0.13.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.13.0...nx-quarkus-maven-0.13.1) (2023-08-19) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `maven` updated to version `0.10.0` -* `common` updated to version `0.11.0` - - -# [0.13.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.12.0...nx-quarkus-maven-0.13.0) (2023-08-09) - -### Dependency Updates - -* `maven` updated to version `0.9.0` - -### Features - -* deprecate some plugins and provide alternative ([e6725bd](https://github.com/khalilou88/jnxplus/commit/e6725bdbd340de19240c9713837798003cea4e1c)) - - - -# [0.12.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.11.0...nx-quarkus-maven-0.12.0) (2023-08-05) - -### Dependency Updates - -* `maven` updated to version `0.8.0` - -### Features - -* add repository to package.json ([f08724a](https://github.com/khalilou88/jnxplus/commit/f08724ac736499548c7dff23ad125f59ed257f73)) - - - -# [0.11.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.10.4...nx-quarkus-maven-0.11.0) (2023-07-28) - -### Dependency Updates - -* `maven` updated to version `0.7.0` -* `common` updated to version `0.10.0` - -### Features - -* **executors:** use run-task instead of others executors ([#344](https://github.com/khalilou88/jnxplus/issues/344)) ([3b40dc6](https://github.com/khalilou88/jnxplus/commit/3b40dc668b69d8dcd6f934bd894d46768d574e8c)) - - - -## [0.10.4](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.10.3...nx-quarkus-maven-0.10.4) (2023-07-08) - -### Dependency Updates - -* `maven` updated to version `0.6.1` -* `common` updated to version `0.9.1` - - -## [0.10.3](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.10.2...nx-quarkus-maven-0.10.3) (2023-06-24) - -### Dependency Updates - -* `maven` updated to version `0.6.0` - - -## [0.10.2](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.10.1...nx-quarkus-maven-0.10.2) (2023-06-23) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `maven` updated to version `0.5.1` - - -## [0.10.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.10.0...nx-quarkus-maven-0.10.1) (2023-06-21) - - - -# [0.10.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.9.0...nx-quarkus-maven-0.10.0) (2023-06-21) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `maven` updated to version `0.5.0` -* `common` updated to version `0.9.0` - -### Features - -* **generators:** add framework generation to nx-maven plugin ([#259](https://github.com/khalilou88/jnxplus/issues/259)) ([7eeded8](https://github.com/khalilou88/jnxplus/commit/7eeded89e41c1feac148bf3cc119da30b42bc3df)) -* **generators:** remove generators code duplication ([#260](https://github.com/khalilou88/jnxplus/issues/260)) ([a4d495e](https://github.com/khalilou88/jnxplus/commit/a4d495ed73a23dc2e146f798b29ac37383dbe923)) - - - -# [0.9.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.8.3...nx-quarkus-maven-0.9.0) (2023-06-17) - -### Dependency Updates - -* `internal-generators-files` updated to version `0.1.0` -* `internal-maven-wrapper` updated to version `0.0.1` -* `maven` updated to version `0.4.3` -* `common` updated to version `0.8.1` - -### Bug Fixes - -* **graph:** fix optional project.json ([#256](https://github.com/khalilou88/jnxplus/issues/256)) ([0db8e12](https://github.com/khalilou88/jnxplus/commit/0db8e12a1d7056d6423ae664ae70725099ad33bd)) - - -### Features - -* **generators:** reduce code duplication ([#251](https://github.com/khalilou88/jnxplus/issues/251)) ([dfdad1d](https://github.com/khalilou88/jnxplus/commit/dfdad1dfd2ef13303e1c12a4d824261d5bf407be)) -* **generators:** reduce linters files ([#252](https://github.com/khalilou88/jnxplus/issues/252)) ([75c0e76](https://github.com/khalilou88/jnxplus/commit/75c0e769e7917ef91584b4f5dcb5efbff80da6c2)) - - - -## [0.8.3](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.8.2...nx-quarkus-maven-0.8.3) (2023-06-09) - -### Dependency Updates - -* `maven` updated to version `0.4.2` -* `common` updated to version `0.8.0` - - -## [0.8.2](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.8.1...nx-quarkus-maven-0.8.2) (2023-06-07) - -### Dependency Updates - -* `maven` updated to version `0.4.1` -* `common` updated to version `0.7.0` - - -## [0.8.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.8.0...nx-quarkus-maven-0.8.1) (2023-06-01) - -### Dependency Updates - -* `maven` updated to version `0.4.0` -* `common` updated to version `0.6.0` - -### Bug Fixes - -* **graph:** set minimum version of nx to 16.3.0 ([2f4fcde](https://github.com/khalilou88/jnxplus/commit/2f4fcdeb26886bc808e9ab72f49379e9096d7c23)) - - - -# [0.8.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.7.0...nx-quarkus-maven-0.8.0) (2023-05-28) - -### Dependency Updates - -* `maven` updated to version `0.3.0` -* `common` updated to version `0.5.0` - -### Bug Fixes - -* **generators:** make dependencies optional in libs ([2cdfc33](https://github.com/khalilou88/jnxplus/commit/2cdfc330e1b3b0b81c136a98857e149a8d82ed2d)) - - -### Features - -* **executors:** move all maven executors to maven lib ([#234](https://github.com/khalilou88/jnxplus/issues/234)) ([00f7f88](https://github.com/khalilou88/jnxplus/commit/00f7f88008637fd98d48402343ccb95878bc1182)) -* **executors:** move quarkus build-image executor to common lib ([#236](https://github.com/khalilou88/jnxplus/issues/236)) ([0400100](https://github.com/khalilou88/jnxplus/commit/04001009afb1f2d4e3f195a877a9d1123304f90e)) - - - -# [0.7.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.6.2...nx-quarkus-maven-0.7.0) (2023-05-27) - -### Dependency Updates - -* `maven` updated to version `0.2.1` -* `common` updated to version `0.4.0` - -### Bug Fixes - -* **executors:** use pipe output capture ([#233](https://github.com/khalilou88/jnxplus/issues/233)) ([1d295b4](https://github.com/khalilou88/jnxplus/commit/1d295b4548a2b2cbdeb4c7fbb5ceb4fb73a830d8)) -* **generators:** disable unit tests ([a08d0f2](https://github.com/khalilou88/jnxplus/commit/a08d0f2cd396f6f7dddbb41e0bcd532a8a800778)) -* **generators:** remove old syntax ([#232](https://github.com/khalilou88/jnxplus/issues/232)) ([a390029](https://github.com/khalilou88/jnxplus/commit/a39002963b2c66a1295fa42925b76994a24748c3)) - - -### Features - -* **generators:** update maven wrapper to version 3.9.2 ([b5486de](https://github.com/khalilou88/jnxplus/commit/b5486ded2f418a606d2f4ca957cbd97ed4956596)) -* **generators:** update spring boot version to 3.1.0 ([#231](https://github.com/khalilou88/jnxplus/issues/231)) ([b050516](https://github.com/khalilou88/jnxplus/commit/b0505163fde06fbcf355a97a75e675c0c5fe8bc3)) - - - -## [0.6.2](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.6.1...nx-quarkus-maven-0.6.2) (2023-05-26) - -### Dependency Updates - -* `maven` updated to version `0.2.0` -* `common` updated to version `0.3.1` - - -## [0.6.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.6.0...nx-quarkus-maven-0.6.1) (2023-05-21) - - -### Bug Fixes - -* **generators:** don't generate extras lines in templates ([#215](https://github.com/khalilou88/jnxplus/issues/215)) ([2a5da31](https://github.com/khalilou88/jnxplus/commit/2a5da31470aedb7658e9283555c89f1d28782e06)) - - - -# [0.6.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.5.1...nx-quarkus-maven-0.6.0) (2023-05-19) - -### Dependency Updates - -* `maven` updated to version `0.1.8` -* `common` updated to version `0.3.0` - -### Features - -* **nx-quarkus-maven:** migrate to quarkus 3 ([#209](https://github.com/khalilou88/jnxplus/issues/209)) ([b72bc15](https://github.com/khalilou88/jnxplus/commit/b72bc15c7426c33095cf2da14e7178d7b042557c)) - - - -## [0.5.1](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.5.0...nx-quarkus-maven-0.5.1) (2023-05-17) - -### Dependency Updates - -* `maven` updated to version `0.1.7` -* `common` updated to version `0.2.4` - -### Bug Fixes - -* **nx-boot-maven:** refactor maven dep graph ([#206](https://github.com/khalilou88/jnxplus/issues/206)) ([0a704a4](https://github.com/khalilou88/jnxplus/commit/0a704a4acbfa1db93a072b37a8c2db0e3ea275ce)) - - - -# [0.5.0](https://github.com/khalilou88/jnxplus/compare/nx-quarkus-maven-0.4.4...nx-quarkus-maven-0.5.0) (2023-05-13) - -### Dependency Updates - -- `maven` updated to version `0.1.6` -- `common` updated to version `0.2.3` - -### Features - -- **nx-quarkus-maven:** add NX_MAVEN_CLI_OPTS env var for maven args ([0e6fd3b](https://github.com/khalilou88/jnxplus/commit/0e6fd3b10a398db7ebbcfee15134dd137c5c15d2)) -- **nx-quarkus-maven:** add publish executor [ci skip] ([09a2e48](https://github.com/khalilou88/jnxplus/commit/09a2e488d9e5a540111b5bdb27b6ca331ee3bb93)) diff --git a/packages/nx-quarkus-maven/README.md b/packages/nx-quarkus-maven/README.md deleted file mode 100644 index 98d0819ae..000000000 --- a/packages/nx-quarkus-maven/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# Plugin deprecated - -Plugin deprecated, use @jnxplus/nx-maven instead. - -# @jnxplus/nx-quarkus-maven - -[![npm version](https://badge.fury.io/js/@jnxplus%2Fnx-quarkus-maven.svg)](https://badge.fury.io/js/@jnxplus%2Fnx-quarkus-maven) - -This plugin adds Quarkus and Maven multi-module capabilities to Nx workspace. - -## Supported versions - -| @jnxplus/nx-quarkus-maven | Nx | Quarkus | -| ------------------------- | ------ | ----------- | -| 0.x.x | 16.x.x | 3.x.x.Final | - -## Getting Started - -### 0. Prerequisites - -`@jnxplus/nx-quarkus-maven` requires a Java 17 or higher Runtime Environment and the current Long Term Support (LTS) version of node.js. - -### 1. Install the plugin - -In the Nx workspace root folder, run this command to install the plugin : - -```bash -npm install --save-dev @jnxplus/nx-quarkus-maven -``` - -### 2. Add Quarkus and Maven wrapper support - -The following command adds Quarkus and Maven support (Maven wrapper and config files) to the workspace. This only needs to be performed once per workspace. - -```bash -nx generate @jnxplus/nx-quarkus-maven:init -``` - -### 3. Usage - -| Action | Command | -| ------------------------------------ | ------------------------------------------------------------------------ | -| Generate an application | `nx generate @jnxplus/nx-quarkus-maven:application my-app-name` | -| Generate a library | `nx generate @jnxplus/nx-quarkus-maven:library my-lib-name` | -| Generate a parent project | `nx generate @jnxplus/nx-quarkus-maven:parent-project my-parent-project` | -| Build a project | `nx build my-project-name` | -| Build an image | `nx build-image my-app-name` | -| Serve an application | `nx serve my-app-name` | -| Test a project | `nx test my-project-name` | -| Integration Test an application | `nx integration-test my-app-name` | -| Lint a project | `nx lint my-project-name` | -| Format a java project | `nx format --projects my-project-name` | -| Format a kotlin project | `nx ktformat my-project-name` | -| Run a custom task | `nx run-task my-project-name --task="clean install -DskipTests=true"` | -| Publish a project | `nx publish my-project-name` | -| Visualize project's dependency graph | `nx graph` | - -## License - -MIT © 2023-2023 Khalil LAGRIDA diff --git a/packages/nx-quarkus-maven/executors.json b/packages/nx-quarkus-maven/executors.json deleted file mode 100644 index 8e76575f6..000000000 --- a/packages/nx-quarkus-maven/executors.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "executors": { - "run-task": { - "implementation": "@jnxplus/maven/src/executors/run-task/executor", - "schema": "@jnxplus/maven/src/executors/run-task/schema.json", - "description": "run-task executor" - }, - "lint": { - "implementation": "@jnxplus/maven/src/executors/lint/executor", - "schema": "@jnxplus/common/src/executors/lint/schema.json", - "description": "lint executor" - }, - "ktformat": { - "implementation": "@jnxplus/maven/src/executors/ktformat/executor", - "schema": "@jnxplus/common/src/executors/ktformat/schema.json", - "description": "kotlin format executor" - }, - "quarkus-build-image": { - "implementation": "@jnxplus/common/src/executors/build-image/quarkus/executor", - "schema": "@jnxplus/common/src/executors/build-image/quarkus/schema.json", - "description": "quarkus build-image executor" - } - } -} diff --git a/packages/nx-quarkus-maven/generators.json b/packages/nx-quarkus-maven/generators.json deleted file mode 100644 index c100a21fb..000000000 --- a/packages/nx-quarkus-maven/generators.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "name": "nx-quarkus-maven", - "version": "0.0.1", - "generators": { - "init": { - "factory": "./src/generators/init/generator", - "schema": "./src/generators/init/schema.json", - "description": "init generator" - }, - "migrate": { - "factory": "./src/generators/migrate/generator", - "schema": "./src/generators/migrate/schema.json", - "description": "migrate generator" - }, - "application": { - "factory": "./src/generators/application/generator", - "schema": "./src/generators/application/schema.json", - "aliases": ["app"], - "x-type": "application", - "description": "application generator" - }, - "library": { - "factory": "./src/generators/library/generator", - "schema": "./src/generators/library/schema.json", - "aliases": ["lib"], - "x-type": "library", - "description": "library generator" - }, - "parent-project": { - "factory": "./src/generators/parent-project/generator", - "schema": "./src/generators/parent-project/schema.json", - "description": "parent-project generator" - } - } -} diff --git a/packages/nx-quarkus-maven/jest.config.ts b/packages/nx-quarkus-maven/jest.config.ts deleted file mode 100644 index 8e3cc762b..000000000 --- a/packages/nx-quarkus-maven/jest.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-disable */ -export default { - displayName: 'nx-quarkus-maven', - - globals: {}, - testEnvironment: 'node', - transform: { - '^.+\\.[tj]sx?$': [ - 'ts-jest', - { - tsconfig: '/tsconfig.spec.json', - }, - ], - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], - coverageDirectory: '../../coverage/packages/nx-quarkus-maven', - preset: '../../jest.preset.js', -}; diff --git a/packages/nx-quarkus-maven/package.json b/packages/nx-quarkus-maven/package.json deleted file mode 100644 index 1a25402b3..000000000 --- a/packages/nx-quarkus-maven/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@jnxplus/nx-quarkus-maven", - "version": "0.13.2", - "type": "commonjs", - "main": "src/index.js", - "generators": "./generators.json", - "executors": "./executors.json", - "private": false, - "publishConfig": { - "access": "public" - }, - "license": "MIT", - "author": "Khalil LAGRIDA", - "homepage": "https://github.com/khalilou88/jnxplus/blob/main/packages/nx-quarkus-maven/README.md", - "bugs": { - "url": "https://github.com/khalilou88/jnxplus/issues" - }, - "keywords": [ - "nx", - "nx-workspace", - "nx-plugin", - "java", - "quarkus", - "maven", - "maven multi-module project" - ], - "scripts": { - "postinstall": "node src/scripts/install-linters.js" - }, - "dependencies": { - "prettier": "^2.8.7", - "prettier-plugin-java": "^2.1.0", - "@prettier/plugin-xml": "^2.2.0", - "xmldoc": "~1.3.0" - }, - "peerDependencies": { - "@nx/devkit": ">=16.3.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/khalilou88/jnxplus.git", - "directory": "packages/nx-quarkus-maven" - } -} diff --git a/packages/nx-quarkus-maven/project.json b/packages/nx-quarkus-maven/project.json deleted file mode 100644 index cf9d0ffd8..000000000 --- a/packages/nx-quarkus-maven/project.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "name": "nx-quarkus-maven", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "packages/nx-quarkus-maven/src", - "projectType": "library", - "targets": { - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["packages/nx-quarkus-maven/**/*.ts"] - } - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/packages/nx-quarkus-maven"], - "options": { - "jestConfig": "packages/nx-quarkus-maven/jest.config.ts", - "passWithNoTests": true - } - }, - "build": { - "executor": "@nx/js:tsc", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "dist/packages/nx-quarkus-maven", - "main": "packages/nx-quarkus-maven/src/index.ts", - "packageJson": "packages/nx-quarkus-maven/package.json", - "tsConfig": "packages/nx-quarkus-maven/tsconfig.lib.json", - "updateBuildableProjectDepsInPackageJson": true, - "buildableProjectDepsInPackageJsonType": "dependencies", - "assets": [ - "packages/nx-quarkus-maven/*.md", - { - "input": "./packages/nx-quarkus-maven/src", - "glob": "**/!(*.ts)", - "output": "./src" - }, - { - "input": "./packages/nx-quarkus-maven/src", - "glob": "**/*.d.ts", - "output": "./src" - }, - { - "input": "./packages/nx-quarkus-maven", - "glob": "generators.json", - "output": "." - }, - { - "input": "./packages/nx-quarkus-maven", - "glob": "executors.json", - "output": "." - }, - { - "input": "./packages/internal/maven-wrapper/.mvn", - "glob": "wrapper/**", - "output": "./src/generators/init/files/maven/wrapper/__dot__mvn" - }, - { - "input": "./packages/internal/maven-wrapper", - "glob": "mvnw", - "output": "./src/generators/init/files/maven/wrapper" - }, - { - "input": "./packages/internal/maven-wrapper", - "glob": "mvnw.cmd", - "output": "./src/generators/init/files/maven/wrapper" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/shared", - "glob": "**", - "output": "./src/generators/application/files/quarkus" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/maven/java", - "glob": "**", - "output": "./src/generators/application/files/quarkus/java" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/maven", - "glob": "docker/**", - "output": "./src/generators/application/files/quarkus/java/src/main" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/maven/kotlin", - "glob": "**", - "output": "./src/generators/application/files/quarkus/kotlin" - }, - { - "input": "./packages/internal/generators-files/quarkus/application/maven", - "glob": "docker/**", - "output": "./src/generators/application/files/quarkus/kotlin/src/main" - }, - { - "input": "./packages/internal/generators-files/quarkus/library/shared", - "glob": "**", - "output": "./src/generators/library/files/quarkus" - }, - { - "input": "./packages/internal/generators-files/quarkus/library/maven", - "glob": "**", - "output": "./src/generators/library/files/quarkus" - }, - { - "input": "./packages/internal/generators-files", - "glob": "linters/**", - "output": "./src/generators/init/files" - } - ] - } - }, - "version": { - "executor": "@jscutlery/semver:version", - "options": { - "preset": "angular", - "trackDeps": true, - "push": true, - "noVerify": true, - "postTargets": ["nx-quarkus-maven:github", "nx-quarkus-maven:publish"], - "commitMessageFormat": "release: cut release ${version} of ${projectName}" - } - }, - "github": { - "executor": "@jscutlery/semver:github", - "options": { - "tag": "${tag}", - "notes": "${notes}" - } - }, - "publish": { - "executor": "ngx-deploy-npm:deploy", - "options": { - "access": "public" - } - } - }, - "tags": ["maven", "quarkus"], - "implicitDependencies": [ - "internal-generators-files", - "internal-maven-wrapper" - ] -} diff --git a/packages/nx-quarkus-maven/src/dep-graph/lookup-deps.ts b/packages/nx-quarkus-maven/src/dep-graph/lookup-deps.ts deleted file mode 100644 index 4de50ef6a..000000000 --- a/packages/nx-quarkus-maven/src/dep-graph/lookup-deps.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { addProjectsAndDependencies } from '@jnxplus/maven'; -import { - ProjectGraph, - ProjectGraphBuilder, - ProjectGraphProcessorContext, -} from '@nx/devkit'; - -export function processProjectGraph( - graph: ProjectGraph, - context: ProjectGraphProcessorContext -): ProjectGraph { - const builder = new ProjectGraphBuilder(graph); - addProjectsAndDependencies(builder, context, '@jnxplus/nx-quarkus-maven'); - return builder.getUpdatedProjectGraph(); -} diff --git a/packages/nx-quarkus-maven/src/generators/application/generator.ts b/packages/nx-quarkus-maven/src/generators/application/generator.ts deleted file mode 100644 index 3a6f5381c..000000000 --- a/packages/nx-quarkus-maven/src/generators/application/generator.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { applicationGenerator } from '@jnxplus/maven'; -import { Tree } from '@nx/devkit'; -import { NxMavenAppGeneratorSchema } from './schema'; - -export default async function (tree: Tree, options: NxMavenAppGeneratorSchema) { - await applicationGenerator( - __dirname, - '@jnxplus/nx-quarkus-maven', - tree, - options - ); -} diff --git a/packages/nx-quarkus-maven/src/generators/application/schema.d.ts b/packages/nx-quarkus-maven/src/generators/application/schema.d.ts deleted file mode 100644 index 91f9c1d4e..000000000 --- a/packages/nx-quarkus-maven/src/generators/application/schema.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { LanguageType, PackagingType } from '@jnxplus/common'; - -export interface NxMavenAppGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - simplePackageName?: boolean; - language: LanguageType; - groupId: string; - projectVersion: string; - packaging: PackagingType; - configFormat: '.properties' | '.yml'; - parentProject?: string; - aggregatorProject?: string; - minimal?: boolean; - port?: string | number; -} diff --git a/packages/nx-quarkus-maven/src/generators/application/schema.json b/packages/nx-quarkus-maven/src/generators/application/schema.json deleted file mode 100644 index 3063b4e1f..000000000 --- a/packages/nx-quarkus-maven/src/generators/application/schema.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxQuarkusMavenApp", - "title": "Create an application", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the app name", - "type": "boolean", - "default": false - }, - "simplePackageName": { - "description": "Don't include the directory in the package name", - "type": "boolean", - "default": false - }, - "language": { - "description": "Language of the project", - "type": "string", - "default": "java", - "x-prompt": { - "message": "Which language would you like to use?", - "type": "list", - "items": [ - { - "value": "java", - "label": "Java" - }, - { - "value": "kotlin", - "label": "Kotlin" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "org.acme", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "configFormat": { - "description": "Configuration format of the project", - "type": "string", - "default": ".properties", - "x-prompt": { - "message": "Which configuration format would you like to use?", - "type": "list", - "items": [ - { - "value": ".properties", - "label": "Properties" - }, - { - "value": ".yml", - "label": "Yaml" - } - ] - } - }, - "parentProject": { - "type": "string", - "description": "ArtifactId of the parent project or leave it blank for the root project" - }, - "aggregatorProject": { - "type": "string", - "description": "ArtifactId of the aggregator project (that manages a group of submodules) or leave it blank for the root project" - }, - "minimal": { - "description": "Generate an app with a minimal setup", - "type": "boolean", - "default": false - }, - "port": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "default": 8080, - "description": "Port to start the server at. Default is 8080." - } - }, - "required": ["name", "language", "groupId", "projectVersion", "configFormat"] -} diff --git a/packages/nx-quarkus-maven/src/generators/init/files/maven/config/pom.xml__template__ b/packages/nx-quarkus-maven/src/generators/init/files/maven/config/pom.xml__template__ deleted file mode 100644 index b21de75ec..000000000 --- a/packages/nx-quarkus-maven/src/generators/init/files/maven/config/pom.xml__template__ +++ /dev/null @@ -1,33 +0,0 @@ - - - 4.0.0 - <%= groupId %> - <%= parentProjectName %> - <%= parentProjectVersion %> - pom - - - <%= javaVersion %> - <%= kotlinVersion %> - <%= quarkusVersion %> - <%= checkstyleVersion %> - <%= ktlintVersion %> - - - - - - - - - io.quarkus.platform - quarkus-bom - ${quarkus.version} - pom - import - - - - - diff --git a/packages/nx-quarkus-maven/src/generators/init/generator.ts b/packages/nx-quarkus-maven/src/generators/init/generator.ts deleted file mode 100644 index 9d847c19c..000000000 --- a/packages/nx-quarkus-maven/src/generators/init/generator.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { - checkstyleVersion, - ktlintVersion, - kotlinVersion, - quarkusVersion, - updateNxJson, -} from '@jnxplus/common'; -import { - addOrUpdateGitattributes, - addOrUpdatePrettierIgnore, - addOrUpdatePrettierRc, - updateGitIgnore, -} from '@jnxplus/maven'; -import { Tree, formatFiles, generateFiles, offsetFromRoot } from '@nx/devkit'; -import * as path from 'path'; -import { NxQuarkusMavenGeneratorSchema } from './schema'; - -interface NormalizedSchema extends NxQuarkusMavenGeneratorSchema { - dot: string; - kotlinVersion: string; - quarkusVersion: string; - checkstyleVersion: string; - ktlintVersion: string; -} - -function normalizeOptions( - tree: Tree, - options: NxQuarkusMavenGeneratorSchema -): NormalizedSchema { - const dot = '.'; - - return { - ...options, - dot, - kotlinVersion, - quarkusVersion, - checkstyleVersion, - ktlintVersion, - }; -} - -function addFiles(tree: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - offsetFromRoot: offsetFromRoot(tree.root), - template: '', - }; - generateFiles( - tree, - path.join(__dirname, 'files', 'maven', 'wrapper'), - '', - templateOptions - ); - generateFiles( - tree, - path.join(__dirname, 'files', 'maven', 'config'), - '', - templateOptions - ); - generateFiles( - tree, - path.join(__dirname, 'files', 'linters'), - 'tools/linters', - templateOptions - ); -} - -export default async function ( - tree: Tree, - options: NxQuarkusMavenGeneratorSchema -) { - const normalizedOptions = normalizeOptions(tree, options); - addFiles(tree, normalizedOptions); - updateNxJson(tree, '@jnxplus/nx-quarkus-maven'); - updateGitIgnore(tree); - addOrUpdatePrettierRc(tree); - addOrUpdatePrettierIgnore(tree); - addOrUpdateGitattributes(tree); - tree.changePermissions('mvnw', '755'); - tree.changePermissions('mvnw.cmd', '755'); - await formatFiles(tree); -} diff --git a/packages/nx-quarkus-maven/src/generators/init/schema.d.ts b/packages/nx-quarkus-maven/src/generators/init/schema.d.ts deleted file mode 100644 index 0a942e9e0..000000000 --- a/packages/nx-quarkus-maven/src/generators/init/schema.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface NxQuarkusMavenGeneratorSchema { - javaVersion: string | number; - groupId: string; - parentProjectName: string; - parentProjectVersion: string; -} diff --git a/packages/nx-quarkus-maven/src/generators/init/schema.json b/packages/nx-quarkus-maven/src/generators/init/schema.json deleted file mode 100644 index 12532459f..000000000 --- a/packages/nx-quarkus-maven/src/generators/init/schema.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxQuarkusMavenInit", - "title": "Init", - "type": "object", - "properties": { - "javaVersion": { - "description": "Java version", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "default": "17", - "x-prompt": { - "message": "Which version of Java would you like to use?", - "type": "list", - "items": [ - { - "value": "21", - "label": "21" - }, - { - "value": "17", - "label": "17" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "org.acme", - "x-prompt": "What groupId would you like to use?" - }, - "parentProjectName": { - "type": "string", - "default": "quarkus-parent-project", - "x-prompt": "What parentProjectName would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "parentProjectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - } - }, - "required": [ - "javaVersion", - "groupId", - "parentProjectName", - "parentProjectVersion" - ] -} diff --git a/packages/nx-quarkus-maven/src/generators/library/generator.ts b/packages/nx-quarkus-maven/src/generators/library/generator.ts deleted file mode 100644 index 83e8a0043..000000000 --- a/packages/nx-quarkus-maven/src/generators/library/generator.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Tree } from '@nx/devkit'; -import { libraryGenerator } from '@jnxplus/maven'; -import { NxMavenLibGeneratorSchema } from './schema'; - -export default async function (tree: Tree, options: NxMavenLibGeneratorSchema) { - await libraryGenerator(__dirname, '@jnxplus/nx-quarkus-maven', tree, options); -} diff --git a/packages/nx-quarkus-maven/src/generators/library/schema.d.ts b/packages/nx-quarkus-maven/src/generators/library/schema.d.ts deleted file mode 100644 index 50f7f7fb0..000000000 --- a/packages/nx-quarkus-maven/src/generators/library/schema.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { LanguageType } from '@jnxplus/common'; - -export interface NxMavenLibGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - simplePackageName?: boolean; - language: LanguageType; - groupId: string; - projectVersion: string; - parentProject?: string; - aggregatorProject?: string; - projects?: string; - skipStarterCode?: boolean; -} diff --git a/packages/nx-quarkus-maven/src/generators/library/schema.json b/packages/nx-quarkus-maven/src/generators/library/schema.json deleted file mode 100644 index 64b8307e9..000000000 --- a/packages/nx-quarkus-maven/src/generators/library/schema.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxQuarkusMavenLib", - "title": "Create a library", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the lib name", - "type": "boolean", - "default": false - }, - "simplePackageName": { - "description": "Don't include the directory in the package name", - "type": "boolean", - "default": false - }, - "language": { - "description": "Language of the project", - "type": "string", - "default": "java", - "x-prompt": { - "message": "Which language would you like to use?", - "type": "list", - "items": [ - { - "value": "java", - "label": "Java" - }, - { - "value": "kotlin", - "label": "Kotlin" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "org.acme", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "parentProject": { - "type": "string", - "description": "ArtifactId of the parent project or leave it blank for the root project" - }, - "aggregatorProject": { - "type": "string", - "description": "ArtifactId of the aggregator project (that manages a group of submodules) or leave it blank for the root project" - }, - "projects": { - "type": "string", - "description": "Projects where the library should be added (comma delimited)" - }, - "skipStarterCode": { - "description": "Skip starter code", - "type": "boolean", - "default": false - } - }, - "required": ["name", "language", "groupId", "projectVersion"] -} diff --git a/packages/nx-quarkus-maven/src/generators/migrate/generator.ts b/packages/nx-quarkus-maven/src/generators/migrate/generator.ts deleted file mode 100644 index 8357b8bb1..000000000 --- a/packages/nx-quarkus-maven/src/generators/migrate/generator.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { formatFiles, generateFiles, offsetFromRoot, Tree } from '@nx/devkit'; -import * as path from 'path'; -import { NxQuarkusMavenMigrateGeneratorSchema } from './schema'; - -interface NormalizedSchema extends NxQuarkusMavenMigrateGeneratorSchema { - dot: string; -} - -function normalizeOptions( - tree: Tree, - options: NxQuarkusMavenMigrateGeneratorSchema -): NormalizedSchema { - const dot = '.'; - - return { - ...options, - dot, - }; -} - -function addFiles(tree: Tree, options: NormalizedSchema) { - const templateOptions = { - ...options, - offsetFromRoot: offsetFromRoot(tree.root), - template: '', - }; - generateFiles( - tree, - path.join(__dirname, '..', 'init', 'files', 'maven', 'wrapper'), - '', - templateOptions - ); -} - -export default async function ( - tree: Tree, - options: NxQuarkusMavenMigrateGeneratorSchema -) { - const normalizedOptions = normalizeOptions(tree, options); - addFiles(tree, normalizedOptions); - tree.changePermissions('mvnw', '755'); - tree.changePermissions('mvnw.cmd', '755'); - await formatFiles(tree); -} diff --git a/packages/nx-quarkus-maven/src/generators/migrate/schema.d.ts b/packages/nx-quarkus-maven/src/generators/migrate/schema.d.ts deleted file mode 100644 index 6c55e9d90..000000000 --- a/packages/nx-quarkus-maven/src/generators/migrate/schema.d.ts +++ /dev/null @@ -1 +0,0 @@ -export interface NxQuarkusMavenMigrateGeneratorSchema {} // eslint-disable-line diff --git a/packages/nx-quarkus-maven/src/generators/migrate/schema.json b/packages/nx-quarkus-maven/src/generators/migrate/schema.json deleted file mode 100644 index 76debefe9..000000000 --- a/packages/nx-quarkus-maven/src/generators/migrate/schema.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxQuarkusMavenMigrate", - "title": "Migrate", - "type": "object", - "properties": {}, - "required": [] -} diff --git a/packages/nx-quarkus-maven/src/generators/parent-project/files/pom.xml__template__ b/packages/nx-quarkus-maven/src/generators/parent-project/files/pom.xml__template__ deleted file mode 100644 index e00adf070..000000000 --- a/packages/nx-quarkus-maven/src/generators/parent-project/files/pom.xml__template__ +++ /dev/null @@ -1,18 +0,0 @@ - - - 4.0.0 - - <%= parentGroupId %> - <%= parentProjectName %> - <%= parentProjectVersion %> - <%= relativePath %> - - <%= groupId %> - <%= projectName %> - <%= projectVersion %> - pom - <%= projectName %> - This project was generated with nx-quarkus-maven - - \ No newline at end of file diff --git a/packages/nx-quarkus-maven/src/generators/parent-project/generator.ts b/packages/nx-quarkus-maven/src/generators/parent-project/generator.ts deleted file mode 100644 index 90c887da6..000000000 --- a/packages/nx-quarkus-maven/src/generators/parent-project/generator.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { parentProjectGenerator } from '@jnxplus/maven'; -import { Tree } from '@nx/devkit'; -import { NxQuarkusMavenParentProjectGeneratorSchema } from './schema'; - -export default async function ( - tree: Tree, - options: NxQuarkusMavenParentProjectGeneratorSchema -) { - await parentProjectGenerator( - __dirname, - '@jnxplus/nx-quarkus-maven', - tree, - options - ); -} diff --git a/packages/nx-quarkus-maven/src/generators/parent-project/schema.d.ts b/packages/nx-quarkus-maven/src/generators/parent-project/schema.d.ts deleted file mode 100644 index 43382e87a..000000000 --- a/packages/nx-quarkus-maven/src/generators/parent-project/schema.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ProjectType } from '@jnxplus/common'; - -export interface NxQuarkusMavenParentProjectGeneratorSchema { - name: string; - tags?: string; - directory?: string; - simpleName?: boolean; - projectType: ProjectType; - groupId: string; - projectVersion: string; - parentProject?: string; - aggregatorProject?: string; -} diff --git a/packages/nx-quarkus-maven/src/generators/parent-project/schema.json b/packages/nx-quarkus-maven/src/generators/parent-project/schema.json deleted file mode 100644 index 4b909f271..000000000 --- a/packages/nx-quarkus-maven/src/generators/parent-project/schema.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "NxQuarkusMavenParentProject", - "title": "Create a parent project", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "", - "$default": { - "$source": "argv", - "index": 0 - }, - "x-prompt": "What name would you like to use?", - "pattern": "^[a-zA-Z].*$" - }, - "tags": { - "type": "string", - "description": "Add tags to the project (used for linting)", - "alias": "t" - }, - "directory": { - "type": "string", - "description": "A directory where the project is placed", - "alias": "dir" - }, - "simpleName": { - "description": "Don't include the directory in the project name", - "type": "boolean", - "default": false - }, - "projectType": { - "description": "Type of the parent project", - "type": "string", - "default": "application", - "x-prompt": { - "message": "Which projectType would you like to generate?", - "type": "list", - "items": [ - { - "value": "application", - "label": "Application" - }, - { - "value": "library", - "label": "Library" - } - ] - } - }, - "groupId": { - "type": "string", - "default": "com.example", - "x-prompt": "What groupId would you like to use?" - }, - "projectVersion": { - "type": "string", - "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", - "alias": "v", - "x-prompt": "What project version would you like to use?" - }, - "parentProject": { - "type": "string", - "description": "ArtifactId of the parent project or leave it blank for the root project" - }, - "aggregatorProject": { - "type": "string", - "description": "ArtifactId of the aggregator project (that manages a group of submodules) or leave it blank for the root project" - } - }, - "required": ["name", "projectType", "groupId", "projectVersion"] -} diff --git a/packages/nx-quarkus-maven/src/index.ts b/packages/nx-quarkus-maven/src/index.ts deleted file mode 100644 index 507baa840..000000000 --- a/packages/nx-quarkus-maven/src/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -export { processProjectGraph } from './dep-graph/lookup-deps'; - -import initGenerator from './generators/init/generator'; -import parentProjectGenerator from './generators/parent-project/generator'; -import libraryGenerator from './generators/library/generator'; -import applicationGenerator from './generators/application/generator'; -import migrateGenerator from './generators/migrate/generator'; - -export { - initGenerator, - parentProjectGenerator, - libraryGenerator, - applicationGenerator, - migrateGenerator, -}; diff --git a/packages/nx-quarkus-maven/src/scripts/install-linters.ts b/packages/nx-quarkus-maven/src/scripts/install-linters.ts deleted file mode 100644 index 61ee2143f..000000000 --- a/packages/nx-quarkus-maven/src/scripts/install-linters.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { getCheckstylePath, getKtlintPath, isE2eTest } from '@jnxplus/common'; -import { getCheckstyleVersion, getKtlintVersion } from '@jnxplus/maven'; -import { logger, workspaceRoot } from '@nx/devkit'; -import * as path from 'path'; - -(async () => { - if (process.env['NX_VERBOSE_LOGGING'] === 'true') { - logger.debug('Install Linters'); - } - - let workspaceRootToUse = workspaceRoot; - const tmpWorkspaceRoot = path.join( - workspaceRootToUse, - 'tmp', - 'nx-e2e', - 'proj' - ); - - if (isE2eTest(tmpWorkspaceRoot)) { - workspaceRootToUse = tmpWorkspaceRoot; - } - - await getCheckstylePath(getCheckstyleVersion, workspaceRootToUse); - await getKtlintPath(getKtlintVersion, workspaceRootToUse); -})(); diff --git a/packages/nx-quarkus-maven/tsconfig.json b/packages/nx-quarkus-maven/tsconfig.json deleted file mode 100644 index f5b85657a..000000000 --- a/packages/nx-quarkus-maven/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "module": "commonjs", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} diff --git a/packages/nx-quarkus-maven/tsconfig.lib.json b/packages/nx-quarkus-maven/tsconfig.lib.json deleted file mode 100644 index 8c2b823a8..000000000 --- a/packages/nx-quarkus-maven/tsconfig.lib.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "../../dist/out-tsc", - "declaration": true, - "types": ["node"] - }, - "exclude": ["**/*.spec.ts", "jest.config.ts"], - "include": ["**/*.ts"] -} diff --git a/packages/nx-quarkus-maven/tsconfig.spec.json b/packages/nx-quarkus-maven/tsconfig.spec.json deleted file mode 100644 index 46bad9671..000000000 --- a/packages/nx-quarkus-maven/tsconfig.spec.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.spec.js", - "**/*.spec.jsx", - "**/*.d.ts", - "jest.config.ts" - ] -} diff --git a/tsconfig.base.json b/tsconfig.base.json index 835253491..d43db7156 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -19,12 +19,8 @@ "@jnxplus/gradle": ["packages/gradle/src/index.ts"], "@jnxplus/internal/testing": ["packages/internal/testing/src/index.ts"], "@jnxplus/maven": ["packages/maven/src/index.ts"], - "@jnxplus/nx-boot-gradle": ["packages/nx-boot-gradle/src/index.ts"], - "@jnxplus/nx-boot-maven": ["packages/nx-boot-maven/src/index.ts"], "@jnxplus/nx-gradle": ["packages/nx-gradle/src/index.ts"], - "@jnxplus/nx-maven": ["packages/nx-maven/src/index.ts"], - "@jnxplus/nx-quarkus-gradle": ["packages/nx-quarkus-gradle/src/index.ts"], - "@jnxplus/nx-quarkus-maven": ["packages/nx-quarkus-maven/src/index.ts"] + "@jnxplus/nx-maven": ["packages/nx-maven/src/index.ts"] } }, "exclude": ["node_modules", "tmp"]