Skip to content

Commit

Permalink
Merge branch 'paulwellnerbou-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonycorbacho committed Apr 14, 2018
2 parents 3cd3f1a + 5c29ee7 commit 95dc26e
Show file tree
Hide file tree
Showing 28 changed files with 982 additions and 1,911 deletions.
19 changes: 0 additions & 19 deletions DEPLOY.md

This file was deleted.

20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,33 @@ compile "io.thekraken:grok:0.1.5"
Example of how to use java-grok:

```java
/* Create a new grok instance */
Grok grok = Grok.create();
/* Create a new grokCompiler instance */
GrokCompiler grokCompiler = GrokCompiler.newInstance();
grokCompiler.registerDefaultPatterns();

/* Grok pattern to compile, here httpd logs */
grok.compile("%{COMBINEDAPACHELOG}");
final Grok grok = grokCompiler.compile("%{COMBINEDAPACHELOG}");

/* Line of log to match */
String log = "112.169.19.192 - - [06/Mar/2013:01:36:30 +0900] \"GET / HTTP/1.1\" 200 44346 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22\"";

Match gm = grok.match(log);
gm.captures();

/* Get the output */
System.out.println(gm.toJson());

/* Get the map with matches */
Map myMap = gm.toMap();
final Map<String, Object> capture = gm.capture();
```

### Build Java Grok

Java Grok support Gradle: ``./gradlew build``
Java Grok support Gradle: `./gradlew assemble`

### Getting help
[Mailling List](https://groups.google.com/forum/#!forum/java-grok)

### Thankx to
### Thanks to
* [@joschi](https://github.com/joschi)
* [@keitaf](https://github.com/keitaf)
* [@anthonycorbacho](https://github.com/anthonycorbacho)
* [@nokk](https://github.com/nokk)
* [@wouterdb](https://github.com/wouterdb)
* [@Leemoonsoo](https://github.com/Leemoonsoo)
Expand Down
16 changes: 9 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ apply {
plugin "maven-publish"
plugin "checkstyle"
plugin "jacoco"
plugin "idea"
plugin "eclipse"
}

task wrapper(type: Wrapper) {
Expand All @@ -16,29 +18,29 @@ repositories {
}

sourceCompatibility = JavaVersion.VERSION_1_8
group = "oi.thekraken"
archivesBaseName = "grok"
version = '0.1.6-SNAPSHOT'
group = "oi.krakens"
archivesBaseName = "java-grok"
version = '0.1.9-SNAPSHOT'

ext {
checkStyleToolVersion = "6.19"
jacocoToolVersion = "0.7.9"

namedRegexpVersion = "0.2.4"
commonsLang3Version = "3.7"
gsonVersion = "2.7"
log4jVersion = "1.7.21"

junitVersion = "4.12"
assertjVersion = "3.9.1"
guavaVersion = "24.0-jre"
}

dependencies {
compile "com.github.tony19:named-regexp:$namedRegexpVersion"
compile "org.apache.commons:commons-lang3:$commonsLang3Version"
compile "com.google.code.gson:gson:$gsonVersion"
compile "org.slf4j:slf4j-api:$log4jVersion"

testCompile "junit:junit:$junitVersion"
testCompile "org.assertj:assertj-core:$assertjVersion"
testCompile "com.google.guava:guava:$guavaVersion"
}

checkstyle {
Expand Down
1 change: 0 additions & 1 deletion extra/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance">
<property name="allowedDistance" value="10"/>
</module>
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=0.1.9-SNAPSHOT
85 changes: 0 additions & 85 deletions gradle/publishArtifact.gradle

This file was deleted.

4 changes: 4 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
<<<<<<< HEAD
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
=======
>>>>>>> 84481ab507dcb89bf4ac15a00de47a2998c36cf3
Loading

0 comments on commit 95dc26e

Please sign in to comment.