Maven 2.x Eclipse Plugin

Allow to use a packaging model to override the packaging defined in the pom

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.4
  • Fix Version/s: 2.5
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

It can be useful to be able to define the packaging to use to generate eclipse settings.
In the case of a customized packaging (a grails application for ex) you would like to use a war packaging model to be able to reuse WTP feature, but it is actually impossible because the plugin reads directly the pom packaging (and not an intermediate configuration variable).

Activity

Hide
Arnaud Heritier added a comment -

Done

Show
Arnaud Heritier added a comment - Done
Hide
Eelco Hillenius added a comment -

This doesn't work for me. I have a project that uses swf packaging (flex mojos), and a plugin configuration in the build section like this:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-eclipse-plugin</artifactId>
	<configuration>
		<packaging>jar</packaging>
		<outputDirectory>target</outputDirectory>
		<additionalBuildcommands>
			<buildCommand>
				<name>
					com.adobe.flexbuilder.project.flexbuilder
				</name>
			</buildCommand>
		</additionalBuildcommands>
		<additionalProjectnatures>
			<projectnature>
				com.adobe.flexbuilder.project.flexnature
			</projectnature>
			<projectnature>
				com.adobe.flexbuilder.project.actionscriptnature
			</projectnature>
		</additionalProjectnatures>
	</configuration>
</plugin>

Unfortunately, this doesn't trigger the maven-eclipse plugin for adding the javabuilder & javanature to the project, nor does result in the plugin creating a .classpath file.

I tested this with 2.5 and 2.5.1.

Show
Eelco Hillenius added a comment - This doesn't work for me. I have a project that uses swf packaging (flex mojos), and a plugin configuration in the build section like this:
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-eclipse-plugin</artifactId>
	<configuration>
		<packaging>jar</packaging>
		<outputDirectory>target</outputDirectory>
		<additionalBuildcommands>
			<buildCommand>
				<name>
					com.adobe.flexbuilder.project.flexbuilder
				</name>
			</buildCommand>
		</additionalBuildcommands>
		<additionalProjectnatures>
			<projectnature>
				com.adobe.flexbuilder.project.flexnature
			</projectnature>
			<projectnature>
				com.adobe.flexbuilder.project.actionscriptnature
			</projectnature>
		</additionalProjectnatures>
	</configuration>
</plugin>
Unfortunately, this doesn't trigger the maven-eclipse plugin for adding the javabuilder & javanature to the project, nor does result in the plugin creating a .classpath file. I tested this with 2.5 and 2.5.1.
Hide
Arnaud Heritier added a comment -

Can you submit a testcase to allow me to reproduce your issue ?

Show
Arnaud Heritier added a comment - Can you submit a testcase to allow me to reproduce your issue ?
Hide
Steve Karlovitz added a comment -

I am having the same issue but with an amp packaging type.

<parent>
<artifactId>Warehouse</artifactId>
<groupId>xxx</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>xxx</groupId>
<artifactId>WarehouseModule</artifactId>
<packaging>amp</packaging>
<name>WarehouseModule</name>
<version>1.0</version>
<url>http://maven.apache.org</url>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.5</version>
<configuration>
<addVersionToProjectName>true</addVersionToProjectName>
<downloadSources>false</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
<workspace>D:\SDE-AssetLibrary\workspace</workspace>
<packaging>jar</packaging>
</configuration>
</plugin>

Show
Steve Karlovitz added a comment - I am having the same issue but with an amp packaging type. <parent> <artifactId>Warehouse</artifactId> <groupId>xxx</groupId> <version>1.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <groupId>xxx</groupId> <artifactId>WarehouseModule</artifactId> <packaging>amp</packaging> <name>WarehouseModule</name> <version>1.0</version> <url>http://maven.apache.org</url> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>2.5</version> <configuration> <addVersionToProjectName>true</addVersionToProjectName> <downloadSources>false</downloadSources> <downloadJavadocs>true</downloadJavadocs> <workspace>D:\SDE-AssetLibrary\workspace</workspace> <packaging>jar</packaging> </configuration> </plugin>

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: