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!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mccarlIT Business Systems Analyst / Software DeveloperCommented:
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.

That's correct, it needs Maven to compile your app. By the way, Maven is not just for we apps, it helps in building many types of app.

Personally, I think it would be good for you to know more about Maven. It will help for this but also many of your previous questions would see the benefit of a little knowledge and experience with Maven.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
threadyAuthor Commented:
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!
mccarlIT Business Systems Analyst / Software DeveloperCommented:
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! ;)
threadyAuthor Commented:
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...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.