我有一个Maven企业应用程序(ejb + war) ,我正在使用glassfish 3.1.2.2
,我一直在寻找一种在heroku上部署它的方法,无论如何,有没有这样做或任何可以帮助您的文档?
Heroku always has a nice documentation :
Add a pom.xml file to your project
<project>
...
<build>
...
<plugins>
<plugin>
<groupId>com.heroku.sdk</groupId>
<artifactId>heroku-maven-plugin</artifactId>
<version>2.0.3</version>
</plugin>
</plugins>
</build>
</project>
Create a new heroku app:
heroku create
A process type is a command used to start your application. You can configure these with a Procfile as describe in the Process Types and the Procfile article. Or you can configure them directly in your pom.xml like this:
<configuration>
...
<processTypes>
<web>java $JAVA_OPTS -cp target/classes:target/dependency/* Main</web>
</processTypes>
</configuration>
If your app is packaged as a WAR, then you can create the slug and deploy it to Heroku with the following command:
$ mvn clean heroku:deploy-war
If your application is standalone (and thus required a process type), you can deploy with this command:
$ mvn clean heroku:deploy
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.