Pi4J / pi4j-v1

DEPRECATED Java I/O library for Raspberry Pi (GPIO, I2C, SPI, UART)
http://www.pi4j.com
Apache License 2.0
1.31k stars 447 forks source link

Remove Maven warnings in branch 1.4 #499

Closed GeVanCo closed 4 years ago

GeVanCo commented 4 years ago

There's quite a few Maven warnings when building the develop/1.4 branch. This commit will remove all warnings, except one: Unable to derive module descriptor for .....\pi4j\pi4j-example\target\pi4j-example-1.4-SNAPSHOT.jar. Although the descriptor is in the corresponding pom file, it's not in the MANIFEST.MF file for that jar.

GeVanCo commented 4 years ago

Something went wrong here: I don't want to merge 47 commits, only my commit...

FDelporte commented 4 years ago

Thanks for your contribution Geert. Which branch did you start from? I just did an update in the develop/1.4 README to describe how to build with a Docker on (Linux) PC. Can you tell me which Maven command you used and gave the warnings?

See https://github.com/Pi4J/pi4j/tree/develop/1.4

docker pull pi4j/pi4j-builder:1.4
docker run --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:1.4
FDelporte commented 4 years ago

FYI @GeVanCo, I'm closing this pull request as it indeed wants to merge 47 commits. Thanks for the changes and I "cherry-picked" all your changes in PR https://github.com/Pi4J/pi4j/pull/500, except the changes in pom from "tasks" to "target" as I'm not 100% sure if that's OK for the full build process. Maybe @savageautomate can check this and take it in a separate commit.

GeVanCo commented 4 years ago

Thanks for your contribution Geert. Which branch did you start from? I just did an update in the develop/1.4 README to describe how to build with a Docker on (Linux) PC. Can you tell me which Maven command you used and gave the warnings?

See https://github.com/Pi4J/pi4j/tree/develop/1.4

docker pull pi4j/pi4j-builder:1.4
docker run --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:1.4

Hi Frank,

We're almost neighbours... :-)

Regarding your questions:

  1. I started from the branch develop/1.4
  2. I'm using both the command line as well as NetBeans 12 to compile my RPi stuff (both on Windows 10), depending if I want to debug or just compile. On the command line, I used mvn clean install -DskipTests. For NetBeans I used the "Clean and Build" menu button which is also executing the clean and build Maven targets, but extended it also with the -DskipTests option to avoid compiling the tests (which are failing in my case, I raised a topic in the Google groups for that one). So, in the end both ways are executing the same the commands.

Regarding the tasks vs. target: I just followed the suggestions of the Maven compiler not to use a deprecated target anymore. However, I don't have (enough) insight in the whole build process, so it's indeed maybe better to wait for Robert to see if that change can be introduced too. Until then, people will see the following warning:

Parameter tasks is deprecated, use target instead

but of course no harm will be done towards the final build result. However, sooner or later they might remove tasks in favour of target.

Hope this answers your questions.

Best rgds, --Geert

FDelporte commented 4 years ago

@GeVanCo thanks clear! Ok have the same results and merged your non-tasks changes in pull request #500