Closed aubertc closed 2 years ago
Does that require anything more than simply changing the folder's name and any references to it in the execution statement?
I don't know, the answer is probably somewhere in https://maven.apache.org/guides/introduction/introduction-to-the-pom.html BTW, "popbr" may be a better company name than AugustaUniversity.
I can investigate if you want.
Just to be clear: I was referring to this
I will change that, and report it that breaks anything.
I ran into a myriad of problems when I changed the namein the pom. So, I made another Maven project, packaged it and such, but this time, the company is "popbr". It's name DatabaseIO this time, and all seems well. One problem I ran into, though, was that
java -cp target/DatabaseIO-1.0-SNAPSHOT.jar popbr.App
fails with the lines:
Error: Unable to initialize main class popbr.App Caused by: java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook
Should I keep the new project, or undo it and leave the name as com.mycompany.App?
java -cp target/DatabaseIO-1.0-SNAPSHOT.jar popbr.App
Why don't you run something like
mvn exec:java -Dexec.mainClass="com.mycompany.app.App"
where mycompany
is popbr
, or something of that nature, like we used to?
I don't think I tried that specific command, so I will. However, I thought the "com.mycompany.app" part of that command correlates the the folder structure "main/java/com/mycompany/app/App.java". By changing one, you would have to change the other, right?
Absolutely.
BTW, https://maven.apache.org/guides/mini/guide-naming-conventions.html may be useful.
Following that link, would we be following the naming conventions by doing just "popbr", or "AugustaUniversity.popbr"?
Further along, should I keep the DatabaseIO Maven project that uses popbr, or the one that uses com.mycompany.app?
The idea is to replace the meaningless "mycompany" with something meaningful.
And we can probably use a more meaningful name than "app", too. The issue is not very precise, my apologies.
I changed the name in pom.xml and the execution command and it works. Committing now. If anything breaks and we need to undo, I saved the entire project offline as another contingency aside from git's version control, just in case.
It seems to be working just fine, but if I am not mistaken the application is still called "App", since we call it with
mvn exec:java -Dexec.mainClass="popbr.App"
We should give the testing application and the "actual" application more meaningful names, don't you think? You are actually using a different name in the pom, if I am not mistaken:
<artifactId>Database-IO</artifactId>
You should propagate that name accordingly (provided artifactid = application name, something I'm not sure of).
But, ok, the name of the organization is settled.
The Application's name has been changed
Shouldn't you delete the folder https://github.com/popbr/data-integration/tree/main/Project/Database-IO/src/test/java/com/mycompany/app ?
or rename it?
That's odd; I deleted it on my side, and added that change to my commits a few commits ago.
I don't think you "git deleted" it, it's still in the repo: https://github.com/popbr/data-integration/tree/main/Project/Database-IO/src/test/java/com/mycompany/app
Deleting it on your computer does not propagate onto the repo.
Ah, I didn't realize that. Would I delete the directory directly in Git?
You can use the web interface or the command line,
git rm -r Project/Database-IO/src/test/java/com/mycompany/app/
I ran it for you with https://github.com/popbr/data-integration/commit/79331216037c4245b13b57651168ed55cf97a72e
I appreciate that, and thank you for the command for future reference.
The name in the Installation_Test folder has not been changed.
The app and foldernames have been changed. The Installation_Test/src/Test.... folder has been deleted. I housed some old test app that serves no purpose now whatsoever.
Ok, I'll have to fix the github compilation's scheme at some point: please leave this issue open.
Ok, we can now close this I believe, after https://github.com/popbr/data-integration/commit/ebe483f172174503f3caebb97edb1e987c41ade9.
As of now, the application is called
"com.mycompany.app.App"
. I'm sure we can come up with a better name than that, and propagate it efficiently everywhere.We could begin by replacing mycompany with AugustaUniversity.