reactiverse / vertx-maven-plugin

A Maven plugin for pimping the build of your Vert.x applications
https://reactiverse.io/vertx-maven-plugin/
Apache License 2.0
74 stars 15 forks source link

The plugin must ensure that the directory used as `projectBuildDir` is created #152

Closed cvgaviao closed 4 years ago

cvgaviao commented 5 years ago

I tried now to configure the plugin in order to generate the uber-jar into another directory other than ${project.build.directory}

I used this config: <projectBuildDir>${project.build.directory}/context</projectBuildDir>

But I got a error: [ERROR] Failed to execute goal io.reactiverse:vertx-maven-plugin:1.0.20:package (vmp) on project vertx-server-on-graalvm: Unable to build the fat jar: Unable to build the package: File could not be created:

The problem can be fixed adding a call to new File(projectBuildDir).mkdirs() on PackageMojo.java

cescoffier commented 5 years ago

Fancy a PR?

On 4 Sep 2019, at 20:26, Cristiano Gavião notifications@github.com wrote:

I tried now to configure the plugin in order to generate the uber-jar into another directory other than ${project.build.directory}

I used this config:

${project.build.directory}/context

But I got a error: [ERROR] Failed to execute goal io.reactiverse:vertx-maven-plugin:1.0.20:package (vmp) on project vertx-server-on-graalvm: Unable to build the fat jar: Unable to build the package: File could not be created:

The problem can be fixed adding a call to new File(projectBuildDir).mkdirs() on PackageMojo.java

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

cvgaviao commented 5 years ago

Fancy a PR? On 4 Sep 2019, at 20:26, Cristiano Gavião @.***> wrote: I tried now to configure the plugin in order to generate the uber-jar into another directory other than ${project.build.directory} I used this config: ${project.build.directory}/context But I got a error: [ERROR] Failed to execute goal io.reactiverse:vertx-maven-plugin:1.0.20:package (vmp) on project vertx-server-on-graalvm: Unable to build the fat jar: Unable to build the package: File could not be created: The problem can be fixed adding a call to new File(projectBuildDir).mkdirs() on PackageMojo.java — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Fancy a PR?

Yep, I will. But seems there are a build error on master branch...

cescoffier commented 5 years ago

Was a CI issue, it is passing now.

cvgaviao commented 5 years ago

Was a CI issue, it is passing now.

Hey @cescoffier, I did the change and created a test for it. But I'm getting 19 failures in my machine (ubuntu with oracle jdk11).

Is the CI env using linux with jdk8 ?

[INFO]   Passed: 18, Failed: 19, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] *  package-archive-all-it/pom.xml
[ERROR] *  package-archive-manifest-it/pom.xml
[ERROR] *  package-archive-no-jar-it/pom.xml
[ERROR] *  package-archive-include-classes-it/pom.xml
[ERROR] *  package-archive-fileset-it/pom.xml
[ERROR] *  signed-jar-it/pom.xml
[ERROR] *  package-no-jar-it/pom.xml
[ERROR] *  package-spi-it/pom.xml
[ERROR] *  webjar-it/pom.xml
[ERROR] *  package-archive-combination-it/pom.xml
[ERROR] *  package-it/pom.xml
[ERROR] *  package-archive-it/pom.xml
[ERROR] *  package-with-classifier-it/pom.xml
[ERROR] *  package-withfinal-name-it/pom.xml
[ERROR] *  package-archive-file-inclusion-it/pom.xml
[ERROR] *  package-archive-dependencies-it/pom.xml
[ERROR] *  package-spi-order-combination-it/pom.xml
[ERROR] *  package-nofinal-name-it/pom.xml
[ERROR] *  webjar-no-strip-it/pom.xml
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10:58 min
[INFO] Finished at: 2019-09-05T10:00:47-03:00
cescoffier commented 5 years ago

Can you make sure that the port 8080 is available? That may explain this. The CI is using JDK 8. I should update.

cvgaviao commented 5 years ago

Well, yes. I'm sure that port 8080 is available:

sudo netstat -tulpn | grep LISTEN
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      4110/cupsd          
tcp        0      0 127.0.0.1:30800         0.0.0.0:*               LISTEN      2337/core           
tcp        0      0 127.0.0.1:30900         0.0.0.0:*               LISTEN      2337/core           
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      19321/systemd-resol 
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      2856/dnsmasq        
tcp6       0      0 ::1:631                 :::*                    LISTEN      4110/cupsd

I'm going to run with -X argument and try to get more info about the errors

cvgaviao commented 5 years ago

I found where the problem is...
I needed to modify the main POM. I will provide another PR with a fix for it.

tsegismont commented 4 years ago

Fixed in 4ece2d3