adamkewley / jobson

A platform for transforming command-line applications into a job service.
Apache License 2.0
256 stars 20 forks source link

npm should be listed as dependency #100

Closed frafra closed 2 years ago

frafra commented 2 years ago

The documentation says that is enough to have maven and openjdk to build the software (without the documentation), but npm is needed too.

apt install maven openjdk-8-jdk
mvn package
#9 73.24 [INFO] ------------------------------------------------------------------------
#9 73.24 [INFO] Reactor Summary for jobson project 1.0.13:
#9 73.24 [INFO] 
#9 73.24 [INFO] jobson project ..................................... SUCCESS [  0.002 s]
#9 73.24 [INFO] jobson ............................................. SUCCESS [01:06 min]
#9 73.24 [INFO] jobson-swagger ..................................... SUCCESS [  5.185 s]
#9 73.24 [INFO] jobson-ui .......................................... FAILURE [  0.041 s]
#9 73.24 [INFO] jobson-swagger-ui .................................. SKIPPED
#9 73.24 [INFO] jobson-docs ........................................ SKIPPED
#9 73.24 [INFO] jobson-nix ......................................... SKIPPED
#9 73.24 [INFO] jobson-deb ......................................... SKIPPED
#9 73.24 [INFO] jobson-docker ...................................... SKIPPED
#9 73.24 [INFO] ------------------------------------------------------------------------
#9 73.24 [INFO] BUILD FAILURE
#9 73.24 [INFO] ------------------------------------------------------------------------
#9 73.24 [INFO] Total time:  01:12 min
#9 73.24 [INFO] Finished at: 2022-06-08T14:50:25Z
#9 73.24 [INFO] ------------------------------------------------------------------------
#9 73.25 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.0.0:run (install-node-deps) on project jobson-ui: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "npm" (in directory "/usr/src/jobson/jobson-ui"): error=2, No such file or directory
#9 73.25 [ERROR] around Ant part ...<exec failonerror="true" executable="npm">... @ 4:47 in /usr/src/jobson/jobson-ui/target/antrun/build-main.xml

It would be nice to be able to build the various components individually (maybe there is already, but I am failing to see it).

adamkewley commented 2 years ago

Hi @frafra ,

You're right :) - NPM is now required in order to run the top-level build

I think the guide is two separate guides, jobson and jobson-ui, effectively glued together (they used to be separate projects). Later versions then put everything into one super-repo (which, confusingly, is called jobson, because it didn't make sense to break it into something like jobson-all).

If I ever get any time for jobson, I'll try to address this ticket (it's a basic doc edit).

To address your concern of building various components individually, I believe that's already available via the mvn --projects feature (google: "how to build a specific maven submodule"). In this case, it's probably something like mvn package --projects jobson. I'll have to double-check (I now mostly only develop C++ and don't have the toolchain at-hand).

adamkewley commented 2 years ago

The updated documentation now lumps everything together, with an itemized list. The content is:


Depending on what you want to build, you’ll need (on Ubuntu):

Overall, installing all dependencies on a fresh machine looks something like:

apt install build-essential maven openjdk-8-jdk ruby ruby-bundler nodejs npm python3 python3-pip
gem install fpm  # used to make .deb packages
pip3 install -r jobson-docs/requirements.txt

# build jobson
mvn package -P release

It'll end up in the next (probably, small) maintenance release