mirror of
https://gitee.com/dcren/initializr.git
synced 2025-09-18 17:48:14 +08:00
Derive package name from groupId and artifactId
This commit derives the package name of the application from the artifact's `groupId` and `artifactId`. Previously sources were put in a package that mirrors the groupId value. This goes against the "unique package per application" policy that we try to enforce. Even if the package name value can be customized manually, deriving it automatically from the values provided in those fields will help structure codebases. With this change, the package name is derived like this: * groupId `com.example`, artifactId `bookmarks` -> package `com.example.bookmarks` * groupId `com.example`, artifactId `user-management` -> package `com.example.usermanagement` This commit fixes the package name generation on the server, but also in the web interfaces when the user updates the form fields. Fixes gh-421
This commit is contained in:
@@ -46,7 +46,7 @@ public class ProjectRequestDocumentFactoryTests extends AbstractInitializrStatTe
|
||||
assertEquals(null, document.getRequestIp());
|
||||
assertEquals("com.example", document.getGroupId());
|
||||
assertEquals("demo", document.getArtifactId());
|
||||
assertEquals("com.example", document.getPackageName());
|
||||
assertEquals("com.example.demo", document.getPackageName());
|
||||
assertEquals("1.2.3.RELEASE", document.getBootVersion());
|
||||
assertEquals("1.8", document.getJavaVersion());
|
||||
assertEquals("java", document.getLanguage());
|
||||
|
Reference in New Issue
Block a user