如何使用Maven-M2E-Sodestyle连接器



根据https://issues.sonatype.org/browse/ossrh-3293" maven m2e m2e code-style and Save-actions Connector"

该插件在项目为时在M2E Eclipse插件内执行 配置并配置了保存actions和代码风格选项 您的Maven项目,因此您不需要将.settings文件提交 您的仓库

我找不到样品,显示该连接器应该如何使用。我将pom.xml放入什么以触发它,我怎么知道我的日食安装是否安装了连接器?

有人是否有此连接器的示例配置?

从查看源代码,就像:

<plugin>
  <groupId>com.despegar.maven.plugin</groupId>
  <artifactId>maven-m2e-codestyle</artifactId>
  <version>1.0.3</version>
  <executions>
    <execution>
      <goals>
        <goal>configure</goal>
      </goals>
      <configuration>
        <codeStyleBaseUrl>http://some/path/to/eclipse/files/</codeStyleBaseUrl>
        <!-- Will not work. Scheme 'file' not registered. -->
        <!-- <codeStyleBaseUrl>file://localhost/some/path/to/eclipse/files/</codeStyleBaseUrl> -->
        <baseDir>${basedir}/</baseDir>
      </configuration>
    </execution>
  </executions>
</plugin>

2个配置参数为:

  • <codeStyleBaseUrl>
  • <baseDir>

它复制了这3个文件:

${codeStyleBaseUrl}/org.eclipse.core.resources.prefs
${codeStyleBaseUrl}/org.eclipse.jdt.core.prefs
${codeStyleBaseUrl}/org.eclipse.jdt.ui.prefs

to:

${baseDir}/.settings/

请注意,<codeStyleBaseUrl>必须是http/https,因为它在幕后使用了httpclient。

最新更新