You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "J.Peschier" <j....@dataccent.nl> on 2007/04/14 11:22:51 UTC

[M2] Eclipse plugin will not generate project descriptor for RAR artifacts?

Part of a multimodule build, I have a RAR-module which builds fine outside
Eclipse using Maven 2.0.5. However, when the maven-eclipse-plugin is run to
create Eclipse project descriptors, the project for the RAR-module only
contains project references. The Java nature is not set and neither is the
build classpath. The relevant parts in the RAR-module's POM are:

<packaging>rar</packaging>

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-rar-plugin</artifactId>
	<version>2.2</version>
	<configuration>
		<includeJar>false</includeJar>
		<outputDirectory>${basedir}/target</outputDirectory>
		<raXmlFile>${basedir}/src/conf/ra.xml</raXmlFile>
	</configuration>
</plugin>


<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-eclipse-plugin</artifactId>
	<version>2.3</version> <!-- version is imported from parent POM -->
</plugin>

Looking for a solution I tried adding the Java nature manually to the
maven-eclipse-plugin configuration of the RAR-module's POM as follows:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-eclipse-plugin</artifactId>
	<version>2.3</version>
	<configuration>
		<buildcommands>
		 	<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
		</buildcommands>
		<projectnatures>
			<projectnature>org.eclipse.jdt.core.javanature</projectnature>
		</projectnatures>
	</configuration>
</plugin>

This resulted in getting a .project with a Java nature, but project
references and build classpath were not set. I suspect the
maven-eclipse-plugin does not support RAR artifacts? I also have a SAR
artifact in my build and the eclipse plugin generates a correct .project and
.classpath for that one. I was thinking handling RAR artifacts would be the
same. Is there documentation detailing which artifact types are processed by
the maven-eclipse-plugin?
-- 
View this message in context: http://www.nabble.com/-M2--Eclipse-plugin-will-not-generate-project-descriptor-for-RAR-artifacts--tf3575551s177.html#a9991405
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] Eclipse plugin will not generate project descriptor for RAR artifacts?

Posted by Emmanuel Venisse <em...@venisse.net>.
It's a problem on the rar plugin that doesn't have an artifact handler descriptor.
The eclipse plugin look at the handler to define if it's a java project or not, and without this handler, the language of rar project is defined by default to "none" instead of "jar".

Please file an issue.

Emmanuel

J.Peschier a écrit :
> Part of a multimodule build, I have a RAR-module which builds fine outside
> Eclipse using Maven 2.0.5. However, when the maven-eclipse-plugin is run to
> create Eclipse project descriptors, the project for the RAR-module only
> contains project references. The Java nature is not set and neither is the
> build classpath. The relevant parts in the RAR-module's POM are:
> 
> <packaging>rar</packaging>
> 
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-rar-plugin</artifactId>
> 	<version>2.2</version>
> 	<configuration>
> 		<includeJar>false</includeJar>
> 		<outputDirectory>${basedir}/target</outputDirectory>
> 		<raXmlFile>${basedir}/src/conf/ra.xml</raXmlFile>
> 	</configuration>
> </plugin>
> 
> 
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-eclipse-plugin</artifactId>
> 	<version>2.3</version> <!-- version is imported from parent POM -->
> </plugin>
> 
> Looking for a solution I tried adding the Java nature manually to the
> maven-eclipse-plugin configuration of the RAR-module's POM as follows:
> 
> <plugin>
> 	<groupId>org.apache.maven.plugins</groupId>
> 	<artifactId>maven-eclipse-plugin</artifactId>
> 	<version>2.3</version>
> 	<configuration>
> 		<buildcommands>
> 		 	<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
> 		</buildcommands>
> 		<projectnatures>
> 			<projectnature>org.eclipse.jdt.core.javanature</projectnature>
> 		</projectnatures>
> 	</configuration>
> </plugin>
> 
> This resulted in getting a .project with a Java nature, but project
> references and build classpath were not set. I suspect the
> maven-eclipse-plugin does not support RAR artifacts? I also have a SAR
> artifact in my build and the eclipse plugin generates a correct .project and
> .classpath for that one. I was thinking handling RAR artifacts would be the
> same. Is there documentation detailing which artifact types are processed by
> the maven-eclipse-plugin?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org