logo Apache Maven Eclipse Plugin

The Eclipse Plugin is used to generate Eclipse IDE files (.project, .classpath and the .settings folder) from a POM.

homepage: maven.apache.org/plugins
fresh index:
last release: 7 years ago, first release: 2 decades ago
packaging: maven-plugin
get this artifact from: central nuxeo
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
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 maven-eclipse-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 to the local repo. This mojo automatically analize the eclipse directory, copy plugins jars to the local maven repo, and generates appropriate poms. This is the official central repository builder for Eclipse plugins, so it has the necessary default values. For customized repositories see {@link MakeArtifactsMojo} Typical usage: mvn eclipse:to-maven -DdeployTo=maven.org::default::scpexe://repo1.maven.org/home/maven/repository-staging/to-ibiblio/eclipse-staging -DeclipseDir=.

Often used code snippets:

<plugin>
  <artifactId>maven-eclipse-plugin</artifactId>
  <version>2.9</version>
  <configuration>
    <additionalProjectnatures>
      <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
    </additionalProjectnatures>
    <additionalBuildcommands>
      <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
    </additionalBuildcommands>
    <downloadSources>true</downloadSources>
    <downloadJavadocs>true</downloadJavadocs>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-eclipse-plugin</artifactId>
  <configuration>
    <downloadSources>true</downloadSources>
    <downloadJavadocs>true</downloadJavadocs>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-eclipse-plugin</artifactId>
  <version>${maven-eclipse-plugin.version}</version>
  <configuration>
    <downloadSources>true</downloadSources>
    <downloadJavadocs>true</downloadJavadocs>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-eclipse-plugin</artifactId>
  <version>2.9</version>
  <configuration>
    <downloadSources>true</downloadSources>
    <downloadJavadocs>false</downloadJavadocs>
    <wtpversion>2.0</wtpversion>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-eclipse-plugin</artifactId>
  <configuration>
    <downloadSources>true</downloadSources>
    <buildcommands>
      <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
    </buildcommands>
    <additionalProjectnatures>
      <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
    </additionalProjectnatures>
    <classpathContainers>
      <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
      <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER</classpathContainer>
    </classpathContainers>
  </configuration>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.