Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Support configuration for Maven #84

@xezzon

Description

@xezzon

Summary(关于这个pr的描述,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)

  1. Configure each configuration in pom.xml. And you can get the IDE completion that META-INF/maven/plugin.xml should contain a description of these configurations.
  2. If configFile is specified, get the configuration from configFile, otherwise get the configuration from pom.xml.
  1. 能够在 pom.xml 中完成所有配置。META-INF/maven/plugin.xml 应包含这些配置的描述,这样 IDE 能够进行补全。
  2. 如果指定了 configFile,则从 configFile 获取配置,否则从 pom.xml 获取配置。

Basic example(pr的用例,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)

<project>
  <build>
    <plugins>
      <plugin>
        <groupId>com.ly.smart-doc</groupId>
        <artifactId>smart-doc-maven-plugin</artifactId>
        <configuration>
          <outDir>${project.build.outputDirectory}/public/v3/api-docs</outDir>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>openapi</goal>
            </goals>
            <phase>generate-resources</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

image

Motivation(提出这个pr目的,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)

  1. Configuration in pom.xml can be inherited , so you do not need to copy a json file for each service , you want to modify a configuration item , you do not need to modify all the json configuration file .
  2. You can get IDE completion.
  3. You can use Maven properties in your configuration.
  1. pom.xml 的配置可以继承,这样就不需要给每一个 service 都拷贝一个 json 文件,想要修改某个配置项时,也不需要修改所有的 json 配置文件了。
  2. 可以获得IDE补全。
  3. 可以在配置中使用 Maven property。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions