Avatar of thready
thready

asked on 

Heroku & Maven & Java dynamic web project

Hi Experts,

I created a new java dynamic web project and got it going.  Now I'm trying to deploy to Heroku.

It's saying "Push rejected, failed to detect set buildpack heroku/java" when I "git push heroku master".

I assume it's because I don't have a pom.xml file and I'm not using Maven.  All I know about Mavan is it's something that helps build webapps.

I think these are my options to get this working:
- deploy Heroku's sample application and pull stuff out of my app and insert it into the sample app (that I'm able to deploy)
- fix my webapp to work with Heroku.

What's my best option - or if you can give further pointers, I'd very much appreciate!

Thanks!
Mike
JavaCloud ServicesWeb Applications

Avatar of undefined
Last Comment
thready
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of thready
thready

ASKER

Thanks Mccarl, I'll read what I can.  I'm in a rush to get something out the door for tomorrow morning, so if there's any quick hints I'd sincerely appreciate it!
Avatar of mccarl
mccarl
Flag of Australia image

if there's any quick hints I'd sincerely appreciate it!

Firstly, I'd probably suggest NOT to "read what you can" but to DO something instead. Start a basic standalone Maven project (most IDE's should have an option for this) and get an idea of the directory structure and the basic parts of the pom.xml file. Then add ONE dependency, something simple such as apache commons io or something and write the simplest Java standalone app that uses the library. Get a feel for what it does and how it makes it different to what you would normally do if you were to use this library (eg. locate on the web, download, unzip, put it somewhere, add it to your build path, etc).

Now, even for your webapp, you shouldn't need to delve into too much of the secrets of Maven. Use it to define the dependencies of your webapp, and have it build your "war" file. Once you have it working locally, deploying to Heroku should then be not too much of a drama. Yes, Maven can do a LOT of things for you, but in this case you should only NEED the basics.

And obviously, if you get stuck on anything, you can post here! ;)
Avatar of thready
thready

ASKER

If I didn't have to do 10000 other things tonight I'd definitely take that great advice!  Trust me, it's exactly what I would have done....

Now I'm just trying to get my hands on a server.xml file for tomcat to run in http only....

I will hit Maven hard in about a week...
Java
Java

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

102K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo