diff --git a/packages/nx-micronaut-maven/src/generators/application/files/java/pom.xml__template__ b/packages/nx-micronaut-maven/src/generators/application/files/java/pom.xml__template__ index 056fae1b1..cd9a085b5 100644 --- a/packages/nx-micronaut-maven/src/generators/application/files/java/pom.xml__template__ +++ b/packages/nx-micronaut-maven/src/generators/application/files/java/pom.xml__template__ @@ -45,6 +45,13 @@ logback-classic runtime +<% if(configFormat === '.yml') { -%> + + org.yaml + snakeyaml + runtime + +<% } -%> io.micronaut micronaut-http-client diff --git a/packages/nx-micronaut-maven/src/generators/application/files/kotlin/pom.xml__template__ b/packages/nx-micronaut-maven/src/generators/application/files/kotlin/pom.xml__template__ index e315a57df..457706e71 100644 --- a/packages/nx-micronaut-maven/src/generators/application/files/kotlin/pom.xml__template__ +++ b/packages/nx-micronaut-maven/src/generators/application/files/kotlin/pom.xml__template__ @@ -62,6 +62,13 @@ logback-classic runtime + <% if(configFormat === '.yml') { -%> + + org.yaml + snakeyaml + runtime + + <% } -%> com.fasterxml.jackson.module jackson-module-kotlin diff --git a/testing-projects/e2e/nx-micronaut-maven-e2e/tests/nx-micronaut-maven.spec.ts b/testing-projects/e2e/nx-micronaut-maven-e2e/tests/nx-micronaut-maven.spec.ts index 535c23447..d4fc055f4 100644 --- a/testing-projects/e2e/nx-micronaut-maven-e2e/tests/nx-micronaut-maven.spec.ts +++ b/testing-projects/e2e/nx-micronaut-maven-e2e/tests/nx-micronaut-maven.spec.ts @@ -253,9 +253,7 @@ describe('nx-micronaut-maven e2e', () => { const randomName = uniq('micronaut-maven-app-'); const appDir = 'deep/subdir'; const appName = `${normalizeName(appDir)}-${randomName}`; - //TODO const port = 8181; - const port2 = 8080; await runNxCommandAsync( `generate @jnxplus/nx-micronaut-maven:application ${randomName} --tags e2etag,e2ePackage --directory ${appDir} --groupId com.jnxplus --projectVersion 1.2.3 --packaging war --configFormat .yml --port ${port}` @@ -321,10 +319,10 @@ describe('nx-micronaut-maven e2e', () => { const process = await runNxCommandUntil( `serve ${appName} --args=""`, - (output) => output.includes(`Server Running: http://localhost:${port2}`) + (output) => output.includes(`Server Running: http://localhost:${port}`) ); - const dataResult = await getData(port2, '/hello'); + const dataResult = await getData(port, '/hello'); expect(dataResult.status).toEqual(200); expect(dataResult.message).toMatch('Hello World'); @@ -440,9 +438,6 @@ describe('nx-micronaut-maven e2e', () => { const appName = `${appDir}-${randomName}`; const port = 8383; - //TODO - const port2 = 8080; - await runNxCommandAsync( `g @jnxplus/nx-micronaut-maven:app ${randomName} --t e2etag,e2ePackage --dir ${appDir} --groupId com.jnxplus --v 1.2.3 --packaging war --configFormat .yml --port ${port}` ); @@ -505,10 +500,10 @@ describe('nx-micronaut-maven e2e', () => { const process = await runNxCommandUntil( `serve ${appName} --args=""`, - (output) => output.includes(`Server Running: http://localhost:${port2}`) + (output) => output.includes(`Server Running: http://localhost:${port}`) ); - const dataResult = await getData(port2, '/hello'); + const dataResult = await getData(port, '/hello'); expect(dataResult.status).toEqual(200); expect(dataResult.message).toMatch('Hello World'); @@ -526,9 +521,7 @@ describe('nx-micronaut-maven e2e', () => { const appDir = 'subdir'; const appName = `${appDir}-${randomName}`; - //TODO const port = 8484; - const port2 = 8080; await runNxCommandAsync( `g @jnxplus/nx-micronaut-maven:app ${randomName} --t e2etag,e2ePackage --dir ${appDir} --groupId com.jnxplus --simplePackageName --v 1.2.3 --packaging war --configFormat .yml --port ${port}` @@ -592,10 +585,10 @@ describe('nx-micronaut-maven e2e', () => { const process = await runNxCommandUntil( `serve ${appName} --args=""`, - (output) => output.includes(`Server Running: http://localhost:${port2}`) + (output) => output.includes(`Server Running: http://localhost:${port}`) ); - const dataResult = await getData(port2, '/hello'); + const dataResult = await getData(port, '/hello'); expect(dataResult.status).toEqual(200); expect(dataResult.message).toMatch('Hello World'); @@ -1505,9 +1498,6 @@ describe('nx-micronaut-maven e2e', () => { const appDir = 'deep/subdir'; const port = 8686; - //TODO - const port2 = 8080; - await runNxCommandAsync( `generate @jnxplus/nx-micronaut-maven:application ${appName} --simpleName --tags e2etag,e2ePackage --directory ${appDir} --groupId com.jnxplus --projectVersion 1.2.3 --packaging war --configFormat .yml --port ${port}` ); @@ -1572,10 +1562,10 @@ describe('nx-micronaut-maven e2e', () => { const process = await runNxCommandUntil( `serve ${appName} --args=""`, - (output) => output.includes(`Server Running: http://localhost:${port2}`) + (output) => output.includes(`Server Running: http://localhost:${port}`) ); - const dataResult = await getData(port2, '/hello'); + const dataResult = await getData(port, '/hello'); expect(dataResult.status).toEqual(200); expect(dataResult.message).toMatch('Hello World');