Goals available for this plugin:

Goal Description
eclipse:clean Deletes the .project, .classpath, .wtpmodules files and .settings folder used by Eclipse.
eclipse:configure-workspace Configures The following Eclipse Workspace features:
  • Adds the classpath variable MAVEN_REPO to Eclipse.
  • Optionally load Eclipse code style file via a URL.
eclipse:eclipse Generates the following eclipse configuration files:
  • .project and .classpath files
  • .setting/org.eclipse.jdt.core.prefs with project specific compiler settings
  • various configuration files for WTP (Web Tools Project), if the parameter wtpversion is set to a valid version (WTP configuration is not generated by default)
If this goal is run on a multiproject root, dependencies between modules will be configured as direct project dependencies in Eclipse (unless useProjectReferences is set to false).
eclipse:help Display help information on eclipse-maven-plugin.
Call mvn eclipse:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
eclipse:install-plugins Install plugins resolved from the Maven repository system into an Eclipse instance.
eclipse:myeclipse Generates MyEclipse configuration files
eclipse:myeclipse-clean Deletes configuration files used by MyEclipse
eclipse:rad Generates the rad-6 configuration files.
eclipse:rad-clean Deletes the config files used by Rad-6. the files .j2ee and the file .websettings
eclipse:remove-cache Removes the not-available marker files from the repository.
eclipse:resolve-workspace-dependencies For all projects currently part of the workspace, all references to the M2_REPO classpath variable are resolved.

Note: not the projects of the reactor are inspected for unresolved artifacts, but the projects that are part of the workspace.

eclipse:to-maven

Add Eclipse artifacts from an Eclipse installation or a local P2 repo to the local Maven repo.

This mojo automatically analyzes the local P2 repo, copies jars from the plugins directory to the local maven repo, and generates appropriate poms.

Typical usage for a local Eclipse installation:

mvn eclipse:to-maven -DdeployTo=maven.org::default::scpexe://repo1.maven.org/home/maven/repository-staging/to-ibiblio/eclipse-staging -DeclipseDir=/opt/eclipse

Or to download and convert a P2 repository:

/opt/eclipse/eclipse -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -writeMode clean -verbose -raw -ignoreErrors -source http://download.eclipse.org/releases/oxygen -destination file:/tmp/p2-oxygen
mvn eclipse:to-maven -DbundleNameAsArtifactId=true -DgroupIdTokens=3 -DattachSourcePlugins -DresolveVersionRanges -DdeployTo=oxygen::default::file:/tmp/repo-2018-12 -DeclipseDir=/tmp/oxygen

Note: The size of such an update site (P2 repository) is 3 to 4 GB and the download can take several hours.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 2.2.1
JDK 11
Memory No minimum requirement.
Disk Space No minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>io.wcm.devops.maven.plugins</groupId>
          <artifactId>eclipse-maven-plugin</artifactId>
          <version>3.2.1-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>io.wcm.devops.maven.plugins</groupId>
        <artifactId>eclipse-maven-plugin</artifactId>
        <version>3.2.1-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"

Back to top

Version: 3.2.1-SNAPSHOT. Last Published: 2024-03-06.