This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/tomcat-maven-plugin.git
The following commit(s) were added to refs/heads/trunk by this push:
new 7a53e5f Fix Maven group and skip signatures
7a53e5f is described below
commit 7a53e5f175789f558481a73934f19ccf5287e6cd
Author: remm <[email protected]>
AuthorDate: Tue Apr 14 11:02:26 2026 +0200
Fix Maven group and skip signatures
Add connect to server in the verify script.
---
src/it/simple-war-exec-project/verify.bsh | 36 ++++++++++++++++++++++
.../plugin/tomcat/run/AbstractExecWarMojo.java | 6 +++-
.../tomcat/run/AbstractStandaloneWarMojo.java | 4 +--
3 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/src/it/simple-war-exec-project/verify.bsh
b/src/it/simple-war-exec-project/verify.bsh
index 6cfb56b..37e413e 100644
--- a/src/it/simple-war-exec-project/verify.bsh
+++ b/src/it/simple-war-exec-project/verify.bsh
@@ -19,6 +19,7 @@
*/
import java.io.*;
+import java.net.*;
import java.util.*;
import java.util.jar.*;
@@ -80,6 +81,41 @@ try
return false;
}
+ jar.close();
+
+ System.err.println( "Starting Tomcat from: " + new File( basedir, "target"
).getAbsolutePath() );
+
+ Process process = Runtime.getRuntime().exec( "java -jar " +
artifact.getAbsolutePath(), null, new File( basedir, "target" ) );
+
+ Thread.sleep( 15000 );
+
+ try
+ {
+ HttpURLConnection connection = (HttpURLConnection) new URL(
"http://localhost:8088/foo" ).openConnection();
+ connection.setConnectTimeout( 5000 );
+ connection.setRequestMethod( "GET" );
+
+ int status = connection.getResponseCode();
+
+ System.err.println( "HTTP Status: " + status );
+
+ if ( status != 200 )
+ {
+ System.err.println( "Expected HTTP 200, got " + status );
+ result = false;
+ }
+
+ connection.disconnect();
+ }
+ catch ( Exception e )
+ {
+ System.err.println( "Failed to connect to Tomcat: " + e.getMessage() );
+ e.printStackTrace();
+ result = false;
+ }
+
+ process.destroy();
+
}
catch( Throwable e )
{
diff --git
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractExecWarMojo.java
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractExecWarMojo.java
index e45d976..d9c8b85 100644
---
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractExecWarMojo.java
+++
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractExecWarMojo.java
@@ -389,7 +389,7 @@ if ( version == null || version.isEmpty() )
{
if ("org.apache.tomcat".equals(pluginArtifact.getGroupId()) //
||
"org.apache.tomcat.embed".equals(pluginArtifact.getGroupId()) //
- ||
"org.eclipse.jdt.core.compiler".equals(pluginArtifact.getGroupId()) //
+ ||
"org.eclipse.jdt".equals(pluginArtifact.getGroupId()) //
||
"commons-cli".equals(pluginArtifact.getArtifactId()) //
||
"tomcat-maven-plugin".equals(pluginArtifact.getArtifactId())) {
JarFile jarFile = new JarFile( pluginArtifact.getFile() );
@@ -664,6 +664,10 @@ if ( version == null || version.isEmpty() )
{
continue;
}
+ if (j.getName().startsWith("META-INF/") &&
+ (j.getName().endsWith(".SF") ||
j.getName().endsWith(".DSA") || j.getName().endsWith(".RSA"))) {
+ continue;
+ }
os.putArchiveEntry( new JarArchiveEntry( j.getName() ) );
IOUtils.copy( file.getInputStream( j ), os );
os.closeArchiveEntry();
diff --git
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractStandaloneWarMojo.java
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractStandaloneWarMojo.java
index 38f73c7..3d1f823 100644
---
a/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractStandaloneWarMojo.java
+++
b/src/main/java/org/apache/tomcat/maven/plugin/tomcat/run/AbstractStandaloneWarMojo.java
@@ -175,9 +175,9 @@ public abstract class AbstractStandaloneWarMojo
// add tomcat classes
for ( Artifact pluginArtifact : pluginArtifacts )
{
-if ( "org.apache.tomcat".equals( pluginArtifact.getGroupId() ) //
+ if ( "org.apache.tomcat".equals( pluginArtifact.getGroupId() )
//
|| "org.apache.tomcat.embed".equals(
pluginArtifact.getGroupId() ) //
- || "org.eclipse.jdt.core.compiler".equals(
pluginArtifact.getGroupId() ) //
+ || "org.eclipse.jdt".equals(
pluginArtifact.getGroupId() ) //
|| "commons-cli".equals(
pluginArtifact.getArtifactId() ) //
|| "tomcat-maven-plugin".equals(
pluginArtifact.getArtifactId() ) )
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]