You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/12/26 09:42:00 UTC

[GitHub] [servicecomb-toolkit] kakulisen commented on a change in pull request #74: [SCB-1679] adjust main class package

kakulisen commented on a change in pull request #74: [SCB-1679] adjust main class package
URL: https://github.com/apache/servicecomb-toolkit/pull/74#discussion_r361415676
 
 

 ##########
 File path: codegen/src/main/java/org/apache/servicecomb/toolkit/codegen/AbstractJavaCodegenExt.java
 ##########
 @@ -46,7 +47,17 @@ public AbstractJavaCodegenExt() {
     apiPackage = groupId + "." + artifactId + ".api";
     modelPackage = groupId + "." + artifactId + ".model";
     mainClassPackage = groupId + "." + artifactId;
+  }
 
+  @Override
+  public void processOpts() {
+    super.processOpts();
+    if (StringUtils.isEmpty((String) additionalProperties.get("mainClassPackage"))) {
+      mainClassPackage = apiPackage.substring(0, apiPackage.lastIndexOf("."));
+      additionalProperties.put("mainClassPackage", mainClassPackage);
+    } else {
+      mainClassPackage = (String) additionalProperties.get("mainClassPackage");
+    }
 
 Review comment:
   ok, wait a moment

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services