[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2024-01-23 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17809838#comment-17809838
 ] 

ASF subversion and git services commented on WICKET-7072:
-

Commit 58aa0e2058c535611427783adc1a217a8a8844dd in wicket's branch 
refs/heads/master from Tim te Beek
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=58aa0e2058 ]

WICKET-7029 Add wicket-tester dependency during migration (#773)

https://issues.apache.org/jira/browse/WICKET-7029
https://issues.apache.org/jira/browse/WICKET-7072

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-17 Thread Andrea Del Bene (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17776152#comment-17776152
 ] 

Andrea Del Bene commented on WICKET-7072:
-

{quote}[~bitstorm]: Could you please update 
[https://wicket.apache.org|https://wicket.apache.org/] and add the bold (to 
avoid further compile errors in Eclipse):
[...] Users of class WicketTester must now include this module as *test* 
dependency.


{quote}
Ok, a will add *test* qualifier{*}.{*} I will also update migration guide from 
9.x to 10.x asap. **

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-17 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17776145#comment-17776145
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

Yes, it must be using the modifiedTime. At ASF every release is tested and 
voted for at least three days and if no issues are found then it is promoted to 
Maven Central.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-17 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17776139#comment-17776139
 ] 

Sam Peters commented on WICKET-7072:


Indeed, thanks. (I wonder why 
[https://repo1.maven.org/maven2/org/apache/wicket/wicket-core/10.0.0-M2/] shows 
a timestamp of "2023-10-12 22:21" (=lastbuild timestamp?) which 
[https://central.sonatype.com/artifact/org.apache.wicket/wicket-core/versions] 
obviously uses as release time (2023-10-13) even if the release was just 
yesterday (2023-10-16). IMO a bit confusing ;))

 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-17 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17776131#comment-17776131
 ] 

Maxim Solodovnik commented on WICKET-7072:
--

Artifact is available in central: 
https://repo1.maven.org/maven2/org/apache/wicket/wicket-core/10.0.0-M2/

Mvnrepository contains outdated info

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-17 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17776123#comment-17776123
 ] 

Sam Peters commented on WICKET-7072:


Thanks for updating and releasing! Two things:
 * [~bitstorm]: Could you please update 
[https://wicket.apache.org|https://wicket.apache.org/] and add the bold (to 
avoid further compile errors in Eclipse):
[...] Users of class WicketTester must now include this module as *test* 
dependency.
 * the linked 10.0.0-M2 artifacts seem not to be available yet in Maven 
central? E. g. 
[https://mvnrepository.com/artifact/org.apache.wicket/wicket-core]

 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-16 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17775720#comment-17775720
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

I've updated the Migration guide:

https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+10.0#MigrationtoWicket10.0-WicketTesterandrelatedclasseshavebeenextractedtowicket-testerMavenmoduleWICKET-7072

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774549#comment-17774549
 ] 

ASF GitHub Bot commented on WICKET-7072:


bitstorm commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759698627

   @gluser1357  thank you indeed for your effort! 
   




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774513#comment-17774513
 ] 

Sam Peters commented on WICKET-7072:


[~mgrigorov]: Some final thoughts after resolving this issue:
 * with 10.0.0-M2, users using WicketTester (or similar) have to additionally 
add the _wicket-tester_ dependency with scope test. This could possibly be 
noted in the release notes.
 * users that made use of _ApacheLicenseHeaderTestCase.java_ and 
_WellFormedXmlTestCase.java_ must add JUnit annotations (that have been 
previously part of these classes) in their test code. Maybe not a topic for 
release notes since these classes are more or less internal?
 * _apache-rat-plugin_ could replace _ApacheLicenseHeaderTestCase.java_ (see 
comments in WICKET-7072)
 * _BaseWicketTester.TestFilterConfig_ (inner class) could be saved as separate 
file together with adapting _MockHttpSession.java_ (see comment in #666) to 
correct the attribute value

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774512#comment-17774512
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1356815558


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   I fixed the bug!
   The best would be to use a real class reference instead of hardcoding a 
String like now.





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774509#comment-17774509
 ] 

ASF subversion and git services commented on WICKET-7072:
-

Commit b3380d893750c2e02880606ea2c53d1c54654283 in wicket's branch 
refs/heads/master from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=b3380d8937 ]

WICKET-7072 Fix the fully qualified name of TestFilterConfig

Signed-off-by: Martin Tzvetanov Grigorov 


> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774508#comment-17774508
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1356812102


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   Good catch!
   ![Screenshot from 2023-10-12 
16-18-31](https://github.com/apache/wicket/assets/232002/c7574040-f91a-4f09-9a25-c6751b5bf160)
   





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774505#comment-17774505
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759594995

   > Thanks for pushing this work, @gluser1357 !
   
   > Thanks for pushing this work, @gluser1357 !
   
   No problem. Thank you as well for your great support. 10.0.0-M2 master 
doesn't show any errors in Eclipse anymore, that's really great  




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774495#comment-17774495
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1356779916


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   > See org.apache.wicket.session.HttpSessionStore#getSessionAttributePrefix
   
   Ok, I see you changed this
   originally:  ... _attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");_
   to: ... 
_attributes.get("wicket:org.apache.wicket.util.tester.BaseWicketTester.TestFilterConfig:session");_
   
   I wonder if that's correct since TestFilterConfig is an inner class?
   
   A simple alternative would be to save TestFilterConfig as new file and adapt 
the line to 
_attributes.get("wicket:org.apache.wicket.util.tester.TestFilterConfig:session");_





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774493#comment-17774493
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759558845

   > > Are sources of wicket-core checked now, or is something to do here?
   > 
   > 
[ceacaf2#diff-cd87ffc1ff8683a3f9ae0fcc7055de1691b36452d962a438d32b72840d5f0c99R137-R151](https://github.com/apache/wicket/commit/ceacaf29fd68a28e6c6ee1554fb324e5a37bb4e8#diff-cd87ffc1ff8683a3f9ae0fcc7055de1691b36452d962a438d32b72840d5f0c99R137-R151)
   
   Ok, tests runs for me on wicket-core with this change, nothing to do anymore 
here.




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774488#comment-17774488
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759528254

   > > @gluser1357 Why most of the commits in this PR are by user @sre ? What 
is your relation ?
   > 
   > None of them are from me. You see 'sre', because that has been used as the 
full name for git when authoring the commits. Github just shows the name of the 
commit, since there is no account connected to the mapchart.com mail address 
used by the 'sre' in this pull request.
   
   @sre: Ah, ok, I see, we are both using "sre" ;-) I really have to take care 
about that when commiting, sorry for this confusion. I wonder that my "sre" 
commits haven't been checked and rejected by Github :/




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774484#comment-17774484
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759521121

   Thanks for pushing this work, @gluser1357 !




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Assignee: Martin Tzvetanov Grigorov
>Priority: Major
> Fix For: 10.0.0-M2
>
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774481#comment-17774481
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g merged PR #666:
URL: https://github.com/apache/wicket/pull/666




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774482#comment-17774482
 ] 

ASF subversion and git services commented on WICKET-7072:
-

Commit b0f3da3b0df272ab0e3ed196968acd6ab725e2ec in wicket's branch 
refs/heads/master from gluser1357
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=b0f3da3b0d ]

WICKET-7072 wicket tester and core tests without test jar (#666)

* WICKET-7072 Remove maven-site-plugin related files

Wicket does not use maven-site-plugin since a long time

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Update end year for Copyright to 2023

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Remove more maven-site-plugin artifacts

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Cleanup pom.xml files

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Move back the JS tests to wicket-core/src/test/js

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Move WebSocketTester to wicket-native-websocket-tester module

Signed-off-by: Martin Tzvetanov Grigorov 

* revert test-jar from wicket-util (see WICKET-7072 26/Sept/23 comment)

* removed one unused dependency

* added JUnit as non-test dependency in wicket-native-websocket-tester

* removed commented-out code

* removed unused dependency

* reverted requires jakarta.servlet (was not related to test-jar)

* added requires jakarta.servlet to support default Eclipse test compile

* WICKET-7072: Do not deploy wicket-core-tests artifacts

This module is just tests for wicket-core

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Use the fully qualified name of TestFilterConfig class

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Fix the ApacheLicenceHeaderTest for wicket-core

Signed-off-by: Martin Tzvetanov Grigorov 

-

Signed-off-by: Martin Tzvetanov Grigorov 
Co-authored-by: sre 
Co-authored-by: gluser1357 
Co-authored-by: Martin Tzvetanov Grigorov 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774480#comment-17774480
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759516057

   Merging ...
   More improvements could be made in a separate PR. This one is too big 
already!




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774479#comment-17774479
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759514276

   > Are sources of wicket-core checked now, or is something to do here?
   
   
https://github.com/apache/wicket/pull/666/commits/ceacaf29fd68a28e6c6ee1554fb324e5a37bb4e8#diff-cd87ffc1ff8683a3f9ae0fcc7055de1691b36452d962a438d32b72840d5f0c99R137-R151




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774476#comment-17774476
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759507153

   > @gluser1357 Why most of the commits in this PR are by user @sre ? What is 
your relation ?
   
   My fault. 
   
   > org.apache.wicket.core.util.license.ApacheLicenceHeaderTest does nothing 
in wicket-core-tests module. Issues:
   > 
   > 1. it does not override `before()` and `licenseHeaders()`
   > 
   > 2. even when 1) is fixed it does not check the sources of 
`wicket-core` module
   > 
   > 
   > **Update**: Fixed
   
   Thanks for fixing, I obviously forgot the two overrides in this class.
   
   Are sources of wicket-core checked now, or is something to do here?




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774477#comment-17774477
 ] 

ASF GitHub Bot commented on WICKET-7072:


sre commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759508187

   > @gluser1357 Why most of the commits in this PR are by user @sre ? What is 
your relation ?
   
   None of them are from me. You see 'sre', because that has been used as the 
full name for git when authoring the commits. Github just shows the name of the 
commit, since there is no account connected to the mapchart.com mail address 
used by the 'sre' in this pull request.




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774451#comment-17774451
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759429463

   org.apache.wicket.core.util.license.ApacheLicenceHeaderTest does nothing in 
wicket-core-tests module.
   Issues:
   1) it does not override `before()` and `licenseHeaders()`
   2) even when 1) is fixed it does not check the sources of `wicket-core` 
module




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774445#comment-17774445
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759416035

   @gluser1357 Why most of the commits in this PR are by user @sre ? What is 
your relation ?




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774443#comment-17774443
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r135067


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   See org.apache.wicket.session.HttpSessionStore#getSessionAttributePrefix





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17774362#comment-17774362
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1759099761

   I'll take a new look soon!




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-11 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17773916#comment-17773916
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1354192644


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   This seems to be the only open issue of this PR. Could someone please take a 
closer look at this?
   
   (I just don't see any reference where this attribute 
"wicket:[class]:session" is set. Related could be 
AbstractPersistentPageStore.KEY_PREFIX = "wicket:", but I dont see any other 
":session" in the code.)





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-11 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17773912#comment-17773912
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1354156173


##
wicket-cdi/src/main/java/module-info.java:
##
@@ -24,6 +24,7 @@
 requires org.apache.wicket.request;
 requires org.apache.wicket.core;
 requires org.slf4j;
+requires static jakarta.servlet;

Review Comment:
   @martin-g: Looking at some commits in wicket master it looks like that 
commits of a PR are squashed, and the comments of these commits are merged and 
used as comment of the squashed commit. Because of this I decided for the first 
option (reverted the change, commit, redo, added again and commit) and applied 
it.





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-09 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17773161#comment-17773161
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1349962450


##
wicket-util/pom.xml:
##
@@ -47,22 +47,6 @@

org.junit.jupiter

Review Comment:
   Yes, thanks. Code is removed.





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-09 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17773160#comment-17773160
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1349962190


##
wicket-core/pom.xml:
##
@@ -207,6 +179,24 @@ org.apache.wicket.validation.validator;-noimport:=true
org.primefaces.extensions

resources-optimizer-maven-plugin

+   
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-07 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17772839#comment-17772839
 ] 

ASF GitHub Bot commented on WICKET-7072:


solomax commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1349539904


##
wicket-util/pom.xml:
##
@@ -47,22 +47,6 @@

org.junit.jupiter

Review Comment:
   This dependency is global (set in parent pom), maybe it can be dropped here?





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-07 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17772834#comment-17772834
 ] 

ASF GitHub Bot commented on WICKET-7072:


solomax commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1349532691


##
wicket-core/pom.xml:
##
@@ -207,6 +179,24 @@ org.apache.wicket.validation.validator;-noimport:=true
org.primefaces.extensions

resources-optimizer-maven-plugin

+   
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-05 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17772163#comment-17772163
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1347221404


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   Ok, and what about _Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");_? Where is 
this relevant?





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-05 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17772162#comment-17772162
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1347197723


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   I think these classes should stay in -core.





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-05 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17772160#comment-17772160
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1347181349


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   I don't think that moving the package from wicket-core to wicket-util would 
have advantages.
   
   My initial assumption was that mocking stuff should be only test scoped, but 
it currently isn't (as ComponentRenderer shows). IMO we should leave it as it 
is (possibly requiring a better fix in MockHttpSession.java, see diff) OR move 
just MockHttpSession.java to wicket-tester?





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-05 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17772156#comment-17772156
 ] 

ASF GitHub Bot commented on WICKET-7072:


bitstorm commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1347161758


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   If we want to move the entire package I don't see many alternatives,,,maybe 
the best option first glance could be move it into wicket-util module (i.e 
org.apache.wicket.util.protocol.http.mock ). Waiting for better ideas :-) 





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-05 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17772153#comment-17772153
 ] 

ASF GitHub Bot commented on WICKET-7072:


solomax closed pull request #660: [WICKET-7072] wicket tester and core tests
URL: https://github.com/apache/wicket/pull/660




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-05 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17772111#comment-17772111
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1346947889


##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   Copied from previous PR #659:
   
   >>> 
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java
   
   >> I think this class should be moved to wicket-tester
   
   Ok, we could do that (I also thought about moving the whole  _package 
_org/apache/wicket/protocol/http/mock_ to wicket-tester but 
org.apache.wicket.core.util.string.ComponentRenderer in /src/main/java makes 
use of org.apache.wicket.protocol.http.mock.MockServletContext, so that won’t 
work).
   
   Should we move only MockHttpSession to wicket-tester then? If not, how to 
rewrite this line in MockHttpSession.invalidate()?
   



##
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java:
##
@@ -146,7 +145,8 @@ public ServletContext getServletContext()
@Override
public void invalidate()
{
-   Session session = (Session) attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName() + ":session");
+   Session session = (Session) attributes.get("wicket:" + 
"BaseWicketTester.TestFilterConfig" + ":session"); // TODO

Review Comment:
   Copied from previous PR #659:
   
   >>> 
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java
   
   >> I think this class should be moved to wicket-tester
   
   Ok, we could do that (I also thought about moving the whole  _package 
_org/apache/wicket/protocol/http/mock_ to wicket-tester but 
org.apache.wicket.core.util.string.ComponentRenderer in /src/main/java makes 
use of org.apache.wicket.protocol.http.mock.MockServletContext, so that won’t 
work).
   
   Should we move only MockHttpSession to wicket-tester then? If not, how to 
rewrite this line in MockHttpSession.invalidate()?
   





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771849#comment-17771849
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1746864916

   There is one question left from previous version #659:
   
   >>> 
wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpSession.java
   
   >> I think this class should be moved to wicket-tester
   
   What about also moving package _org/apache/wicket/protocol/http/mock_ to 
wicket-tester in this PR?
   
   It would solve the remaining issue (see comments in WICKET-7072) "_And 
related, There is one issue in MockHttpSession.invalidate() that I couldn't 
solve, I think it's uncritical: attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName())_"




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771811#comment-17771811
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1746603289

   > Just have tested this branch in VSCode
   > 
   > there no errors :))
   > 
   > Hooray! :)
   
   Great, thanks for testing!




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771810#comment-17771810
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1345578195


##
wicket-cdi/src/main/java/module-info.java:
##
@@ -24,6 +24,7 @@
 requires org.apache.wicket.request;
 requires org.apache.wicket.core;
 requires org.slf4j;
+requires static jakarta.servlet;

Review Comment:
   > Fully agree on this!
   
   Ok, great!
   
   > I just want to propose an improvement:
   
   Thank you for this proposal. I'm unsure how to do this practically:
   - revert the change, commit, redo the change with appropriate comment and 
commit
   
   or
   
   - revert the change, commit, wait until PR is merged into master (with 
commits squashed), open another PR for WICKET-7072, redo the change with 
appropriate comment and commit?





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771801#comment-17771801
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on PR #660:
URL: https://github.com/apache/wicket/pull/660#issuecomment-1746571268

   IMO yes, this PR can be closed (since replaced by #666).




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771786#comment-17771786
 ] 

ASF GitHub Bot commented on WICKET-7072:


solomax commented on PR #666:
URL: https://github.com/apache/wicket/pull/666#issuecomment-1746508551

   Just have tested this branch in VSCode
   
   there no errors :))
   
   Hooray! :)




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771780#comment-17771780
 ] 

ASF GitHub Bot commented on WICKET-7072:


solomax commented on PR #660:
URL: https://github.com/apache/wicket/pull/660#issuecomment-1746479720

   @gluser1357 this one also can be closed?




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771750#comment-17771750
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1345373073


##
wicket-cdi/src/main/java/module-info.java:
##
@@ -24,6 +24,7 @@
 requires org.apache.wicket.request;
 requires org.apache.wicket.core;
 requires org.slf4j;
+requires static jakarta.servlet;

Review Comment:
   > Meanwhile we could keep requires static jakarta.servlet which would 
prevent Eclipse developers from manually fixing the build path
   
   Fully agree on this! 
   I just want to propose an improvement:
   - either mention the reason for the change in the commit message
   - or even better - use a separate commit for it. Mixing it in the same 
commit with the wicket-util:test-jar one is not good





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771747#comment-17771747
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1345360213


##
wicket-cdi/src/main/java/module-info.java:
##
@@ -24,6 +24,7 @@
 requires org.apache.wicket.request;
 requires org.apache.wicket.core;
 requires org.slf4j;
+requires static jakarta.servlet;

Review Comment:
   > Maven Surefire plugin is only for executing the tests via Maven. It does 
not affect the compilation phase!
   
   I agree, sorry for mixing up compile and surefire plugins.
   
   > In addition: the src/test/java don't have module-info.java, i.e. they are 
not Java modules!
   
   IMO (esp. after reading 
https://stackoverflow.com/questions/46613214/java-9-maven-junit-does-test-code-need-module-info-java-of-its-own-and-wher),
 /src/main/java/module-info.java is used for compiling both /src/main/java and 
/src/test/java, but compilation of test code seems to be different in Eclipse 
and Maven, leading to different results (Maven compiles test sources, but 
Eclipse doesn't do in this case). I think more research is needed here. It 
would be great if Eclipse would follow Maven in this use case. Meanwhile we 
could keep requires static jakarta.servlet which would prevent Eclipse 
developers from manually fixing the build path (via exclude module-info.java, 
see also my comment in WICKET-7072).





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771719#comment-17771719
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

{quote}Please see my latest comment in WICKET-7072 for leaving this change.
{quote}
Github UI is much more suitable for commenting code changes!

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-04 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771718#comment-17771718
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

{quote}see maven-surefire-plugin config
{quote}
Maven Surefire plugin is only for executing the tests via Maven. It does not 
affect the compilation phase! In addition: the src/test/java don't have 
module-info.java, i.e. they are not Java modules!

 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-03 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771711#comment-17771711
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1345233822


##
wicket-cdi/src/main/java/module-info.java:
##
@@ -24,6 +24,7 @@
 requires org.apache.wicket.request;
 requires org.apache.wicket.core;
 requires org.slf4j;
+requires static jakarta.servlet;

Review Comment:
   Please see my latest comment in WICKET-7072 for leaving this change.





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-03 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771709#comment-17771709
 ] 

Sam Peters commented on WICKET-7072:


{quote}This change is not related to this commit. I reverted it once and 
everything was working. Now it is re-introduced silently again.
{quote}
I had to re-introduce it because of compile errors in Eclipse ("The type 
jakarta.servlet.http.HttpServletRequest is not accessible") at CdiWicketTester 
and ContextManager in /src/test/java that make use of 
jakarta.servlet.http.HttpServletRequest.

Test code is AFAIK, in Eclipse, by default, compiled with module-info, but for 
module {_}org.apache.wicket.cdi{_}, _jakarta.servlet_ is not defined as module:
{code:java}
module org.apache.wicket.cdi {
  requires org.apache.wicket.core;
  ...
}

module org.apache.wicket.core {
  requires static jakarta.servlet; 
  ...
}
{code}
Thus the compile errors for test code in Eclipse which is IMO not an Eclipse 
error.
 * in IntelliJ, I could imagine that compiling test code is done without 
module-info (the same way as maven compiles by using useModulePath, see 
maven-surefire-plugin config)
 * in Eclipse, to get rid of the compiler warnings, we could
 ** keep requires static jakarta.servlet in module-info (or alternatively, add 
transitive keyword in wicket-util and remove other requires static 
jakarta.servlet in dependent modules)
 ** exclude module-info in build path of wicket-cdi (tedious task!)

Now, as long as module-info is used by default for compiling test resources in 
IDEs like Eclipse (and I assume the same for VSCode), which is IMO not against 
any spec, I'd suggest to keep requires static jakarta.servlet. I think it would 
be the cleanest solution right now.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-10-03 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17771448#comment-17771448
 ] 

ASF GitHub Bot commented on WICKET-7072:


martin-g commented on code in PR #666:
URL: https://github.com/apache/wicket/pull/666#discussion_r1343984431


##
wicket-cdi/src/main/java/module-info.java:
##
@@ -24,6 +24,7 @@
 requires org.apache.wicket.request;
 requires org.apache.wicket.core;
 requires org.slf4j;
+requires static jakarta.servlet;

Review Comment:
   This change is not related to this commit.
   I reverted it once and everything was working.
   Now it is re-introduced silently again.





> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-29 Thread Andrea Del Bene (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770486#comment-17770486
 ] 

Andrea Del Bene commented on WICKET-7072:
-

[~gluser1357] yep! turning off module everything works fine. BTW I was the one 
who posted the question and the answer on StackOverflow :)

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-29 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770473#comment-17770473
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 opened a new pull request, #666:
URL: https://github.com/apache/wicket/pull/666

   Just before the weekend, here is the new PR for the updated branch which 
seems to run now for Eclipse and VSCode.
   
   See latest comments and test results on WICKET-7072.
   
   Thank you for testing and reviewing in different environments.




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
> Attachments: image-2023-09-29-16-51-36-563.png
>
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-29 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770449#comment-17770449
 ] 

Sam Peters commented on WICKET-7072:


Can you also translate the _useModulePath=false_ (that surfire uses) to your 
Run Configuration?

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-29 Thread Andrea Del Bene (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770445#comment-17770445
 ] 

Andrea Del Bene commented on WICKET-7072:
-

{quote}java.lang.IllegalAccessError: class 
org.junit.platform.launcher.core.LauncherFactory (in unnamed module 
@0x2d928643) cannot access class org.junit.platform.commons.util.Preconditions 
(in module org.junit.platform.commons) because module 
org.junit.platform.commons does not export org.junit.platform.commons.util to 
unnamed module @0x2d928643{quote}
 

I had the same issues. I've solved it adding this 2 --add-open params:
{quote}--add-opens=org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED
  
--add-opens=org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED
{quote}
However, now i'm stuck with another problem :
{quote}org.apache.wicket.WicketRuntimeException: Exception in rendering 
component: [HtmlHeaderContainer [Component id = _header_]]
    at 
org.apache.wicket.core/org.apache.wicket.Component.internalRenderComponent(Component.java:2534)
    at 
org.apache.wicket.core/org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1569)
    at 
org.apache.wicket.core/org.apache.wicket.Component.internalRender(Component.java:2317)
    at 
org.apache.wicket.core/org.apache.wicket.Component.render(Component.java:2248)
    at 
org.apache.wicket.core/org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1430)
    at 
org.apache.wicket.core/org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1630)
    at org.apache.wicket.core/org.apache.wicket.Page.onRender(Page.java:857)
    at 
org.apache.wicket.core/org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:126)
    at 
org.apache.wicket.core/org.apache.wicket.Component.internalRender(Component.java:2317)
    at 
org.apache.wicket.core/org.apache.wicket.Component.render(Component.java:2248)
    at org.apache.wicket.core/org.apache.wicket.Page.renderPage(Page.java:997)
    at 
org.apache.wicket.core/org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
    at 
org.apache.wicket.core/org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236)
    at 
org.apache.wicket.tester/org.apache.wicket.util.tester.BaseWicketTester$LastPageRecordingPageRendererProvider$1.respond(BaseWicketTester.java:2910)
    at 
org.apache.wicket.core/org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:202)
    at 
org.apache.wicket.core/org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:910)
    at 
org.apache.wicket.request/org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:63)
    at 
org.apache.wicket.core/org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:294)
    at 
org.apache.wicket.core/org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:255)
    at 
org.apache.wicket.core/org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:223)
    at 
org.apache.wicket.tester/org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:716)
    at 
org.apache.wicket.tester/org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:655)
    at 
org.apache.wicket.tester/org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:882)
    at 
org.apache.wicket.tester/org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:899)
    at 
org.apache.wicket.websocket.tester/org.apache.wicket.protocol.ws.tester.WebSocketTesterBehaviorTest.sendTextMessageBehavior(WebSocketTesterBehaviorTest.java:67)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: java.lang.IllegalArgumentException: resource 
res/js/wicket-websocket-setup.js.tmpl not found for scope class 
org.apache.wicket.protocol.ws.api.WicketWebSocketJQueryResourceReference (path 
= org/apache/wicket/protocol/ws/api/res/js/wicket-websocket-setup.js.tmpl)
    at 
org.apache.wicket.core/org.apache.wicket.util.template.PackageTextTemplate.load(PackageTextTemplate.java:210)
    at 
org.apache.wicket.core/org.apache.wicket.util.template.PackageTextTemplate.getString(PackageTextTemplate.java:255)
    at 
org.apache.wicket.core/org.apache.wicket.util.template.TextTemplate.asString(TextTemplate.java:72)
    at 
org.apache.wicket.websocket.core/org.apache.wicket.protocol.ws.api.BaseWebSocketBehavior.getWebSocketSetupScript(BaseWebSocketBehavior.java:121)
    at 
org.apache.wicket.websocket.core/org.apache.wicket.protocol.ws.api.BaseWebSocketBehavior.renderHead(BaseWebSocketBehavior.java:111)
    at 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-29 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770353#comment-17770353
 ] 

Sam Peters commented on WICKET-7072:


Seems to be this issue (you do a Run As JUnit, right?):
{quote}(As said, Run As JUnit... in Eclipse needs still needs an appropriate 
runtime configuration, the same way as for surefire. But it's actually beyond 
this issue...)
{quote}
Anyway, it would be nice to see a working runtime configuration here. 
[~bitstorm]: could you possibly help to investigate this?

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-29 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770326#comment-17770326
 ] 

Maxim Solodovnik commented on WICKET-7072:
--

Just tried to debug {{WebSocketTesterBehaviorTest}} got:

{code}
java.lang.IllegalAccessError: class 
org.junit.platform.launcher.core.LauncherFactory (in unnamed module 
@0x2d928643) cannot access class org.junit.platform.commons.util.Preconditions 
(in module org.junit.platform.commons) because module 
org.junit.platform.commons does not export org.junit.platform.commons.util to 
unnamed module @0x2d928643
at 
org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:128)
at 
org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:112)
at 
org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.(JUnit5TestLoader.java:37)
at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
NativeConstructorAccessorImpl.java:77
at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
DelegatingConstructorAccessorImpl.java:45
at 
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
Constructor.java:499
at 
java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
ReflectAccess.java:128
at 
java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
ReflectionFactory.java:347
at java.base/java.lang.Class.newInstance(Class.java:645)
Class.java:645
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:371)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:366)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:310)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:225)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
{code}

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-29 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770317#comment-17770317
 ] 

Sam Peters commented on WICKET-7072:


Thanks for testing!

The bug with wicket-native-websocket-tester should be solved now (reason was a 
missing JUnit non-test dependency).

[~solomax] and [~bitstorm]  Could you please update 
{{WICKET-7072-wicket-tester-and-core-tests-without-test-jar}} and check in 
Eclipse?

 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-28 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770298#comment-17770298
 ] 

Maxim Solodovnik commented on WICKET-7072:
--

Hello [~gluser1357],

I did some tests and here are the results:
* switch to {{WICKET-7072-wicket-tester-and-core-tests-without-test-jar}} 
branch at your fork
* run {{mvn clean install}} -> GREEN
* Download latest Eclipse JEE {{2023-09}}
* Import Maven project
* Wait for eclipse building/downloading is over -> {color:red}110 
Errors{color}: JUnit classes can't be resolved for 
{{wicket-native-websocket-tester}} project + some errors in 
{{wicket-core/.../wicket.xsd}} which, I believe, can be ignored
* Import into VSCode same result: {color:red}105 errors{color} in JUnit classes 
can't be resolved for {{wicket-native-websocket-tester}} 

VSCode is able to run tests! Congrats! :)))

I believe only one issue remain unaddressed!

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-28 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770180#comment-17770180
 ] 

Sam Peters commented on WICKET-7072:


Thanks for the hint!

[~bitstorm] and [~solomax], could you please test the new 
WICKET-7072-wicket-tester-and-core-tests-without-test-jar branch on 
[https://github.com/gluser1357/wicket-fork.git] and check for any compile or 
runtime errors in Eclipse and VSCode?

(As said, Run As JUnit... in Eclipse needs still needs an appropriate runtime 
configuration, the same way as for surefire. But it's actually beyond this 
issue...)

Thank you!

If everything is fine with that I'll create a PR.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-28 Thread Andrea Del Bene (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770161#comment-17770161
 ] 

Andrea Del Bene commented on WICKET-7072:
-

{quote}_java.util.MissingResourceException: Unable to find property: 
'Form.CSS.hidden-fields' for component: form_
{quote}
Try to set 'Build Path' removing any filter on source folders. I had the same 
problem with _Form.CSS.hidden-fields,_ it turned out it was a .properties file 
from wicket-core project which wasn't copied to output folder.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-28 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770134#comment-17770134
 ] 

Sam Peters commented on WICKET-7072:


{quote}Which problems do you have with this?
{quote}
wicket-util > Run As JUnit: works.

wicket-core-tests > Run As JUnit: Likely the same few issues you have observed.

wicket-extensions > Run As JUnit: See upcoming:

In WICKET-7072-wicket-tester-and-core-tests:
 * Run As JUnit... does not work for wicket-extensions because of _Error 
occurred during initialization of boot layer java.lang.module.FindException: 
Module org.apache.wicket.util not found, required by org.apache.wicket.core_

In WICKET-7072-wicket-tester-and-core-tests-without-test-jar:
 * I found errors like the following, they seem to be related to missing 
(filtered-out) .html files (related to first point of your list):
 ** _java.util.MissingResourceException: Unable to find property: 
'Form.CSS.hidden-fields' for component: form_
 ** _org.apache.wicket.markup.MarkupNotFoundException: Can not determine 
Markup. Component is not yet connected to a parent._
 * I tried to include **.*html pattern to Build path > Source > /src/main/java 
and /src/test/java but this doesn't changed anything. How would I do that 
correctly? Alternatively, when I remove module-info.java, those errors 
disappear.
 * I found a few other issues (related to second point of your list) like
 ** _java.lang.reflect.InaccessibleObjectException: Unable to make field 
private java.lang.String 
org.apache.wicket.extensions.markup.html.repeater.data.table.Contact.firstName 
accessible: module org.apache.wicket.extensions does not "opens 
org.apache.wicket.extensions.markup.html.repeater.data.table" to module 
org.apache.wicket.core_
 ** _java.lang.reflect.InaccessibleObjectException: Unable to make field 
private final int java.lang.Integer.value accessible: module java.base does not 
"opens java.lang" to unnamed module @1dd92fe2_
 * I think these are related to the missing --add-opens that 
maven-surefire-plugin uses, but not Eclipse

*Summary:*
 * with WICKET-7072-wicket-tester-and-core-tests, Run As JUnit... doesn't run 
for projects that depend on wicket-util
 * with WICKET-7072-wicket-tester-and-core-tests-without-test-jar, Run As 
JUnit... runs for all projects
 * In both cases there are issues because of the configuration which 
maven-surefire-plugin but not Eclipse
(If Run As JUnit... can be approriately configured I wouldn't classify this 
issue as error of Eclipse since the outcome would be the same as with 
maven-surefire-plugin)

 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-28 Thread Andrea Del Bene (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770053#comment-17770053
 ] 

Andrea Del Bene commented on WICKET-7072:
-

{quote} * Eclipse Run As JUnit -> some tests still failed{quote}
Which problems do you have with this? When I tried to run test from 
wicket-core-test from WICKET-7072-wicket-tester-and-core-tests I had these two 
minor problems:
 * By default Eclipse put into output folder only *.class file filtering out 
*.html files. See 'Project -> Properties -> Java Build Path'.
 * As you reported Run configuration lacks JPMS parameters  specified by 
maven-surefire-plugin. See parent pom at line 1138

Hope this can help.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-28 Thread Andrea Del Bene (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770054#comment-17770054
 ] 

Andrea Del Bene commented on WICKET-7072:
-

{quote} * Eclipse Run As JUnit -> some tests still failed{quote}
Which problems do you have with this? When I tried to run test from 
wicket-core-test from WICKET-7072-wicket-tester-and-core-tests I had these two 
minor problems:
 * By default Eclipse put into output folder only *.class file filtering out 
*.html files. See 'Project -> Properties -> Java Build Path'.
 * As you reported Run configuration lacks JPMS parameters  specified by 
maven-surefire-plugin. See parent pom at line 1138

Hope this can help.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-28 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769952#comment-17769952
 ] 

Sam Peters commented on WICKET-7072:


{quote}After `false` in main wicket pom.xml:line 
1155 is changed to `true`
The build failed at `wicket-request` module
{quote}
What do you exactly mean with "the build"? For me, a "mvn clean install" of 
#660 runs without errors. Doesn't run that for you (new workspace, clean 
checkout)? Do you test in VSCode or Eclipse?

Good point is that _useModulePath_ ist set to false for _maven-surefire-plugin_ 
in the main wicket pom.xml. *Does anybody of the wicket developers know the 
reason for this?* (Maxim, the _useModulePath_ setting I talked about yesterday 
was another one for {_}maven-compiler-plugin{_}, required for wicket-core-test. 
Sorry for the confusion).

 

Now, to prove that, in general, the wicket project can be used *in Eclipse with 
no more compile errors* I decided to quickly created another branch 
WICKET-7072-wicket-tester-and-core-tests-without-test-jar on 
[https://github.com/gluser1357/wicket-fork.git]. To clarify:
 - WICKET-7072-wicket-tester-and-core-tests (PR #660, AFAIK currently still in 
review)
 -- mvn clean install -> no errors
 -- Eclipse IDE -> shows many compile errors
 -- Eclipse Run As JUnit -> tests failed
 - WICKET-7072-wicket-tester-and-core-tests-without-test-jar (no PR yet to not 
confusing people, I could create one)
 -- built on top of WICKET-7072-wicket-tester-and-core-tests - the difference 
is that I just refactored to *avoid test-jar* usage, see my comments 26/Sept/23
 -- mvn clean install -> no errors
 -- Eclipse IDE -> shows no compiler errors anymore
 -- Eclipse Run As JUnit -> some tests still failed. _But, according to the 
errors I see I'm quite sure that this is due to the missing adaptions that are 
applied to maven-surefire-plugin but not applied when using Run As JUnit. I 
think if Run As JUnit can be tweaked the same way as maven-surefire-plugin than 
all tests would run without errors. I haven't tested that because at the moment 
I really don't know how to do that._

[~solomax]: Could you please try 
WICKET-7072-wicket-tester-and-core-tests-without-test-jar and check if you 
still see compiler errors?

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-27 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769899#comment-17769899
 ] 

Maxim Solodovnik commented on WICKET-7072:
--

Hello [~gluser1357],

Unfortunately I'm not an expert :( I try to learn by example :)

After `false` in main wicket pom.xml:line 1155 
is changed to `true`

The build failed at `wicket-request` module

no chance to compile wicket-core/wicket-core-tests :(

OFFTOPIC: This JPMS is killing me :(
100% of tests are RED for Apache OpenMeetings in IDE (maybe I'll try to check 
it in IntellyJ IDEA ... not my favorite one)


> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-27 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769758#comment-17769758
 ] 

Sam Peters commented on WICKET-7072:


i set it to false to overcome the following problems (the same as you 
observe?), see comment 22/09/23:

 {quote}
- no module-info may be present to fix "The package org.apache.wicket conflicts 
with a package accessible from another module"
- useModulePath must be false in maven-compiler-plugin to fix "Can't compile 
test sources when main sources are missing a module descriptor"
(useModulePath is available in maven-compiler-plugin 3.11+, therefore I needed 
to change it's version from 3.10 to 3.11 in main pom.xml)
{quote}

Do you have ideas how module-info.test would offer alternative solutions? 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-27 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769721#comment-17769721
 ] 

Maxim Solodovnik commented on WICKET-7072:
--

[~gluser1357] Actually Maven doesn't report the errors due to surefire 
configured with {{}} set to {{false}}

The build is completly RED in case it is set to {{true}}

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-27 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769697#comment-17769697
 ] 

Sam Peters commented on WICKET-7072:


[~solomax] I think that one could add a module-info.test that may be used in 
maven-compiler/maven-surefire plugins. But I doubt that this solves this issue 
here. As you said, Maven itself doesn't report errors, so I don't see 
advantages here. And Eclipse AFAIK won't use it(?).

Fixes that IMO can solve the VSCode/Eclipse problems see in my comment from 
yesterday.

 

[~bitstorm] Thanks for reviewing :)

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-27 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769683#comment-17769683
 ] 

Maxim Solodovnik commented on WICKET-7072:
--

[~gluser1357] sorry for a little bit OFFTOPIC, but I wonder

Would it be possible to support {{module-info.[java|test]}} for {{test/java}} 
as shown for ex. here:

https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world.html

Maven supports it while Eclipse/VSCode doesn't :(

Almost all my tests are RED in IDE : (while Maven build is GREEN)

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-26 Thread Andrea Del Bene (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769188#comment-17769188
 ] 

Andrea Del Bene commented on WICKET-7072:
-

Sorry if you couldn't jump into this discussion earlier. I now it might sound 
frustrating working for a problem that in the end is a limit of Eclipse and not 
an actual issue for Wicket. Nonetheless considering how popular are Eclipse and 
VC I think we should continue to work on this issue as suggested by 
[~gluser1357] . I will add my review to #660 asap.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-26 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769080#comment-17769080
 ] 

Sam Peters commented on WICKET-7072:


[~mgrigorov]:
Thank you for your feedback. I understand your point of view. It's "only" an 
Eclipse/VSCode problem, not a gradle, maven or Intellij one.

As Eclipse developers, we wish that Wicket (that we use a lot because it's a 
real cool framework) is supported in Eclipse. The current code from master 
(10.0.0) is not (related to workspace resolution which is the normal, default 
case). Neither for developing own applications nor for developing Wicket code 
itself (both in Eclipse and VSCode).

We actually do not have problems in Eclipse with frameworks others than Wicket. 
Likely because of those frameworks neither use test-jar dependencies, nor put 
JUnit code in src/main/java (I agree that this actually should not be a problem 
since JUnit is a library as many others. But, it is also different than others 
in that way that maven tries to separate non-test code on /src/main/java from 
test code in /src/test/java, so there normally shouldn't be a reason to put 
JUnit code on /src/main/java). The latter problem can be solved with merging of 
the current state of #660.

Concerning the first (test-jar) problem in this context, I found that we can 
easily get rid of test-jar, introduced (the first time ever in Wicket?) in the 
branches relevant for this issue WICKET-7072. Thus, I, as Eclipse developer, 
_wish to not include test-jars_ for this issue _because I see no need to use 
it_ (see the suggested changes I listed above).
{quote}adding more changes in the same branch will make it even harder to 
review.
{quote}
I see. We could break up the changes into following PRs:
 * #660 (separation from JUnit code from wicket-core /src/main/java, ...) - 
required for Eclipse (for application development)
 * new one (revert test-jar from wicket-util) - required for Eclipse (Wicket 
code development), see suggested changes above
 * new one (rat-plugin) - replace ApacheLicenseHeaderTestCase by existing 
plugin (as suggested by [~solomax])

I'd be happy if current state of #660 could be merged after reviews have been 
finished.

For the two new suggested PRs I can support by writing the PRs (based on #660).

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-26 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769069#comment-17769069
 ] 

Maxim Solodovnik commented on WICKET-7072:
--

Both VSCode and Eclipse doesn't support {{module-info.test}} :(


> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-26 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769027#comment-17769027
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

{quote}I could do these fixes today in 
gluser1357:WICKET-7072-wicket-tester-and-core-tests, or do you want to continue?
{quote}
I was hoping for some more feedback from more people.

As I said before - there is no much interest in JPMS in the community... No one 
said anything at 
[https://lists.apache.org/thread/rkmcf1tk51sw8vkfy7hpm7gmhj3h9c62] and 
[https://lists.apache.org/list.html?d...@wicket.apache.org]

The PR already touches 2400 files (mostly moved tests from one module to 
another) and adding more changes in the same branch will make it even harder to 
review.

 
{quote}Eclipse support the "normal" way of doing quite well but has, for 
example, serious problems with a) test-jar dependencies and b) JUnit-related 
code in /src/main/java
{quote}
I don't know whether you know that but Eclipse is based on OSGi. It is 
understandable that it does not (want to) support JPMS well.

 
{quote}Eclipse does not support test-jar dependencies
{quote}
test-jar is a Maven thing.

Gradle supports it via "classifier:tests".

Intellij IDEA supports both without issues!

Eclipse does not!

I think it is an Eclipse issue. No need to change all of the above because 
Eclipse is lacking behind.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-26 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769020#comment-17769020
 ] 

Sam Peters commented on WICKET-7072:


{quote}VSCode uses Eclipse jar to do the job
{quote}
That's interesting. It would explain why the same errors are shown.

{quote}I'll double-check #660 with my VSCode ...
{quote}
JPMS requires, in my experience, still a lot of trial and error. What I learned 
is that, in my cases, Eclipse support the "normal" way of doing quite well but 
has, for example, serious problems with a) test-jar dependencies and b) 
JUnit-related code in /src/main/java. Currently, b) is no more relevant in #660 
but a) still is.

Thus, #660 will likely show errors in VSCode right now. IMO, the observed 
issues can be solved with the doings from my comments yesterday.

[~mgrigorov] I could do these fixes today in 
gluser1357:WICKET-7072-wicket-tester-and-core-tests, or do you want to continue?

 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17769000#comment-17769000
 ] 

Maxim Solodovnik commented on WICKET-7072:
--

As I understand from this ticket: 
https://github.com/redhat-developer/vscode-java/issues/881
VSCode uses Eclipse jar to do the job :(

So far I was unable to make JPMS work for both main/java and test/java in the 
same module :(

I'll double-check #660 with my VSCode ...

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768689#comment-17768689
 ] 

Sam Peters commented on WICKET-7072:


{quote}Please test the branch and report any issues!
{quote}
What exactly should I test?

In [https://github.com/apache/wicket/pull/660] I see that WebSocketTester moved 
(see my question above), but no changes in test-jar | WellformedXmlTestCase | 
ApacheLicenseHeaderTestCase | rat-plugin.

Thank you for some clarification...

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768684#comment-17768684
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

WebSocketTester is the same for WebSocket  as WicketTester is for HTTP.

WebSocketTester depends on WicketTester so the dependency to JUnit is 
transitive.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768678#comment-17768678
 ] 

Sam Peters commented on WICKET-7072:


Thanks!

Why do you need an extra wicket-native-websocket-tester module? For 
WebSocketTester, I find only usages within /src/test/java of the same module 
(wicket-native-websocket-core). If reusage would matter, WebSocketTester could 
also be just moved to /src/main/java (no JUnit references).

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768675#comment-17768675
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

wicket-native-websocket-tester module is done!

Please test the branch and report any issues!

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768661#comment-17768661
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

I pushed some improvements!

I also need to force-push to resolve a conflict in AjaxRequestHandlerTest ...

TODO: introduce wicket-native-websocket-tester module and move WebSocketTester 
into it.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768588#comment-17768588
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

{quote} WellformedXmlTestCase can be moved back to /src/main/java
{quote}
Sounds good!

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768587#comment-17768587
 ] 

Sam Peters commented on WICKET-7072:


{quote}maven-rat-plugin won't replace the WelformedXmlTestCase, so we will 
still need the test-jar dependency to wicket-util in the other modules.
{quote}
IMO, WellformedXmlTestCase can be moved back to /src/main/java. I just moved it 
to /src/test/java because of the one @Test annotation. But actually we can 
remove this annotation because it is redundant - at least in all wicket modules 
since all classes that extend WellformedXmlTestCase already add @Test at 
markupFiles() themselves. Other users that might use WellformedXmlTestCase 
would have to do it the same way in their test classes (maybe a hint in the 
release notes would be a good idea for this edge case?).

> I think [https://github.com/apache/wicket/pull/660] is the right approach. I 
> started looking into it but it has 2000+ changed files and using Github UI 
> won't do it.
> I will checkout your branch locally and review it! I may also make 
> improvements if this is OK with you !

Yes, of course, thanks for asking!

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768578#comment-17768578
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

maven-rat-plugin won't replace the WelformedXmlTestCase, so we will still need 
the test-jar dependency to wicket-util in the other modules.

 

I think [https://github.com/apache/wicket/pull/660] is the right approach. I 
started looking into it but it has 2000+ changed files and using Github UI 
won't do it. I will checkout your branch locally and review it! I may also make 
improvements if this is OK with you !

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-25 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768573#comment-17768573
 ] 

Sam Peters commented on WICKET-7072:


[~solomax] Thanks for testing! Now, ApacheLicenseHeaderTestCase in wicket-util 
is made visible to other libs as test-jar, and I guess that VSCode might have 
the same problem of being unable to resolve test-jar dependencies in your 
workspace like Eclipse IDE, see 
[https://github.com/eclipse-m2e/m2e-core/issues/1560]. At least the error 
message shown in Eclipse is exactly the same: {_}The type 
org.apache.wicket.util.license.ApacheLicenseHeaderTestCase is not accessible{_}.

[~mgrigorov]: The PR you started to review 
([https://github.com/apache/wicket/pull/659]) also uses test-jar, in contrast 
to ([https://github.com/apache/wicket/pull/660]).

I'd suggest the following:
 * finish reviewing [https://github.com/apache/wicket/pull/660] (as work in 
progress of [https://github.com/apache/wicket/pull/659])
 * decide to go with [https://github.com/apache/wicket/pull/660]
 * decide to go with apache-rat-plugin

With these two decisions made, we could get rid of test-jar in wicket-util. All 
problems in Eclipse and VSCode should be solved then. Upcoming TODO's would 
then be:
 * replace ApacheLicenseHeaderTestCase by apache-rat-plugin
 * remove ApacheLicenseHeaderTestCase and ApacheLicenseHeaderTestCase from 
wicket-util
 * remove the @Test annotation in 
org.apache.wicket.util.markup.xhtml.WellFormedXmlTestCase.java in 
/src/main/java (the annotation is already present in all extending classes)
 * move WellFormedXmlTestCase to /src/main/java again
 * remove test-jar adaptions in wicket-util (pom.xmls of wicket-util and all 
dependent wicket modules)

What do you think? _(if apache-rat-plugin cant be used for whatever reason, 
ApacheLicenseHeaderTestCase could be used further. To get rid of test-jar in 
this case, one could adapt ApacheLicenseHeaderTestCase and 
WellFormedXmlTestCase as described in my comment on 19/Sep/2023 and move back 
it's code again to /src/main/java)._

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-24 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768479#comment-17768479
 ] 

Maxim Solodovnik commented on WICKET-7072:
--

Hello [~gluser1357],

Just have checked both branches:
 - both have 2k+ problems reported

Lot's of:
{code}
"message": "The type 
org.apache.wicket.util.license.ApacheLicenseHeaderTestCase is not accessible",
{code}

might be resolved using {code}apache-rat-plugin{code}

I'll try to check what can be done (later this week)

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-22 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17768121#comment-17768121
 ] 

Sam Peters commented on WICKET-7072:


{quote}VSCode also reports 2k+ error after opening Wicket :(
{quote}
[~solomax] Could you please check if VSCode still reports problems with one of 
the two PRs ([https://github.com/apache/wicket/pull/659], 
[https://github.com/apache/wicket/pull/660])?

If yes, it would helpful to know what errors are reported. Thanks!

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-22 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767997#comment-17767997
 ] 

Sam Peters commented on WICKET-7072:


{quote}Now the idea is to:

move WicketTester and Co in wicket-tester module
move all tests from wicket-core/src/test/java to wicket-core-tests module that 
depends on wicket-tester (the dependency to wicket-core will be transitive). 
wicket-core-tests should not be published to Maven Central.
{quote}
Ok, I finally finished the one you suggested: 
[https://github.com/apache/wicket/pull/660] 

Some remarks:
 * The code builds up on [https://github.com/apache/wicket/pull/659], so the 
things mentioned in my latest comment should be reviewed
 * it is sufficient to include wicket-tester in addition to e. g. 
wicket-extensions:

{code:java}
  
    
  org.apache.wicket
  wicket-extensions
  10.0.0-M2-SNAPSHOT
    
    
  org.apache.wicket
  wicket-tester
  10.0.0-M2-SNAPSHOT
  test   
    
  {code}
 * _wicket-core_
 ** has no more test code in /src/test/java
 * _wicket-tester_
 ** contains the code from wicket-core 
(/src/main/java/org/apache/wicket/util/tester)
 ** depends on wicket-core
 * _wicket-core-tests_
 ** contains the code from wicket-core (/src/test/java)
 ** depends on wicket-tester (and transitively wicket-core)
 ** testing wicket-core-tests requires two things (added as comments in 
pom.xml):
 *** no module-info may be present to fix "The package org.apache.wicket 
conflicts with a package accessible from another module"
 *** useModulePath must be false in maven-compiler-plugin to fix "Can't compile 
test sources when main sources are missing a module descriptor"
(useModulePath is available in maven-compiler-plugin 3.11+, therefore I needed 
to change it's version from 3.10 to 3.11 in main pom.xml)
 * in _all other wicket modules that need testers from wicket-tester_ (e. g. 
WicketTester), wicket-core must be additionally added because wicket-tester 
dependency is only of scope test and wicket-core is thus not added 
transitively. Otherwise we'd have issues like "module not found: 
org.apache.wicket.util, ..."

Now, when comparing this solution with the one yesterday, the tester dependency 
is a bit more intuitive. Drawback is the splitting of code from one into three 
libs.

[~mgrigorov]: I'd like you to ask for reviewing, testing and making a decision 
which one should make it into master (as Eclipse developer I hope at least one 
will make it ;)). Thank you!

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767996#comment-17767996
 ] 

ASF GitHub Bot commented on WICKET-7072:


gluser1357 opened a new pull request, #660:
URL: https://github.com/apache/wicket/pull/660

   Here another one (still not a release canditate, see WICKET-7072) with 
wicket tester and core tests libs.




> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-21 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767591#comment-17767591
 ] 

Sam Peters commented on WICKET-7072:


{quote}wicket-core should not depend on wicket-tester.
{quote}
Yes.
{quote}Now the idea is to:
 * move WicketTester and Co in wicket-tester module
 * move all tests from wicket-core/src/test/java to wicket-core-tests module 
that depends on wicket-tester (the dependency to wicket-core will be 
transitive). wicket-core-tests should not be published to Maven Central.{quote}
As interim result I want to introduce another solution (which I have already 
successfully tested): [https://github.com/apache/wicket/pull/659] 
 * it solves the initial issue of WICKET-7072 in Eclipse IDE
 * it separates outstanding JUnit code from /src/main/java
 * it requires no additional libs (wicket-tester, wicket-core-tests)

For this solution I basically followed your refactoring procedure applied to 
wicket-util ([https://github.com/apache/wicket/pull/653], 
[https://github.com/apache/wicket/pull/657])
 * move packages with JUnit code (in particular 
org/apache/wicket/util/tester/**) from /src/main/java to /src/test/java
 * exclude exports of these packages in module-info
 * remove JUnit module in module-info
 * change JUnit scope from compile to test in pom.xml
 * add test-jar goal in pom.xml of wicket-core (together with an include filter 
to publish the refactored classes from /src/main/java)
 * add new dependency section in main pom.xml

There were also a few further adaptions required that should be reviewed:
 * _wicket-core:_ org.apache.wicket.protocol.http.mock.MockHttpSession could be 
moved in my opionion also to /src/test/java. There is one issue in invalidate() 
that I couldn't solve, I think it's uncritical: attributes.get("wicket:" + 
BaseWicketTester.TestFilterConfig.class.getName())
 * _wicket-extensions:_ 
org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanelTester was moved 
to /src/test/java
 * _wicket-guice:_ module-info: added requires org.apache.wicket.request
 * _wicket-native-websocket:_ org.apache.wicket.protocol.ws.util.tester was 
moved to /src/test/java, export also excluded on module-info
 * _wicket-spring:_ jakarta.inject dependency added in pom.xml (otherwise tests 
didn't run)
 * wicket-spring: 
org.apache.wicket.spring.injection.bytebuddy.ParallelInjectionTest: removed the 
slf4j import and two LOG.debug()
 * {_}wicket-util{_}: added a filter for test-jar goal to filter the required 
contents (this is actually optional and can be removed again)
 * _wicket-tester:_ added as module (this is only experimental for wrapping the 
upcoming test-jar dependency to just wicket-tester, experiments following, see 
below)

Running a mvn install of the main project shows no errors when building locally.

For me, this PR solve the issue WICKET-7072.

 

*Further steps:*

When releasing this PR, developers using WicketTester (or other testers) would 
need to add wicket-core:jar:test-jar:test, and if required also 
junit-jupiter-engine:jar:test. E. g.
{code:java}

  
org.apache.wicket
wicket-extensions
10.0.0-M2-SNAPSHOT
  
  
org.apache.wicket
wicket-core
10.0.0-M2-SNAPSHOT
test-jar
test
  
  
org.junit.jupiter
junit-jupiter-engine
5.10.0
test
  

{code}
Unfortunately this setup can't be simplified by "just" supplying a wrapper 
module, like wicket-tester:jar wrapping wicket-core:test-jar, since the 
test-scoped code of wicket-core would not be available (you can try it out in 
my PR code by changing wicket-core:jar:test-jar to wicket-tester:jar in e. g. 
wicket-extensions pom.xml).

I guess, to improve this setup, the idea in your latest post would come into 
play, see also the "preferred way" described in 
[https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html|https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html.].
 Thank you for your idea, in my opinion it would solve the dependency cycle 
issue.

I look forward for feedback and/or review of my code :). In particular if we 
really need the described setup simplifications.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-21 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767393#comment-17767393
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

wicket-core should not depend on wicket-tester.

Until now WicketTester.java and Co lived in wicket-core, so that it can be used 
for its tests (wicket-core/src/test/java). It has worked well for 20-ish years 
:) Now with JPMS some users (you! :)) have issues with JUnit being on the main 
classpath, err... module-path.

Now the idea is to:
 * move WicketTester and Co in wicket-tester module
 * move all tests from wicket-core/src/test/java to wicket-core-tests module 
that depends on wicket-tester (the dependency to wicket-core will be 
transitive). wicket-core-tests should not be published to Maven Central.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-20 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767166#comment-17767166
 ] 

Sam Peters commented on WICKET-7072:


_Short Update:_

After fighting Eclipse's FindExceptions I restarted a new multimodule maven 
project, consisting of modules util, tester, core and project to imitate the 
essential wicket structure (wicket-util, the new wicket-tester, wicket-core and 
another module depending on wicket-core). See 
[https://github.com/gluser1357/eclipseissues/tree/eclipse-tests-with-tester-lib].
 This seems finally to work without errors in Eclipse, and without cycles. I'll 
try to go on now with building up wicket-tester.

Meanwhile, it would be great if there is a Eclipse user reading here who could 
try to reproduce my findings in the two projects:
[https://github.com/gluser1357/eclipseissues/tree/eclipse-test-jar-issues]
[https://github.com/gluser1357/eclipseissues/tree/eclipse-tests-with-tester-lib]

Now, because of the observed bad support of test-jar dependencies in Eclipse 
(see my latest comment), we'll possibly need a second tester jar, e. g. 
wicket-util-tester, _instead_ of the introduced wicket-util of type test-jar. 
Otherwise I don't think that we get the whole thing running in Eclipse in the 
foreseeable future (the JPMS related Eclipse ticket that I linked previously is 
over three years old, I don't know if and when this will ever be fixed...). Of 
course I could support here.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-20 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767026#comment-17767026
 ] 

ASF subversion and git services commented on WICKET-7072:
-

Commit e8703a79fdd0857d729232555b236ad792126f69 in wicket's branch 
refs/heads/master from gluser1357
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=e8703a79fd ]

WICKET-7072 remove junit from wicket-util main (#657)

Co-authored-by: gluser1357 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-20 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767044#comment-17767044
 ] 

Sam Peters commented on WICKET-7072:


Thank you for merging!

Now, while trying to build the new wicket-tester lib I stumbled over

_One or more cycles were detected in the build path of project 'wicket-core'. 
The paths towards the cycle and cycle are: ->\{wicket-core, wicket-tester}_

In fact, wicket-core requires wicket-tester (e. g. WicketTester) which requires 
wicket-core (e. g. WebPage). I tested different scopes already but that didn't 
make a difference. I'm stuck on how to resolve this. (Some ideas are here 
[https://stackoverflow.com/questions/16468525/how-to-resolve-cyclic-dependency-in-maven,]
 but that seems not that easy...).

Alternatively I'm trying right now the test-jar approach for wicket-core 
(optionally with inclusion of only the files copied from /src/main/java) which 
does not require the extra wicket-tester lib. But at this point I'm fighting 
with new Eclipse bugs :/

Any help is appreciated!

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-20 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17767070#comment-17767070
 ] 

Sam Peters commented on WICKET-7072:


I was a bit too optimistic concerning Eclipse... dependencies of type 
_test-jar_ are not really supported. See here for reproducable test code and 
error descriptions:

[https://github.com/gluser1357/eclipseissues/tree/eclipse-test-jar-issues|https://github.com/gluser1357/eclipseissues/tree/eclipse-test-jar-issues.]

The test case does not depend on Wicket, only plain maven projects and JUnit.

If we'd found a solution for removing the dependency cycle I could try...

 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-19 Thread Sam Peters (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766920#comment-17766920
 ] 

Sam Peters commented on WICKET-7072:


That's great, thank you!

Missing changes for wicket-util (see my latest comment above) see 
[https://github.com/apache/wicket/pull/657.]

Changes for wicket-core coming up...

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-19 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766889#comment-17766889
 ] 

Martin Tzvetanov Grigorov commented on WICKET-7072:
---

I merged the PR.

Feel free to proceed with the next tasks!

Otherwise I can do it when I have time.

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTesterExtension.java]
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-19 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766885#comment-17766885
 ] 

ASF subversion and git services commented on WICKET-7072:
-

Commit 812f227218d1dc6dc9765af6a7792a3be8b39298 in wicket's branch 
refs/heads/master from Martin Grigorov
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=812f227218 ]

 WICKET-7072 Move AbstractLicenseHeaderTestCase from wicket-util src/main to 
src/test (#654)

* WICKET-7072 Move AbstractLicenseHeaderTestCase from wicket-util src/main to 
src/test

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Make wicket-util:test-jar test scoped

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Add wicket-util:test-jar as a test dependency to -spring and 
-velocity

Signed-off-by: Martin Tzvetanov Grigorov 

* WICKET-7072 Move AbstractLicenseHeaderTestCase from wicket-util src/main to 
src/test

Signed-off-by: Martin Tzvetanov Grigorov 

* Fix the build - JDK 21 has been released

Signed-off-by: Martin Tzvetanov Grigorov 

-

Signed-off-by: Martin Tzvetanov Grigorov 

> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> 

[jira] [Commented] (WICKET-7072) JUnit code in /src/main/java breaks JPMS support in Eclipse IDE

2023-09-19 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766798#comment-17766798
 ] 

ASF subversion and git services commented on WICKET-7072:
-

Commit 96937a91715db407d1d5c9866b224fd310b318d1 in wicket's branch 
refs/heads/WICKET-7072-JUnit-in-main from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=96937a9171 ]

WICKET-7072 Move AbstractLicenseHeaderTestCase from wicket-util src/main to 
src/test

Signed-off-by: Martin Tzvetanov Grigorov 


> JUnit code in /src/main/java breaks JPMS support in Eclipse IDE
> ---
>
> Key: WICKET-7072
> URL: https://issues.apache.org/jira/browse/WICKET-7072
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket-core
>Affects Versions: 10.0.0-M1
>Reporter: Sam Peters
>Priority: Major
>
> In Wicket 10, the wicket-core and wicket-util jars contain JUnit-related 
> code, see class list below.
> The problem:
>  * When creating a new modular (JPMS) maven project by adding __ just 
> _org.apache.wicket.commons.fileupload_ ({_}not containing{_} JUnit code) in 
> {_}module-info{_}, projects run fine in Eclipse IDE (2023-06). I supplied a 
> quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-without-junit-code], 
> see readme.txt.
>  * In contrast, when creating a new modular project by adding 
> {_}org.apache.wicket.util{_}" ({_}containing{_} JUnit code), Eclipse fails in 
> different ways, see wicket quickstarter at 
> [https://github.com/gluser1357/jerseyissues/tree/main-with-junit-code-error], 
> see readme.txt.
>  ** If JUnit is kept with usual _test_ (pom.xml) and not added 
> via _requires org.junit.jupiter.api_ in module-info.java, one of the 
> following errors occur when running code (see readme.txt for more details):
>  *** _java.lang.module.FindException: Module org.junit.jupiter.api not found, 
> required by org.apache.wicket.util_
>  *** _java.lang.Error: Unresolved compilation problem: "The type 
> org.junit.jupiter.api.Test is not accessible"_
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
>  ** After correcting the missing module and dependency by removing 
> _test_ (pom.xml) and adding a _requires org.junit.jupiter.api_ 
> in module-info.java (which is, as far as I know, actually untypical), own 
> code in _/src/test/java_ and _/src/main/java_ runs now, but own JUnit tests 
> can still not be executed via "Run As JUnit Test" in Eclipse because of
>  *** _java.lang.IllegalAccessError: class 
> org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module 
> @0x5f341870) cannot access class 
> org.junit.platform.commons.logging.LoggerFactory (in module 
> org.junit.platform.commons) because module org.junit.platform.commons does 
> not export org.junit.platform.commons.logging to unnamed module @0x5f341870_  
>  
> In my opinion, the JUnit-related code below shouldn't be contained in 
> _/src/main/java_ which is a) quite untypical and b) results in problems of 
> common IDEs like Eclipse.
> *Would it be possible to*
>  * *move the related Wicket classes (see list below) out of 
> {_}/src/main/java{_}, e. g. to _/src/test/java_ and*
>  * *remove _requires org.junit.jupiter.api_ from both module-info?*
> This would avoid these problems in Eclipse IDE for JPMS-based projects that 
> want to integrate Wicket.
> =
> The relevant classes are:
>  * in wicket-util:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/license/ApacheLicenseHeaderTestCase.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java]
>  * in wicket-core:
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/DiffUtil.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java]
>  ** 
> [https://github.com/apache/wicket/blob/rel/wicket-10.0.0-M1/wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTestCase.java]
>  ** 
> 

  1   2   >