I have a node application that executes a jar file as follows:
command(params, cb) {
var cmd = '/usr/bin/java -jar JavaAPI.jar ' + this.node_id + " " + this.node_address;
for (var i = 0; i < params.length; i++) {
cmd += " " + params[i];
}
child = exec(cmd, cb);
}
Its working perfectly in local machine. Now I want to deploy it in git, I tried with pom.xml and java plugin as suggested in doc : java plugin and with build packs But none of these works. With build packs and pom.xml the following error occurs:
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage (repackage) on project redditbot-mps: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage failed: Unable to find main class
This may be because i don't have java files. And with plugin no response. What is the best way to deploy to heroku in my case ? I just need to run a node project which depends on a .jar file for some results. Thanks.