Skip to content

Commit

Permalink
WICKET-7072 wicket tester and core tests without test jar (#666)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* WICKET-7072 Update end year for Copyright to 2023

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

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

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* WICKET-7072 Cleanup pom.xml files

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

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

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

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

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* WICKET-7072 Fix the ApacheLicenceHeaderTest for wicket-core

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

---------

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Co-authored-by: sre <[email protected]>
Co-authored-by: gluser1357 <[email protected]>
Co-authored-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
4 people authored Oct 12, 2023
1 parent c17cd45 commit b0f3da3
Show file tree
Hide file tree
Showing 2,346 changed files with 25,412 additions and 24,973 deletions.
10 changes: 5 additions & 5 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache Wicket
Copyright 2006-2016 The Apache Software Foundation
Copyright 2006-2023 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Expand All @@ -15,7 +15,7 @@ NB: DO NOT ADD LICENSES/NOTICES/ATTRIBUTIONS TO THIS FILE, BUT IN THE
src/./wicket-guice
---------------------------------------------------------------------------
Apache Wicket
Copyright 2006-2012 Apache Software Foundation
Copyright 2006-2023 Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Expand All @@ -26,7 +26,7 @@ src/./wicket-guice
src/./wicket-examples
---------------------------------------------------------------------------
Apache Wicket Examples
Copyright 2006-2012 Apache Software Foundation
Copyright 2006-2023 Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Expand Down Expand Up @@ -66,7 +66,7 @@ src/./wicket-examples
src/./wicket-core
---------------------------------------------------------------------------
Apache Wicket
Copyright 2006-2012 Apache Software Foundation
Copyright 2006-2023 Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Expand Down Expand Up @@ -102,7 +102,7 @@ src/./wicket-metrics
---------------------------------------------------------------------------

Apache Wicket Metrics
Copyright 2006-2016 Apache Software Foundation
Copyright 2006-2023 Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Expand Down
13 changes: 10 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
<!-- wicket-eclipse-settings is separate released -->
<module>wicket</module>
<module>wicket-core</module>
<module>wicket-tester</module>
<module>wicket-core-tests</module>
<module>wicket-util</module>
<module>wicket-request</module>
<module>wicket-devutils</module>
Expand Down Expand Up @@ -184,7 +186,7 @@
<maven-archetype-plugin.version>3.2.1</maven-archetype-plugin.version>
<maven-bundle-plugin.version>5.1.8</maven-bundle-plugin.version>
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-deploy-plugin.version>3.1.0</maven-deploy-plugin.version>
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
<maven-enforcer-plugin.version>3.1.0</maven-enforcer-plugin.version>
Expand Down Expand Up @@ -374,6 +376,12 @@
<version>10.0.0-M2-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core-tests</artifactId>
<version>10.0.0-M2-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-devutils</artifactId>
Expand Down Expand Up @@ -582,9 +590,8 @@
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-util</artifactId>
<artifactId>wicket-tester</artifactId>
<version>10.0.0-M2-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion testing/wicket-js-tests/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module.exports = function(grunt) {
server: {
options: {
port: 38887,
// debug: true,
debug: true,
middleware: function(connect, options, middlewares) {
middlewares.unshift(function(req, res, next) {
if (req.url.indexOf('submitNestedForm') > 0) {
Expand Down
3 changes: 1 addition & 2 deletions wicket-auth-roles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-util</artifactId>
<type>test-jar</type>
<artifactId>wicket-tester</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package org.apache.wicket.authroles.util.license;

import org.apache.wicket.util.license.ApacheLicenseHeaderTestCase;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

/**
* Test that the license headers are in place in this project. The tests are run from
Expand All @@ -34,4 +36,18 @@ public ApacheLicenceHeaderTest()
// addHeaders = true;
htmlIgnore.add("src/main/java/org/apache/wicket/authroles/authentication/pages");
}

@BeforeEach
@Override
public void before()
{
super.before();
}

@Test
@Override
public void licenseHeaders()
{
super.licenseHeaders();
}
}
3 changes: 1 addition & 2 deletions wicket-bean-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-util</artifactId>
<type>test-jar</type>
<artifactId>wicket-tester</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package org.apache.wicket.bean.validation.util.license;

import org.apache.wicket.util.license.ApacheLicenseHeaderTestCase;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

/**
* Test that the license headers are in place in this project. The tests are run from
Expand All @@ -34,4 +36,19 @@ public ApacheLicenceHeaderTest()
// addHeaders = true;
htmlIgnore.add("src/main/java/org/apache/wicket/authroles/authentication/pages");
}

@BeforeEach
@Override
public void before()
{
super.before();
}

@Test
@Override
public void licenseHeaders()
{
super.licenseHeaders();
}

}
7 changes: 5 additions & 2 deletions wicket-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
<dependencies>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-util</artifactId>
<type>test-jar</type>
<artifactId>wicket-tester</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
Expand All @@ -50,6 +49,10 @@
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
Expand Down
1 change: 1 addition & 0 deletions wicket-cdi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
requires org.apache.wicket.request;
requires org.apache.wicket.core;
requires org.slf4j;
requires static jakarta.servlet;

exports org.apache.wicket.cdi;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Arrays;

import org.apache.wicket.util.license.ApacheLicenseHeaderTestCase;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

/**
* Test that the license headers are in place in this project. The tests are run
Expand All @@ -39,4 +41,19 @@ public ApacheLicenceHeaderTest()
xmlIgnore.add("src/test/java/simplelogger.properties");
xmlPrologIgnore = Arrays.asList("src");
}

@BeforeEach
@Override
public void before()
{
super.before();
}

@Test
@Override
public void licenseHeaders()
{
super.licenseHeaders();
}

}
1 change: 1 addition & 0 deletions wicket-core-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
95 changes: 95 additions & 0 deletions wicket-core-tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-parent</artifactId>
<version>10.0.0-M2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wicket-core-tests</artifactId>
<packaging>jar</packaging>
<name>Wicket Core Tests</name>
<description>
Internal JUnit Tests for Wicket Core (and Tester).
</description>
<properties>
<osgi.export.package>org.apache.wicket.core.tests*;-noimport:=true</osgi.export.package>
<osgi.import.package>!java*,!kotlin*,!sun.nio.ch,org.slf4j*;version="[1.7,3)",*</osgi.import.package>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-tester</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<!--
WICKET-7072:
To run this project successfully we need two things:
(1) no module-info,
otherwise error "The package org.apache.wicket conflicts with a package accessible from another module")
(2) useModulePath=false for maven-compiler plugin available for 3.11+ (see also WICKET-7019),
otherwise error "Can't compile test sources when main sources are missing a module descriptor")
see https://maven.apache.org/plugins/maven-compiler-plugin/plugin-info.html
-->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>test-compile</id>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<useModulePath>false</useModulePath>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file's name contains spaces to ensure proper decoding of MockServletContext#getRealPath()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// static test resource
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.apache.wicket.filetype.TestFileTypeDetector
Loading

0 comments on commit b0f3da3

Please sign in to comment.