Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@jnxplus/nx-maven

khalilou8819.2kMIT1.16.1TypeScript support: included

npm version

nx, nx-workspace, nx-plugin, java, spring, spring-boot, quarkus, micronaut, maven, maven multi-module project

readme

@jnxplus/nx-maven

npm version

This plugin adds Maven multi-module capabilities to Nx workspace.

Supported versions

@jnxplus/nx-maven Nx Spring Boot Quarkus Micronaut
1.x.x >= 19 3.x.x 3.x.x 4.x.x
0.x.x >= 17 & <= 18 3.x.x 3.x.x 4.x.x

Getting Started

0. Prerequisites

@jnxplus/nx-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 :

npm install --save-dev @jnxplus/nx-maven

2. Init workspace with Maven support

The following command adds Maven support (Maven wrapper and config files) to the workspace. This only needs to be performed once per workspace.

nx generate @jnxplus/nx-maven:init

3. Usage

Action Command
Generate a parent project nx generate @jnxplus/nx-maven:parent-project my-parent-project
Generate an application nx generate @jnxplus/nx-maven:application my-app
Generate a library nx generate @jnxplus/nx-maven:library my-lib
Build a project nx build my-project
Serve an application nx serve my-app
Test a project nx test my-project
Format a java project nx format --projects my-project
Visualize project's dependency graph nx graph

License

MIT © 2021-2024 Khalil LAGRIDA

changelog

1.16.1 (2024-12-10)

🩹 Fixes

  • change error to warning (#1445)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.16.0 (2024-12-05)

🚀 Features

  • add spring.application.name to app generator (#1381)
  • skip spring-boot, quarkus and micronaut deps (#1412)
  • don't set outputDirLocalRepo if present in target.options (#1439)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.15.0 (2024-10-21)

🚀 Features

  • split root project to aggregator project and parent project (#1357)
  • add buildTargetName option to init generator (16949919)
  • build the project before testing it (#1361)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88
  • khalilou88 @khalilou88

1.14.1 (2024-10-16)

🩹 Fixes

  • add dependencies section to package.json (d450e6e3)

❤️ Thank You

  • khalilou88 @khalilou88

1.14.0 (2024-10-15)

🚀 Features

  • set nx 19 as the minimum version required (#1348)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.13.0 (2024-10-15)

🚀 Features

  • make prettier optional (#1340)
  • add plugin dependencies to nx-maven graph (#1343)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.12.2 (2024-10-11)

This was a version bump only, there were no code changes.

1.12.1 (2024-10-10)

🩹 Fixes

  • use installPackagesTask again during init (1c73c61a)

❤️ Thank You

  • khalilou88 @khalilou88

1.12.0 (2024-10-10)

🚀 Features

  • remove prompt for localRepoRelativePath option (#1328)
  • add skipFormat option (#1333)
  • install prettier and its plugins before formating files (#1336)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.11.2 (2024-10-08)

🩹 Fixes

  • add cacheDirectory to clearCacheById function (247a9408)

❤️ Thank You

  • khalilou88 @khalilou88

1.11.1 (2024-10-08)

🩹 Fixes

  • use correct function from flat-cache library (#1327)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.11.0 (2024-10-05)

🚀 Features

  • update gradle wrapper to version 8.10.2 (#1310)
  • add mvnw to possible values for NX_MAVEN_CLI env var (#1320)
  • throw an error if options.outputDirLocalRepo is used in inputs (#1322)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.10.0 (2024-09-23)

🚀 Features

  • use filesToProcess to construct the graph (#1297)
  • use filesToProcess to construct the nx-gradle graph (#1305)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.9.0 (2024-08-30)

🚀 Features

  • update maven wrapper to version 3.9.9 (#1264)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.8.0 (2024-08-21)

🚀 Features

  • add createNodesV2 (#1243)
  • add '!{projectRoot}/src/test/*/' to namedInputs during init (#1244)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.7.4 (2024-08-12)

This was a version bump only, there were no code changes.

1.7.4-0 (2024-08-03)

🩹 Fixes

  • update prettier version to 3 with init generator (#1216)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.7.3 (2024-07-31)

This was a version bump only, there were no code changes.

1.7.2 (2024-07-31)

This was a version bump only, there were no code changes.

1.7.1 (2024-07-31)

This was a version bump only, there were no code changes.

1.7.0 (2024-07-31)

🚀 Features

  • add skipProjectWithoutProjectJson and skipAggregatorProjectLinking (#1205)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.6.0 (2024-07-12)

This was a version bump only, there were no code changes.

1.6.0-1 (2024-07-12)

🩹 Fixes

❤️ Thank You

  • khalilou88 @khalilou88

1.6.0-0 (2024-07-11)

🚀 Features

  • don't add empty gradleRootDirectory to plugin options (#1159)
  • add profile dependencies to the graph (#1162)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.5.0 (2024-06-26)

🚀 Features

  • add deprecation warning for NX_SKIP_MAVEN_WRAPPER (e29c00ab)

❤️ Thank You

  • khalilou88 @khalilou88

1.4.0 (2024-06-24)

🚀 Features

  • add NX_MAVEN_CLI env variable (#1127)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.3.0 (2024-06-09)

🚀 Features

  • use workspaceDataDirectory (#1093)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.2.2 (2024-06-06)

🩹 Fixes

❤️ Thank You

  • khalilou88 @khalilou88

1.2.1 (2024-06-06)

🩹 Fixes

  • use cache folder instead of workspace-data for nx-gradle (734eda24)

❤️ Thank You

  • khalilou88 @khalilou88

1.2.0 (2024-06-06)

🚀 Features

  • possibility to override nx-gradle target names (#1084)
  • move graph files to .nx/workspace-data directory (#1090)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

1.1.0 (2024-06-02)

This was a version bump only, there were no code changes.

1.0.1-0 (2024-05-31)

🚀 Features

  • possibility to rename target names (#1056)
  • update flat-cache version to v5 (c42272a0)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88
  • khalilou88 @khalilou88

1.0.0 (2024-05-16)

This was a version bump only, there were no code changes.

0.45.1-0 (2024-05-16)

🚀 Features

  • possibility to override build target name (#1013)

🩹 Fixes

  • fix package repository info (250956d8)
  • fix package homepage for xml lib (ce38fd35)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88
  • khalilou88 @khalilou88

0.45.0 (2024-04-16)

🚀 Features

❤️ Thank You

  • khalilou88 @khalilou88

0.44.0 (2024-04-16)

🚀 Features

  • export nx-gradle run-task executor (b71c8947)
  • add skipExecutor option (#996)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88
  • khalilou88 @khalilou88

0.43.0 (2024-04-09)

🚀 Features

  • update prettier versions (#963)
  • export nx-maven run-task executor (12c5c7f4)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88
  • khalilou88 @khalilou88

0.42.1 (2024-03-26)

This was a version bump only, there were no code changes.

0.42.1-0 (2024-03-26)

🩹 Fixes

  • create projectDependencyTask outputDirectory if it doesn't exist (#956)

❤️ Thank You

  • Khalil LAGRIDA @khalilou88

0.42.0 (2024-03-24)

This was a version bump only, there were no code changes.

0.41.1-0 (2024-03-23)

🚀 Features

  • add exports to package.json (#950)

❤️ Thank You

  • khalilou88 @khalilou88

0.41.0 (2024-03-15)

This was a version bump only, there were no code changes.

0.40.1-2 (2024-03-13)

🚀 Features

  • use mvn help:evaluate to calculate complex versions (#934)

❤️ Thank You

  • khalilou88 @khalilou88

0.40.1-1 (2024-03-12)

This was a version bump only, there were no code changes.

0.40.1-0 (2024-03-10)

🚀 Features

  • check existence of prettierrc config file (#874)
  • log warning instead of throwing an error (d1ebc06b)
  • check if project is an aggregator (#884)
  • check if isRootProject (#886)
  • remove keepItRunning option (#911)
  • remove skipProject default value (#916)

❤️ Thank You

  • khalilou88 @khalilou88

0.40.0 (2024-02-12)

This was a version bump only, there were no code changes.

0.40.0-9 (2024-02-12)

🚀 Features

  • logging plugin version (#870)

❤️ Thank You

  • khalilou88 @khalilou88

0.40.0-8 (2024-02-10)

This was a version bump only, there were no code changes.

0.40.0-7 (2024-02-10)

This was a version bump only, there were no code changes.

0.40.0-6 (2024-02-10)

This was a version bump only, there were no code changes.

0.40.0-5 (2024-02-10)

This was a version bump only, there were no code changes.