Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: trivy

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '44 13 * * 0'

permissions:
contents: read

jobs:
trivy-scan:
name: Trivy Security Scan
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe
with:
scan-type: 'fs'
scan-ref: '.'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
12 changes: 8 additions & 4 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4-core</artifactId>
<packaging>jar</packaging>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
<name>FFMQ Core</name>
<description>FFMQ Core module</description>
<url>http://timewalker74.github.io/ffmq/</url>
Expand All @@ -25,7 +25,7 @@
<parent>
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4</artifactId>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
</parent>

<build>
Expand Down Expand Up @@ -95,6 +95,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -139,8 +142,9 @@
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.25.2</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4-distribution</artifactId>
<packaging>jar</packaging>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
<name>FFMQ Distribution</name>
<description>FFMQ Distribution module</description>
<url>http://timewalker74.github.io/ffmq/</url>
Expand All @@ -24,7 +24,7 @@
<parent>
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4</artifactId>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
</parent>

<build>
Expand Down Expand Up @@ -81,12 +81,12 @@
<dependency>
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4-tools</artifactId>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
</dependency>
<dependency>
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4-server</artifactId>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
</dependency>
</dependencies>
</project>
22 changes: 0 additions & 22 deletions distribution/src/main/resources/conf/ffmq-server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -173,25 +173,3 @@ consumer.prefetch.size=10
# Redelivery delay (in milliseconds)
# - If positive, delay message availability in queue after a rollback
delivery.redeliveryDelay=0


#--------------------------------#
# Logging #
#--------------------------------#

# Loggers definitions
log4j.logger.net.timewalker.ffmq4=INFO,logFile
log4j.additivity.net.timewalker.ffmq4=false

# Appenders definitions
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%5p] %m%n

log4j.appender.logFile=org.apache.log4j.RollingFileAppender
log4j.appender.logFile.File=${FFMQ_BASE}/logs/ffmq-server.log
log4j.appender.logFile.MaxFileSize=1000KB
log4j.appender.logFile.MaxBackupIndex=5
log4j.appender.logFile.Append=true
log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
log4j.appender.logFile.layout.ConversionPattern=%d{HHmmss} %5p [%c{1}]{%t} %m%n
25 changes: 17 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4</artifactId>
<packaging>pom</packaging>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
<name>FFMQ</name>
<description>FFMQ - Light-weight &amp; Fast JMS queuer</description>
<url>http://timewalker74.github.io/ffmq/</url>
Expand Down Expand Up @@ -100,21 +100,29 @@
</goals>
</execution>
</executions>
</plugin>
</plugins>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<failOnError>false</failOnError>
</configuration>
</plugin>
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.25.2</version>
<exclusions>
<exclusion>
<groupId>com.sun.jdmk</groupId>
Expand All @@ -137,6 +145,7 @@
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
Expand All @@ -146,7 +155,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
6 changes: 3 additions & 3 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4-server</artifactId>
<packaging>jar</packaging>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
<name>FFMQ Server</name>
<description>FFMQ Server module</description>
<url>http://timewalker74.github.io/ffmq/</url>

<parent>
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4</artifactId>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
</parent>

<build>
Expand Down Expand Up @@ -89,7 +89,7 @@
<dependency>
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4-core</artifactId>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
package net.timewalker.ffmq4.test;

import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;

Expand All @@ -22,8 +23,6 @@
import javax.jms.Topic;
import javax.jms.TopicConnection;

import org.apache.log4j.PropertyConfigurator;

import junit.framework.TestCase;
import net.timewalker.ffmq4.FFMQConstants;
import net.timewalker.ffmq4.common.destination.QueueRef;
Expand All @@ -35,6 +34,9 @@
import net.timewalker.ffmq4.local.destination.LocalQueue;
import net.timewalker.ffmq4.local.destination.LocalTopic;
import net.timewalker.ffmq4.utils.Settings;
import org.apache.logging.log4j.core.LoggerContext;

import static org.apache.logging.log4j.core.config.Configurator.initialize;

/**
* AbstractQueuerTest
Expand Down Expand Up @@ -120,12 +122,18 @@ protected void setUp() throws Exception
FileInputStream in = new FileInputStream(ffmqBase+"/conf/ffmq-server.properties");
testSettings.load(in);
in.close();

if (!log4jConfigured)
{
PropertyConfigurator.configure(testSettings);
log4jConfigured = true;
}

if (!log4jConfigured) {

File log4jConfigurationFile = new File(ffmqBase+"/conf/ffmqLog4j.xml");
String log4jConfigurationFileAbsolutePath = log4jConfigurationFile.getAbsolutePath();

if (log4jConfigurationFile.exists()) {
LoggerContext initialize = initialize(null, log4jConfigurationFileAbsolutePath);
log4jConfigured = initialize != null;
}

}

Settings settings = new Settings(testSettings);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;

import org.apache.log4j.spi.LoggingEvent;

import net.timewalker.ffmq4.FFMQConstants;
import org.apache.logging.log4j.core.LogEvent;

/**
* TestListenerClient
Expand Down Expand Up @@ -85,8 +83,8 @@ public void onMessage(Message msg)
if (msg instanceof ObjectMessage)
{
Object body = ((ObjectMessage) msg).getObject();
if (body instanceof LoggingEvent)
System.out.println(((LoggingEvent) body).getMessage());
if (body instanceof LogEvent)
System.out.println(((LogEvent) body).getMessage());
}
}
catch (Exception e)
Expand Down
6 changes: 3 additions & 3 deletions tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4-tools</artifactId>
<packaging>jar</packaging>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
<name>FFMQ Tools</name>
<description>FFMQ Tools</description>
<url>http://timewalker74.github.io/ffmq/</url>
Expand All @@ -25,7 +25,7 @@
<parent>
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4</artifactId>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
</parent>

<build>
Expand Down Expand Up @@ -101,7 +101,7 @@
<dependency>
<groupId>net.timewalker.ffmq</groupId>
<artifactId>ffmq4-core</artifactId>
<version>4.0.14</version><!--FFMQ_VERSION-->
<version>4.0.15</version><!--FFMQ_VERSION-->
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down