Issue
Maven requires a POM.XML file for installing dependencies, but if we have a NodeJS application, the dependencies are mentioned in the node modules folder, and for normally installing them we do npm install
. So if we are using Jenkins and created a freestyle project for automating the installation of dependencies, will this freestyle project use Maven for building and installing the dependencies?
If yes, then what happens in the background? Any POM.XML file is created for the dependencies mentioned in node modules?
Solution
A freestyle project is, as name suggests, a free style. You have to configure everything from SCM, Build Environment, Build triggers, Execution and Post job execution if any.
This means, the job is independent of the language/build tool you have for your source code.
If you have node and using npm, configure Build execution as npm install
.
If you have java and using ant, use ant -f build.xml
.
If you have java and using maven, use mvn clean install
.
and so on...
Whatever you configure as a build execution, that task will be executed in background and accordingly, required package(s) will be generated.
Answered By - saurabh14292
Answer Checked By - Cary Denson (JavaFixing Admin)