I have a problem with heroku. I defined my Procfile and my pom.xml file as it was said in guide. But when I'm trying to launch my app after deploy on heroku or localy (command: sh target/bin/OPCBot). I recieve an error How can I fix this?
This is my Procfile content:
worker: sh target/bin/OPCBot
And here is my code from pom.xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<assembleDirectory>target</assembleDirectory>
<programs>
<program>
<mainClass>com.eiei.odessaportcheck.OdessaPortCheckApplication</mainClass>
<name>OPCBot</name>
</program>
</programs>
</configuration>
<executions>
<execution>
<phase>package</phase><goals><goal>assemble</goal></goals>
</execution>
</executions>
</plugin>
PS I thik that problem lies in .bat file generated by appassembler-maven-plugin for heroku. When I try to launch it separately it says it can't find my main class. I aslo tried:
<program>
<mainClass>OdessaPortCheckApplication</mainClass>
<name>OPCBot</name>
</program>
The problem was that I messed up with a heroku tutorial. I should have used a tutorial for spring application instead of the regular one. After I have launched a project without spring, all was ok.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.