ErrorCodeInfoGenerator.java 870 B

123456789101112131415161718192021222324252627282930313233343536
  1. package org.shoulder.maven.plugins.mojo;
  2. import org.apache.maven.plugin.AbstractMojo;
  3. import org.apache.maven.plugin.MojoExecutionException;
  4. import org.apache.maven.plugin.MojoFailureException;
  5. import org.apache.maven.plugins.annotations.Mojo;
  6. import org.apache.maven.plugins.annotations.Parameter;
  7. import java.io.File;
  8. /**
  9. * 生成错误码文档
  10. *
  11. * @author lym
  12. * @goal 生成错误码文档
  13. */
  14. @Mojo(name = "generateErrorCodeInfo")
  15. public class ErrorCodeInfoGenerator extends AbstractMojo implements ErrorCode {
  16. @Parameter(defaultValue = "${basedir}")
  17. private File baseDir;
  18. @Override
  19. public void execute() throws MojoExecutionException, MojoFailureException {
  20. getLog().info("baseDir目录" + baseDir);
  21. try {
  22. } catch (Exception e) {
  23. throw new MojoExecutionException(e.getMessage());
  24. }
  25. }
  26. }