Skip to content

Commit

Permalink
Upgrade to Graylog 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jochen Schalanda authored and bernd committed Jul 26, 2017
1 parent b6a69b3 commit 0939ef1
Show file tree
Hide file tree
Showing 11 changed files with 318 additions and 321 deletions.
8 changes: 4 additions & 4 deletions .eslintrc
Expand Up @@ -2,9 +2,9 @@
"parser": "babel-eslint",
"ecmaFeatures": {
"classes": true,
"jsx": true
"jsx": true,
},
"extends": [
"graylog"
]
}
"graylog",
],
}
12 changes: 8 additions & 4 deletions .gitignore
@@ -1,14 +1,18 @@
out/
.idea/
*.iml
*.ipr
*.iws

.classpath
.project
.settings/

target/
dependency-reduced-pom.xml
pom.xml.releaseBackup
out/
node_modules
node
build
pom.xml.versionsBackup

node_modules/
node/
build/
4 changes: 2 additions & 2 deletions build.config.js
@@ -1,6 +1,6 @@
const path = require('path');

module.exports = {
// Make sure that this is the correct path to the web interface part of the Graylog server repository.
web_src_path: path.resolve(__dirname, '../graylog2-server/graylog2-web-interface'),
// Make sure that this is the correct path to the web interface part of the Graylog server repository.
web_src_path: path.resolve(__dirname, '../graylog2-server/graylog2-web-interface'),
};
11 changes: 5 additions & 6 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "AWSPlugin",
"version": "1.3.0",
"description": "",
"name": "graylog-plugin-aws",
"version": "2.3.0-SNAPSHOT",
"description": "Graylog plugins to integrate with different AWS services like CloudTrail and FlowLogs",
"repository": {
"type": "git",
"url": "https://github.com/graylog-plugin-aws"
Expand All @@ -14,9 +14,8 @@
],
"author": "Graylog, Inc. <hello@graylog.com>",
"license": "GPL-3.0",
"dependencies": {
},
"dependencies": {},
"devDependencies": {
"graylog-web-plugin": "file:../graylog2-server/graylog2-web-interface/packages/graylog-web-plugin"
}
}
}
215 changes: 75 additions & 140 deletions pom.xml
@@ -1,46 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<prerequisites>
<maven>3.0</maven>
</prerequisites>

<groupId>org.graylog.plugins</groupId>
<parent>
<groupId>org.graylog.plugins</groupId>
<artifactId>graylog-plugin-web-parent</artifactId>
<version>2.3.0</version>
</parent>

<artifactId>graylog-plugin-aws</artifactId>
<version>1.3.3-SNAPSHOT</version>
<version>2.3.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
<description>Graylog ${project.artifactId} plugin.</description>
<url>https://www.graylog.org</url>

<scm>
<connection>scm:git:git@github.com:${graylog.plugin-repo-name}.git</connection>
<developerConnection>scm:git:git@github.com:${graylog.plugin-repo-name}.git</developerConnection>
<url>https://github.com/${graylog.plugin-repo-name}</url>
<connection>scm:git:git@github.com:graylog-labs/graylog-plugin-aws.git</connection>
<developerConnection>scm:git:git@github.com:graylog-labs/graylog-plugin-aws.git</developerConnection>
<url>https://github.com/graylog-labs/graylog-plugin-aws</url>
<tag>HEAD</tag>
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.source.skip>true</maven.source.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
<maven.install.skip>true</maven.install.skip>
<maven.deploy.skip>true</maven.deploy.skip>
<maven.site.skip>true</maven.site.skip>
<graylog2.version>2.2.2</graylog2.version>
<graylog2.plugin-dir>/usr/share/graylog-server/plugin</graylog2.plugin-dir>
<graylog.plugin-repo-name>Graylog2/graylog-plugin-aws</graylog.plugin-repo-name>
<graylog.version>2.3.0</graylog.version>
<aws-java-sdk.version>1.11.98</aws-java-sdk.version>
</properties>

<dependencies>
<dependency>
<groupId>org.graylog2</groupId>
<artifactId>graylog2-server</artifactId>
<version>${graylog2.version}</version>
<version>${graylog.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -112,7 +113,13 @@
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>1.3</version>
<version>${auto-value.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service</artifactId>
<version>${auto-service.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -125,20 +132,42 @@

<build>
<resources>
<resource><directory>build</directory></resource>
<resource>
<directory>build</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**/*.properties</exclude>
</excludes>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Graylog-Plugin-Properties-Path>${project.groupId}.${project.artifactId}</Graylog-Plugin-Properties-Path>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessors>
<annotationProcessor>com.google.auto.value.processor.AutoValueProcessor</annotationProcessor>
<annotationProcessor>com.google.auto.service.processor.AutoServiceProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>false</minimizeJar>
</configuration>
<executions>
Expand All @@ -149,133 +178,39 @@
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<relocations>
<relocation>
<pattern>com.amazonaws</pattern>
<shadedPattern>org.graylog.plugins.aws.shaded.amazonaws</shadedPattern>
</relocation>
<relocation>
<pattern>software.amazon</pattern>
<shadedPattern>org.graylog.plugins.aws.shaded.amazon</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache</pattern>
<shadedPattern>org.graylog.plugins.aws.shaded.apache</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml</pattern>
<shadedPattern>org.graylog.plugins.aws.shaded.fasterxml</shadedPattern>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>org.graylog.plugins.aws.shaded.google</shadedPattern>
</relocation>
<relocation>
<pattern>org.joda</pattern>
<shadedPattern>org.graylog.plugins.aws.shaded.joda</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<mavenExecutorId>forked-path</mavenExecutorId>
<tagNameFormat>@{project.version}</tagNameFormat>
<preparationGoals>clean test</preparationGoals>
<goals>package</goals>
</configuration>
</plugin>

<plugin>
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<version>1.5</version>
<configuration>
<deb>${project.build.directory}/${project.artifactId}-${project.version}.deb</deb>
<dataSet>
<data>
<src>${project.build.directory}/${project.build.finalName}.jar</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>${graylog2.plugin-dir}</prefix>
<filemode>644</filemode>
<user>root</user>
<group>root</group>
</mapper>
</data>
</dataSet>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.1.5</version>
<configuration>
<group>Application/Internet</group>
<prefixes>
<prefix>/usr</prefix>
</prefixes>
<defineStatements>
<defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
<defineStatement>_binaries_in_noarch_packages_terminate_build 0</defineStatement>
</defineStatements>
<defaultFilemode>644</defaultFilemode>
<defaultDirmode>755</defaultDirmode>
<defaultUsername>root</defaultUsername>
<defaultGroupname>root</defaultGroupname>
<mappings>
<mapping>
<directory>${graylog2.plugin-dir}</directory>
<sources>
<source>
<location>${project.build.directory}/</location>
<includes>
<include>${project.build.finalName}.jar</include>
</includes>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>web-interface-build</id>
<activation>
<property>
<name>!skip.web.build</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.0</version>

<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v4.4.3</nodeVersion>
<npmVersion>3.8.6</npmVersion>
</configuration>
</execution>

<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<!-- Optional configuration which provides for running any npm command -->
<configuration>
<arguments>install</arguments>
</configuration>
</execution>

<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
4 changes: 3 additions & 1 deletion src/main/java/org/graylog/aws/plugin/AWSPlugin.java
@@ -1,16 +1,18 @@
package org.graylog.aws.plugin;

import com.google.auto.service.AutoService;
import org.graylog2.plugin.Plugin;
import org.graylog2.plugin.PluginMetaData;
import org.graylog2.plugin.PluginModule;

import java.util.Collection;
import java.util.Collections;

@AutoService(Plugin.class)
public class AWSPlugin implements Plugin {
@Override
public Collection<PluginModule> modules() {
return Collections.<PluginModule>singleton(new AWSModule());
return Collections.singleton(new AWSModule());
}

@Override
Expand Down

0 comments on commit 0939ef1

Please sign in to comment.