Parameters of compilerArguments are not being passed to the compiler

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Parameters of compilerArguments are not being passed to the compiler

Claudio Clemens
Hi there,

I'm trying to configure our project here to use the
groovy-eclipse-compiler. The only problem is, that the compilerArguments
are not being passed correctly to the compiler.

So configuration looks like this (also tried with Version 3.1, same effect).

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerId>groovy-eclipse-compiler</compilerId>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dirs}</endorseddirs>
                        <version>VERSION_ARG</version>
                        <help>HELP_ARG</help>
                    </compilerArguments>
                    <encoding>ISO-8859-15</encoding>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>2.7.0-01</version>
                    </dependency>
                </dependencies>
            </plugin>

When I run "mvn compile -X" I can see this:

...
[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}"/>
  <compilerArguments>
    <endorseddirs>C:\PROJECT_DIR\webapp\WEB-INF\lib-endorsed</endorseddirs>
    <version>VERSION_ARG</version>
    <help>HELP_ARG</help>
  </compilerArguments>
  ...
[DEBUG]   (f) compilerArguments =
{endorseddirs=C:\PROJECT_DIR\webapp\WEB-INF\lib-endorsed, help=HELP_ARG,
version=VERSION_ARG}
  ...
[DEBUG] Command line options:
[DEBUG] -cp <long jar list removed> -d <dir> -g -s <dir> -source 1.6
-target 1.6 -nowarn -encoding ISO-8859-15 -endorseddirs -help -version
<list of java files removed>
  ...

So as you can see, the "values" of the Arguments are not being passed to
the compiler. This doesn't happen when using the default maven-compiler.
I found some post on the internet, but none had a solution for my (I
just confirmed that I'm not the only one with the problem).

Do you have any tips? Is this a known bug? Or why is that happening? I
didn't filled a bug, because I don't have a JIRA account for codehaus. I
also didn't find any solution there.

Thanks,

Claudio

PS - Sorry if HTML-Mails are not welcome. Let me know, and I'll change
the settings of my Mail-Client.

--
Mit freundlichen Grüßen

Claudio Clemens
Java Application Developer
______________________________________
CHECK24 Vergleichsportal Finanzen GmbH | www.check24.de


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Parameters of compilerArguments are not being passed to the compiler

Andy Clement
Since you couldn't create it, I created your problem as https://jira.codehaus.org/browse/GRECLIPSE-1730

cheers,
Andy


On 6 May 2014 10:02, Claudio Clemens <[hidden email]> wrote:
Hi there,

I'm trying to configure our project here to use the
groovy-eclipse-compiler. The only problem is, that the compilerArguments
are not being passed correctly to the compiler.

So configuration looks like this (also tried with Version 3.1, same effect).

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerId>groovy-eclipse-compiler</compilerId>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dirs}</endorseddirs>
                        <version>VERSION_ARG</version>
                        <help>HELP_ARG</help>
                    </compilerArguments>
                    <encoding>ISO-8859-15</encoding>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>2.7.0-01</version>
                    </dependency>
                </dependencies>
            </plugin>

When I run "mvn compile -X" I can see this:

...
[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}"/>
  <compilerArguments>
    <endorseddirs>C:\PROJECT_DIR\webapp\WEB-INF\lib-endorsed</endorseddirs>
    <version>VERSION_ARG</version>
    <help>HELP_ARG</help>
  </compilerArguments>
  ...
[DEBUG]   (f) compilerArguments =
{endorseddirs=C:\PROJECT_DIR\webapp\WEB-INF\lib-endorsed, help=HELP_ARG,
version=VERSION_ARG}
  ...
[DEBUG] Command line options:
[DEBUG] -cp <long jar list removed> -d <dir> -g -s <dir> -source 1.6
-target 1.6 -nowarn -encoding ISO-8859-15 -endorseddirs -help -version
<list of java files removed>
  ...

So as you can see, the "values" of the Arguments are not being passed to
the compiler. This doesn't happen when using the default maven-compiler.
I found some post on the internet, but none had a solution for my (I
just confirmed that I'm not the only one with the problem).

Do you have any tips? Is this a known bug? Or why is that happening? I
didn't filled a bug, because I don't have a JIRA account for codehaus. I
also didn't find any solution there.

Thanks,

Claudio

PS - Sorry if HTML-Mails are not welcome. Let me know, and I'll change
the settings of my Mail-Client.

--
Mit freundlichen Grüßen

Claudio Clemens
Java Application Developer
______________________________________
CHECK24 Vergleichsportal Finanzen GmbH | www.check24.de


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Parameters of compilerArguments are not being passed to the compiler

Claudio Clemens
Hi there,

Kris De Volder wanted @Jira a sample Project, to test the case. I made a sample Project. But where can I send it to? It's just a 5Kb zip.

I just uploaded it to here:

http://en.file-upload.net/download-8917040/groovy.zip.html

$ md5sum groovy.zip
93a4f3066e6c1d791d404041bb3e394c *groovy.zip

It's a simple project, for testing different setting. You need to copy the right pom-*File over the pom.xml and do a "mvn clean test"

pom-nogroovy.xml: compiles just the java class. Groocy isn't compiled, no tests will be run (as expected)
pom-groovy.xml: will try to compile java and groovy, but the compilerArguments are fuzzing. Compilation fails.
pom-groovy-noargs: will compile java and groovy, and run the groovy test.

I hope Kris see this.

Or maybe, Andy can paste this in JIRA.

Thanks,

Claudio

Am 07.05.2014 21:18, schrieb Andy Clement:
Since you couldn't create it, I created your problem as https://jira.codehaus.org/browse/GRECLIPSE-1730

cheers,
Andy


signature.asc (917 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Parameters of compilerArguments are not being passed to the compiler

Andy Clement
I pasted your text into the jira.

Andy


On 14 May 2014 07:21, Claudio Clemens <[hidden email]> wrote:
Hi there,

Kris De Volder wanted @Jira a sample Project, to test the case. I made a sample Project. But where can I send it to? It's just a 5Kb zip.

I just uploaded it to here:

http://en.file-upload.net/download-8917040/groovy.zip.html

$ md5sum groovy.zip
93a4f3066e6c1d791d404041bb3e394c *groovy.zip

It's a simple project, for testing different setting. You need to copy the right pom-*File over the pom.xml and do a "mvn clean test"

pom-nogroovy.xml: compiles just the java class. Groocy isn't compiled, no tests will be run (as expected)
pom-groovy.xml: will try to compile java and groovy, but the compilerArguments are fuzzing. Compilation fails.
pom-groovy-noargs: will compile java and groovy, and run the groovy test.

I hope Kris see this.

Or maybe, Andy can paste this in JIRA.

Thanks,

Claudio


Am 07.05.2014 21:18, schrieb Andy Clement:
Since you couldn't create it, I created your problem as https://jira.codehaus.org/browse/GRECLIPSE-1730

cheers,
Andy