Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Where does Java nature come from?

groovy climbs on top of java. The packaging is jar, and the compiler
plugin runs as usual. Here's a little excerpt from -X of running mvn
in the project.

[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal:
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <basedir default-value="${basedir}"/>
  <buildDirectory default-value="${project.build.directory}"/>
  <classpathElements default-value="${project.compileClasspathElements}"/>
  <compileSourceRoots default-value="${project.compileSourceRoots}"/>
  <compilerId default-value="javac">${maven.compiler.compilerId}</compilerId>
  <compilerVersion>${maven.compiler.compilerVersion}</compilerVersion>
  <debug default-value="true">${maven.compiler.debug}</debug>
  <debuglevel>${maven.compiler.debuglevel}</debuglevel>
  <encoding default-value="${project.build.sourceEncoding}">${encoding}</encoding>
  <executable>${maven.compiler.executable}</executable>
  <failOnError default-value="true">${maven.compiler.failOnError}</failOnError>
  <fork default-value="false">${maven.compiler.fork}</fork>
  <generatedSourcesDirectory
default-value="${project.build.directory}/generated-sources/annotations"/>
  <maxmem>${maven.compiler.maxmem}</maxmem>
  <meminitial>${maven.compiler.meminitial}</meminitial>
  <optimize default-value="false">${maven.compiler.optimize}</optimize>
  <outputDirectory default-value="${project.build.outputDirectory}"/>
  <outputFileName>${project.build.finalName}</outputFileName>
  <projectArtifact default-value="${project.artifact}"/>
  <session default-value="${session}"/>
  <showDeprecation
default-value="false">${maven.compiler.showDeprecation}</showDeprecation>
  <showWarnings
default-value="false">${maven.compiler.showWarnings}</showWarnings>
  <source default-value="1.5">${maven.compiler.source}</source>
  <staleMillis default-value="0">${lastModGranularityMs}</staleMillis>
  <target default-value="1.5">${maven.compiler.target}</target>
  <verbose default-value="false">${maven.compiler.verbose}</verbose>
</configuration>


On Mon, May 30, 2011 at 5:41 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
> Java nature is enabled based on presence of maven-compiler-plugin with
> compilerId=javac in project build lifecycle (see [1] for exact mapping).
>
> Configuration logic is implemented in [2], which is meant to be
> extensible, but I don't know if there is enough flexibility to support
> groovy projects. If not, you'd have to implement java nature and
> classpath setup logic in GroovyProjectConfigurator.
>
> [1]
> http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.jdt/lifecycle-mapping-metadata.xml
> [2]
> http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
>
> --
> Regards,
> Igor
>
> On 11-05-30 05:23 PM, Benson Margulies wrote:
>>
>> No, this isn't zen.
>>
>> I'm trying to help out the maintainer of the groovy maven/eclipse
>> plugins in adapting to 0.13.
>>
>> Their configuration looks like:
>>
>> public class GroovyProjectConfigurator extends AbstractProjectConfigurator
>>         implements IJavaProjectConfigurator {
>> ...
>>
>> }
>>
>> When I load everything in with 0.13, a test project never acquires
>> java nature, and then their configuration fails because there's no
>> classpath.
>>
>> Is
>> org.codehaus.groovy.m2eclipse.GroovyProjectConfigurator.configure(ProjectConfigurationRequest,
>> IProgressMonitor) responsible for adding the Java nature?
>
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-users
>


Back to the top