The first thing to do when you want to be happy with Heroku on GitHub with Eclipse in Java

Conclusion three lines

From the conclusion, I was able to follow the procedure here. English. (https://devcenter.heroku.com/articles/deploying-java-applications-to-heroku-from-eclipse-or-intellij-idea)

History

Since it is a GW, I have both a hobby and study I decided to make some simple web service.

The languages and IDEs are Java and Eclipse, which I'm used to at work.

I have little knowledge of architecture and infrastructure Let's leave it to Heroku, who is rumored to be cool. Heroku would be better to use GitHub,

I decided easily up to that point.

But,

I've stumbled quite a bit, so I'll take notes, procedures, and notes for myself.

Stumble point

I don't know Git and I don't know anything!

After pulling the remote locally and fixing it Add to stage, commit and then push I could only see it in Roux. It's completely different from the version control I use at work.

I just remembered "I" to do my best. Branches and merges will be learned slowly later. .. ..

Knowledge of maven is also required at a minimum.

First of all, what is maven? It was from that place ... Site that explains the basics of maven: (http://www.techscore.com/tech/Java/ApacheJakarta/Maven/index/)

The order is important

At first I tried to communicate in the order I knew This was a big mistake.

First, make a Hello World with Eclipse I tried to register it in the repository I made on GitHub.

I got an error immediately. To understand why I'm angry because I have no knowledge of Git It took a while, but apparently

History is different

It seems.

Create a new repository on GitHub → Clone locally → Add Hello Work locally in Eclipse → Commit from there ・ Push to remote

Or the procedure

Create a new local repository locally → Add in Eclipse → Create a new repository locally on GitHub

If it is not such a procedure, the history will not be consistent. (Uh, it's complicated in Japanese ...)

Now that we've successfully linked GitHub, This time on Heroku,

No default language could be detected for this app. 

I was angry like this.

Heroku has all the files you need on Heroku, You can't push unless it's a repository that contains them.

Finally

So, start over from the beginning. In the end, I was able to follow the procedure here. (https://devcenter.heroku.com/articles/deploying-java-applications-to-heroku-from-eclipse-or-intellij-idea)

As a premise

Has already been introduced.

--First, clone the repository for Java and Eclipse locally from Heroku. --heroku create --Import into Eclipse --Maven build (if it fails, add appName to pom.xml) --Create a new repository on GitHub and do git push -u origin master. --Finally, enable GitHub integration and Auto Deploy on Heroku side

・ ・ ・

It took 3 days just to prepare the development environment ... orz

Recommended Posts

The first thing to do when you want to be happy with Heroku on GitHub with Eclipse in Java
Use JLine when you want to handle keystrokes on the console character by character in Java
When you want to dynamically replace Annotation in Java8
What to do if you get a NoClassDefFoundError when trying to run eclipse on Java9
Code to use when you want to process Json with only standard library in Java
Code used when you want to process Json with only the standard library in Java (improved version) gson unnecessary
When you want to implement Java library testing in Spock with multi-module in Gradle in Android Studio 3
When you want to reflect the Master Branch information in the Current Branch you are currently working on
In Java 10, when you do gradle eclipse and JavaSE-1.10 comes out, ...
If you want to change the Java development environment from Eclipse
The first thing to do before you can use Rails6 Ajax
[Java] I want to perform distinct with the key in the object
What to do when you want to know the source position where the method is defined in binding.pry
What to do when CentOS cannot be started with VirtualBox on Catalina
Summary of means when you want to communicate with HTTP on Android
I want to get the IP address when connecting to Wi-Fi in Java
[Words spelled to me when I was in the first grade ⑦] What I want you to include at least with the Visual Studio Code extension
What to do when you think you can't do Groovy-> Java in IntelliJ IDEA CE
What to do when the error "Non-static variable x cannot be referenced from static context" in Java. Lessons from the very first step in programming Remarks 01
When the server fails to start in Eclipse
When you want to bind InputStream in JDBI3
A note when you want Tuple in Java
When you want to use the method outside
Be careful with requests and responses when using the Serverless Framework in Java
[java tool] A useful tool when you want to send the ipmsg log of PC-A to the specified PC on a regular basis.
[React.useRef] What to do when the latest state cannot be referenced in the event listener
You also need to specify the host when debugging remotely with Java 9 or later
[Android Studio] I want to set restrictions on the values registered in EditText [Java]
What to do when "Fail to load the JNI shared library" is displayed in Eclipse
Summary of how to use the proxy set in IE when connecting with Java
What to do if you cannot execute with the command "Java package name / class name"
I want to do something like "cls" in Java
How to run Java EE Tutial on github on Eclipse
If you want to recreate the instance in cloud9
Do you know Decorator?
What to do when you want to know the source position where the method is defined in binding.pry
When reading the source code
[Ruby + Rails] When you want to register in Mailchimp's mail list together with user registration
Four things Heroku stumbled upon when deploying a web app created in Java with GitHub
What to do when Git Repository cannot be displayed in Team Explorer for Eclipse in Azure
How to write in Model class when you want to save binary data in DB with PlayFramework
When you want to change the wording to be displayed when making a select box from enum
What to do when Rails on Docker does not reflect controller changes in the browser
How to reduce the load on the program even a little when combining characters with JAVA
[Spring Dtata JPA] How to deal with the problem that DB change cannot be detected when you want to process API synchronously with a single thread in Spring Boot.
I want to set the conditions to be displayed in collection_check_boxes
Failed to create the Java Virtual Machine when installing Eclipse.
What to do when you launch an application with rails
When you want to explicitly write OR or AND with ransack
Things to be aware of when writing code in Java
Even in Java, I want to output true with a == 1 && a == 2 && a == 3
How to switch Java in the OpenJDK era on Mac
When you want to change the MySQL password of docker-compose
docker-compose.yml when you want to keep mysql running with docker
Be sure to compare the result of Java compareTo with 0
lombok.config when you want to pass @Qualifier to @RequiredArgsConstructor with lombok
I want to simplify the conditional if-else statement in Java
[Swift] When you want to know if the number of characters in a String matches a certain number ...
Comparison of version strings (Java implementation) when you want to branch the process between two versions
Object-oriented design that can be used when you want to return a response in form format
Settings to be made when HTML or JSP is formatted in Eclipse and the layout is disappointing
When you want to check whether the contents of a property can be converted to a specific type
What to do if you get a JNI shared library error when trying to build in Eclipse