I am going through the Struts 2 tutorials. I decided to put it up on Github as I go through it. You can download each section as a separate Maven app, or you can keep updating the same app as you go through it. So far I have been able to update the same app.
I put the app in a folder inside my git repository. At first I was not able to get the folder holding the Maven app to show up on Github. The folder was not a blue link, just a greyed out dead end. I did some Googling, and the issue was that it was being loaded into git as a module. All the pages I saw told me to do something with my .gitmodule file. None of this was helpful since there was no .gitmodule file. Git had decided to treat that folder like a module. Honestly, I am not really clear what a submodule is in git. The pages I saw told me to undo something that I could not undo, since I did not do it.
So I copied the Maven contents up to the main directory, and delete the folder. Then I made a new folder with a random name. I was able to push that to github. Then I changed the name back to the original name. I think Maven and the servlet engine needed the original name. After I did that, I was still able to see the Maven app in the folder, with the original folder name.
I was pretty frustrated during all of this. so there are a lot of comments that look like a blind man’s tweets: “jasdopfhlh”. I just wanted to get this done, and it worked.
I have a couple of repos with Gradle apps in subdirectories, and git did not “help” me with those apps. I guess git or github is aware of Maven, but not Gradle.
Image from the Hornbach Sacramentary, a 10th century manuscript housed at the Domschatz St. Ursenkathedrale (I think the Wikipedia page is here ), image from e-Codices, assumed allowed under Fair Use.