You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "sparsick (via GitHub)" <gi...@apache.org> on 2025/11/03 17:33:58 UTC
[PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
sparsick opened a new pull request, #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197
Also migrate AbstractMojoTestCase to MojoTest.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#issuecomment-3661689931
> I'm unsure what I should do with the test class `SiteDeployMojoTest`. For me, it appears that it can be deleted.
>
> @slawekjaranowski @olamy any opinion?
drop it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on code in PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#discussion_r2624179602
##########
pom.xml:
##########
@@ -478,7 +478,23 @@ under the License.
<version>${jettyVersion}</version>
<scope>test</scope>
</dependency>
-
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
Review Comment:
does still needed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#issuecomment-3676185308
please look at build result ... master branch is build ok, so after it also should be green
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "sparsick (via GitHub)" <gi...@apache.org>.
sparsick commented on code in PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#discussion_r2624229061
##########
src/test/java/org/apache/maven/plugins/site/deploy/SiteDeployWebDavWithoutAuthTest.java:
##########
@@ -0,0 +1,217 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.site.deploy;
+
+import javax.inject.Inject;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.maven.api.di.Provides;
+import org.apache.maven.api.plugin.testing.InjectMojo;
+import org.apache.maven.api.plugin.testing.MojoParameter;
+import org.apache.maven.api.plugin.testing.MojoTest;
+import org.apache.maven.execution.DefaultMavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugins.site.stubs.SiteMavenProjectStub;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.settings.Proxy;
+import org.apache.maven.settings.Settings;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Olivier Lamy
+ * @since 3.0-beta-2
Review Comment:
I will clean up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "sparsick (via GitHub)" <gi...@apache.org>.
sparsick commented on PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#issuecomment-3713676324
@slawekjaranowski build is fixed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on code in PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#discussion_r2624176204
##########
src/test/java/org/apache/maven/plugins/site/deploy/SiteDeployWebDavWithoutAuthTest.java:
##########
@@ -0,0 +1,217 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.site.deploy;
+
+import javax.inject.Inject;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.maven.api.di.Provides;
+import org.apache.maven.api.plugin.testing.InjectMojo;
+import org.apache.maven.api.plugin.testing.MojoParameter;
+import org.apache.maven.api.plugin.testing.MojoTest;
+import org.apache.maven.execution.DefaultMavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugins.site.stubs.SiteMavenProjectStub;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.settings.Proxy;
+import org.apache.maven.settings.Settings;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author Olivier Lamy
+ * @since 3.0-beta-2
Review Comment:
?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "sparsick (via GitHub)" <gi...@apache.org>.
sparsick commented on PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#issuecomment-3709960649
> please look at build result ... master branch is build ok, so after it also should be green
I rebased it locally, but it is not reproducible on my machine. Therefore, I start a rerun
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "sparsick (via GitHub)" <gi...@apache.org>.
sparsick merged PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "sparsick (via GitHub)" <gi...@apache.org>.
sparsick commented on PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#issuecomment-3481723924
I'm unsure what I should do with the test class `SiteDeployMojoTest`. For me, it appears that it can be deleted.
@slawekjaranowski @olamy any opinion?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "sparsick (via GitHub)" <gi...@apache.org>.
sparsick commented on code in PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#discussion_r2624231557
##########
pom.xml:
##########
@@ -478,7 +478,23 @@ under the License.
<version>${jettyVersion}</version>
<scope>test</scope>
</dependency>
-
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
Review Comment:
yes, without I will get following error:
```
com.google.inject.CreationException:
Unable to create injector, see the following errors:
1) An exception was caught and reported. Message: java.lang.reflect.InvocationTargetException
at org.apache.maven.api.plugin.testing.MojoExtension.lambda$beforeEach$1(MojoExtension.java:206) (via modules: org.apache.maven.api.plugin.testing.MojoExtension$$Lambda/0x00007c0af02a6a60 -> org.apache.maven.api.plugin.testing.MojoExtension$MavenProvidesModule)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:159)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:493)
at org.apache.maven.api.plugin.testing.MojoExtension.beforeEach(MojoExtension.java:204)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Suppressed: java.lang.IllegalStateException
at org.apache.maven.session.scope.internal.SessionScope.exit(SessionScope.java:107)
at org.apache.maven.api.plugin.testing.MojoExtension.afterEach(MojoExtension.java:260)
... 2 more
Caused by: java.lang.IllegalArgumentException: java.lang.reflect.InvocationTargetException
at org.apache.maven.api.plugin.testing.MojoExtension$MavenProvidesModule.configure(MojoExtension.java:616)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
at org.apache.maven.api.plugin.testing.MojoExtension.lambda$beforeEach$1(MojoExtension.java:206)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at com.google.inject.spi.Elements.getElements(Elements.java:96)
at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:77)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:137)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
... 7 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.apache.maven.api.plugin.testing.MojoExtension$MavenProvidesModule.configure(MojoExtension.java:610)
... 17 more
Caused by: java.lang.NoClassDefFoundError: junit/framework/TestCase
at org.apache.maven.plugin.testing.stubs.MavenProjectStub.getBasedir(MavenProjectStub.java:291)
at org.apache.maven.plugins.site.stubs.SiteMavenProjectStub.<init>(SiteMavenProjectStub.java:43)
at org.apache.maven.plugins.site.deploy.SiteDeployWebDavThruProxyWitAuthzInProxyTest.project(SiteDeployWebDavThruProxyWitAuthzInProxyTest.java:103)
... 19 more
Caused by: java.lang.ClassNotFoundException: junit.framework.TestCase
... 22 more
```
I will add a comment to explain it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: Migrate Junit3/4 to Junit5 [maven-site-plugin]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1197:
URL: https://github.com/apache/maven-site-plugin/pull/1197#issuecomment-3715412222
@sparsick Please assign appropriate label to PR according to the type of change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org