Java 8 test compilation #430

Closed
Kricket opened this Issue Feb 6, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@Kricket

Kricket commented Feb 6, 2015

Using wisdom:run, it doesn't appear to be possible to run tests using Java 8.

I have a unit test with a lambda expression in the test code. When I do wisdom:run, it won't compile since the -source for the compiler is 1.7.

So, I added the following to my pom:

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <testSource>1.8</testSource>
                    <testTarget>1.8</testTarget>
                </configuration>
            </plugin>

The error then becomes:

[ERROR] Failed to execute goal org.wisdom-framework:wisdom-maven-plugin:0.7.0:compile (default-compile) on project kpitv: Unable to execute mojo: Unable to parse configuration of mojo org.apache.maven.plugins:maven-compiler-plugin:3.2:compile for parameter testSource: Cannot find 'testSource' in class org.apache.maven.plugin.compiler.CompilerMojo -> [Help 1]

Using the properties of the POM doesn't work either like shown here.

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Feb 6, 2015

Member

Definitely a bug, gonna have a look

Member

cescoffier commented Feb 6, 2015

Definitely a bug, gonna have a look

@cescoffier cescoffier added the bug label Feb 6, 2015

@cescoffier cescoffier added this to the 0.7.1 milestone Feb 6, 2015

@cescoffier cescoffier self-assigned this Feb 6, 2015

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Feb 9, 2015

Member

Here is a turn around:

<plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <executions>
        <execution>
            <id>default-testCompile</id>
            <goals>
                <goal>testCompile</goal>
            </goals>
            <configuration>
                <testSource>1.8</testSource>
                <testTarget>1.8</testTarget>
            </configuration>
        </execution>
    </executions>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
    </configuration>
</plugin>
Member

cescoffier commented Feb 9, 2015

Here is a turn around:

<plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <executions>
        <execution>
            <id>default-testCompile</id>
            <goals>
                <goal>testCompile</goal>
            </goals>
            <configuration>
                <testSource>1.8</testSource>
                <testTarget>1.8</testTarget>
            </configuration>
        </execution>
    </executions>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
    </configuration>
</plugin>
@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Feb 14, 2015

Member

Close issue as a turn around have been provided.

Member

cescoffier commented Feb 14, 2015

Close issue as a turn around have been provided.

@cescoffier cescoffier closed this Feb 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment