[jira] [Updated] (SUREFIRE-2093) --enable-preview is not recognized

2022-06-05 Thread Nir Lisker (Jira)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-2093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nir Lisker updated SUREFIRE-2093:
-
Description: 
pom:
{code:java}
http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd;>
    4.0.0
    com.my.example
    Testing
    0.0.1-SNAPSHOT
    
        3.10.1
        3.0.0-M6
        18
        5.8.2
    
    
        
            
                org.junit
                junit-bom
                ${junit-version}
                pom
                import
            
        
    
    
        
            org.junit.jupiter
            junit-jupiter
            test
        
    
    
        Testing
        
            
                org.apache.maven.plugins
                maven-compiler-plugin
                ${maven-compiler-plugin-version}
                
                    ${java-version}
                    
                        --enable-preview
                        --add-modules=jdk.incubator.foreign
                    
                
            
            
                org.apache.maven.plugins
                maven-surefire-plugin
                ${maven-surefire-plugin-version}
                
                    --enable-preview
                    --add-modules=jdk.incubator.foreign
                    --enable-native-access=ALL-UNNAMED
                
            
        
    
 {code}
Under src/test/java add this class:
{code:java}
package com.my.example.simple;

import org.junit.jupiter.api.Test;
import jdk.incubator.foreign.ResourceScope;

public class ExampleTest {

    @Test
    public void test1() {
        try (ResourceScope scope = ResourceScope.newConfinedScope()) {
        } catch (Throwable e) {
            e.printStackTrace();
            throw e;
        }
    }
}{code}
Run Maven test.

The project compiles fine. The tests fail with:

Preview features are not enabled for com/my/example/simple/ExampleTest (class 
file version 62.65535). Try running with '--enable-preview'

--enable-preview is already specified.

  was:
pom:
{code:java}
http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd;>
    4.0.0
    com.my.example
    Testing
    0.0.1-SNAPSHOT
    
        3.10.1
        3.0.0-M6
        18
        5.8.2
    
    
        
            
                org.junit
                junit-bom
                ${junit-version}
                pom
                import
            
        
    
    
        
            org.junit.jupiter
            junit-jupiter
            test
        
    
    
        Testing
        
            
                org.apache.maven.plugins
                maven-compiler-plugin
                ${maven-compiler-plugin-version}
                
                    ${java-version}
                    
                        --enable-preview
                        --add-modules=jdk.incubator.foreign
                    
                
            
            
                org.apache.maven.plugins
                maven-surefire-plugin
                ${maven-surefire-plugin-version}
                
                    --enable-preview
                    --add-modules=jdk.incubator.foreign
                    --enable-native-access=ALL-UNNAMED
                
            
        
    
 {code}
Under src/test/java add this class:
{code:java}
package com.my.example.simple;

import org.junit.jupiter.api.Test;
import jdk.incubator.foreign.ResourceScope;
public class ExampleTest {
    @Test
    public void test1() {
        try (ResourceScope scope = ResourceScope.newConfinedScope()) {
        } catch (Throwable e) {
            e.printStackTrace();
            throw e;
        }
    }
}{code}
Run Maven test.

The project compiles fine. The tests fail with:

Preview features are not enabled for com/my/example/simple/ExampleTest (class 
file version 62.65535). Try running with '--enable-preview'

--enable-preview is already specified.


> --enable-preview is not recognized
> --
>
> Key: SUREFIRE-2093
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2093
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 3.0.0-M6
>Reporter: Nir Lisker
>Priority: Major
>
> pom:
> {code:java}
> http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> https://maven.apache.org/xsd/maven-4.0.0.xsd;>
>     4.0.0
>     com.my.example
>     Testing
>     0.0.1-SNAPSHOT
>     
>         3.10.1
>         
> 

[jira] [Updated] (SUREFIRE-2093) --enable-preview is not recognized

2022-06-05 Thread Nir Lisker (Jira)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-2093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nir Lisker updated SUREFIRE-2093:
-
Description: 
pom:
{code:java}
http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd;>
    4.0.0
    com.my.example
    Testing
    0.0.1-SNAPSHOT
    
        3.10.1
        3.0.0-M6
        18
        5.8.2
    
    
        
            
                org.junit
                junit-bom
                ${junit-version}
                pom
                import
            
        
    
    
        
            org.junit.jupiter
            junit-jupiter
            test
        
    
    
        Testing
        
            
                org.apache.maven.plugins
                maven-compiler-plugin
                ${maven-compiler-plugin-version}
                
                    ${java-version}
                    
                        --enable-preview
                        --add-modules=jdk.incubator.foreign
                    
                
            
            
                org.apache.maven.plugins
                maven-surefire-plugin
                ${maven-surefire-plugin-version}
                
                    --enable-preview
                    --add-modules=jdk.incubator.foreign
                    --enable-native-access=ALL-UNNAMED
                
            
        
    
 {code}
Under src/test/java add this class:
{code:java}
package com.my.example.simple;

import org.junit.jupiter.api.Test;
import jdk.incubator.foreign.ResourceScope;
public class ExampleTest {
    @Test
    public void test1() {
        try (ResourceScope scope = ResourceScope.newConfinedScope()) {
        } catch (Throwable e) {
            e.printStackTrace();
            throw e;
        }
    }
}{code}
Run Maven test.

The project compiles fine. The tests fail with:

Preview features are not enabled for com/my/example/simple/ExampleTest (class 
file version 62.65535). Try running with '--enable-preview'

--enable-preview is already specified.

  was:
pom:
{code:java}
http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd;>
    4.0.0
    com.my.example
    Testing
    0.0.1-SNAPSHOT    
        3.10.1
        3.0.0-M6
        18
        5.8.2
        
        
            
                org.junit
                junit-bom
                ${junit-version}
                pom
                import
            
        
        
        
            org.junit.jupiter
            junit-jupiter
            test
        
        
        Testing
        
            
                org.apache.maven.plugins
                maven-compiler-plugin
                ${maven-compiler-plugin-version}
                
                    ${java-version}
                    
                        --enable-preview
                        --add-modules=jdk.incubator.foreign
                    
                
            
            
                org.apache.maven.plugins
                maven-surefire-plugin
                ${maven-surefire-plugin-version}
                
                    --enable-preview
                    --add-modules=jdk.incubator.foreign
                    --enable-native-access=ALL-UNNAMED
                
            
        
    
 {code}
Under src/test/java add this class:
{code:java}
package com.my.example.simple;import org.junit.jupiter.api.Test;import 
jdk.incubator.foreign.ResourceScope;public class ExampleTest {    @Test
    public void test1() {
        try (ResourceScope scope = ResourceScope.newConfinedScope()) {
        } catch (Throwable e) {
            e.printStackTrace();
            throw e;
        }
    }
}{code}
Run Maven test.

The project compiles fine. The tests fail with:

Preview features are not enabled for com/my/example/simple/ExampleTest (class 
file version 62.65535). Try running with '--enable-preview'

--enable-preview is already specified.


> --enable-preview is not recognized
> --
>
> Key: SUREFIRE-2093
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2093
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 3.0.0-M6
>Reporter: Nir Lisker
>Priority: Major
>
> pom:
> {code:java}
> http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> https://maven.apache.org/xsd/maven-4.0.0.xsd;>
>     4.0.0
>     com.my.example
>     Testing
>     0.0.1-SNAPSHOT
>     
>         3.10.1
>         
> 3.0.0-M6
>