You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2017/09/03 02:01:36 UTC
logging-log4j-audit-sample git commit: Initial version
Repository: logging-log4j-audit-sample
Updated Branches:
refs/heads/master [created] 165928bcb
Initial version
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/commit/165928bc
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/tree/165928bc
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/diff/165928bc
Branch: refs/heads/master
Commit: 165928bcb84fab7f42c6e37d78d412dd4ddc560f
Parents:
Author: Ralph Goers <rg...@nextiva.com>
Authored: Sat Sep 2 19:01:31 2017 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Sat Sep 2 19:01:31 2017 -0700
----------------------------------------------------------------------
LICENSE.txt | 202 +++++++++
NOTICE.txt | 6 +
README.md | 18 +
audit-service-api/pom.xml | 81 ++++
.../src/main/resources/catalog.json | 193 +++++++++
audit-service-war/pom.xml | 70 ++++
audit-service-war/src/main/resources/log4j2.xml | 80 ++++
.../src/test/resources/transfer.json | 31 ++
audit-test/catalog.json | 196 +++++++++
pom.xml | 411 +++++++++++++++++++
10 files changed, 1288 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/LICENSE.txt
----------------------------------------------------------------------
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..6279e52
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 1999-2005 The Apache Software Foundation
+
+ Licensed 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.
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/NOTICE.txt
----------------------------------------------------------------------
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 0000000..cb754dd
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,6 @@
+Apache Log4j
+Copyright 1999-2017 Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..df34f17
--- /dev/null
+++ b/README.md
@@ -0,0 +1,18 @@
+# Apache Log4j Audit Sample
+
+This is a sample project that illustrates how to create cusom Audit Event classes and a custom Audit Service using
+Log4j-Audit.
+
+## Packages
+
+### Audit Service API
+
+The Audit Service API project contains the catalog that will be managed by the Log4j Catalog Web Application. That web
+application simply needs to be configured with the url of this project and the path to the JSON catalog within the
+project. Whenever a Maven build is run the catalog will be read and a new set of Java Interfaces will be generated.
+The interfaces can be used by Java applications to perform audit logging.
+
+### Audit Service
+
+The Audit Service is a web application that allows applications (especially those not written in Java) to perform
+audit logging while still having ensuring that the audit events conform to the definitions in the catalog.
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/audit-service-api/pom.xml
----------------------------------------------------------------------
diff --git a/audit-service-api/pom.xml b/audit-service-api/pom.xml
new file mode 100644
index 0000000..129152d
--- /dev/null
+++ b/audit-service-api/pom.xml
@@ -0,0 +1,81 @@
+<?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">
+ <!--
+ ~ 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.
+ -->
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>audit-sample-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>audit-service-api</artifactId>
+
+ <description>Audit Logging API</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-audit-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-audit-maven-plugin</artifactId>
+ <version>${log4j-audit.version}</version>
+ <executions>
+ <execution>
+ <id>generate</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.logging.log4j.audit.event</packageName>
+ <enterpriseId>18060</enterpriseId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!--<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin> -->
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/audit-service-api/src/main/resources/catalog.json
----------------------------------------------------------------------
diff --git a/audit-service-api/src/main/resources/catalog.json b/audit-service-api/src/main/resources/catalog.json
new file mode 100644
index 0000000..2bee559
--- /dev/null
+++ b/audit-service-api/src/main/resources/catalog.json
@@ -0,0 +1,193 @@
+/*
+ * 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.
+ */
+{
+ "products" : [ {
+ "name" : "banking",
+ "displayName" : "Banking",
+ "description" : "Fictional banking product",
+ "events" : [ "login", "transfer", "deposit", "billPay" ]
+ } ],
+ "categories" : [ {
+ "name" : "account",
+ "displayName" : "Account",
+ "description" : "Events related to accounts",
+ "events" : [ "transfer", "deposit" ]
+ }, {
+ "name" : "billPay",
+ "displayName" : "Bill Pay",
+ "description" : "Events related to bill payment",
+ "events" : [ "billPay" ]
+ } ],
+ "events" : [ {
+ "name" : "login",
+ "displayName" : "Login",
+ "description" : "User Login",
+ "aliases" : null,
+ "attributes" : null
+ }, {
+ "name" : "transfer",
+ "displayName" : "Transfer",
+ "description" : "Transfer between accounts",
+ "aliases" : null,
+ "attributes" : [ {"name" : "toAccount", "required" : true}, {"name" : "fromAccount", "required" : true},
+ {"name" :"amount", "required" : true} ]
+ }, {
+ "name" : "deposit",
+ "displayName" : "Deposit",
+ "description" : "Deposit funds",
+ "aliases" : null,
+ "attributes" : [ {"name" : "account", "required" : true}, {"name" : "amount", "required" : true} ]
+ }, {
+ "name" : "billPay",
+ "displayName" : "Bill Pay",
+ "description" : "Payment of a bill",
+ "aliases" : null,
+ "attributes" : [ {"name" : "fromAccount", "required" : true}, {"name" : "payee", "required" : true},
+ {"name" : "amount", "required" : true} ]
+ } ],
+ "attributes" : [ {
+ "name" : "accountNumber",
+ "displayName" : "Account Number",
+ "description" : "Company account number",
+ "dataType" : "INT",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : true,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "ipAddress",
+ "displayName" : "IP Address",
+ "description" : "IP Address of the caller",
+ "dataType" : "STRING",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : false,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : [ {
+ "constraintType" : {
+ "name" : "pattern"
+ },
+ "value" : "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
+ } ]
+ }, {
+ "name" : "userId",
+ "displayName" : "UserId",
+ "description" : "Id of the User",
+ "dataType" : "INT",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : true,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "loginId",
+ "displayName" : "LoginId",
+ "description" : "Id user logs in with",
+ "dataType" : "INT",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : true,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "hostName",
+ "displayName" : "Host Name",
+ "description" : "Name of the server",
+ "dataType" : "STRING",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : false,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "toAccount",
+ "displayName" : "To Account Number",
+ "description" : "Destination account",
+ "dataType" : "INT",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : [ {
+ "constraintType" : {
+ "name" : "minValue"
+ },
+ "value" : "1"
+ } ]
+ }, {
+ "name" : "fromAccount",
+ "displayName" : "From Account Number",
+ "description" : "Source of funds",
+ "dataType" : "INT",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "amount",
+ "displayName" : "Amount",
+ "description" : "Amount to transfer",
+ "dataType" : "BIG_DECIMAL",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "account",
+ "displayName" : "Account Number",
+ "description" : "Accopunt number",
+ "dataType" : "INT",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "payee",
+ "displayName" : "Payee",
+ "description" : "Recipient of payment",
+ "dataType" : "STRING",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ } ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/audit-service-war/pom.xml
----------------------------------------------------------------------
diff --git a/audit-service-war/pom.xml b/audit-service-war/pom.xml
new file mode 100644
index 0000000..0574c27
--- /dev/null
+++ b/audit-service-war/pom.xml
@@ -0,0 +1,70 @@
+<?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">
+ <!--
+ ~ 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.
+ -->
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>audit-sample-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>audit-service-war</artifactId>
+ <packaging>war</packaging>
+
+ <description>Audit Logging Service</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>audit-service-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-audit-war</artifactId>
+ <scope>runtime</scope>
+ <type>war</type>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>AuditService</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>3.1.0</version>
+ <configuration>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ <overlays>
+ <overlay>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-audit-war</artifactId>
+ </overlay>
+ </overlays>
+ </configuration>
+ <executions>
+ <execution>
+ <id>default-war</id>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/audit-service-war/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/audit-service-war/src/main/resources/log4j2.xml b/audit-service-war/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..7234fda
--- /dev/null
+++ b/audit-service-war/src/main/resources/log4j2.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+~ 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.
+-->
+<Configuration status="ERROR">
+ <properties>
+ <property name="LOG_DIR">${sys:catalina.home}/logs/AuditService</property>
+ </properties>
+ <MarkerFilter marker="FLOW" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
+ <MarkerFilter marker="Audit" omMatch="ACCEPT" onMisMatch="NEUTRAL"/>
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{ABSOLUTE} %-5level # %class.%method %m%n" />
+ </Console>
+
+ <RollingFile name="log4j" fileName="${LOG_DIR}/log4j.txt" filePattern="${LOG_DIR}/archive/log4j.txt.%d{yyyyMMdd_HHmmss}-%i">
+ <PatternLayout>
+ <MarkerPatternSelector defaultPattern="%d [%t] %-5p %X{loginId, userId, ipAddress, corpAcctNumber} %C{1.}.%M:%L - %m%n">
+ <PatternMatch key="FLOW" pattern="%d [%t] %-5p %X{loginId, userId, ipAddress, corpAcctNumber} -------- %C{1.}.%M:%L %msg --------%n"/>
+ </MarkerPatternSelector>
+ </PatternLayout>
+ <Policies>
+ <SizeBasedTriggeringPolicy size="30 MB"/>
+ </Policies>
+ <!-- A max of 20 will allow 20 files per second with the date pattern specified on the RollingFile declaration.
+ Hopefully that is a ridiculous value -->
+ <DefaultRolloverStrategy min="1" max="20">
+ <Delete basePath="${LOG_DIR}/archive">
+ <!-- Nested conditions: the inner condition is only evaluated on files for which the outer conditions are true. -->
+ <IfFileName glob="log4j.txt.*">
+ <!-- Only allow 1 GB of files to accumulate -->
+ <IfAccumulatedFileSize exceeds="1 GB"/>
+ </IfFileName>
+ </Delete>
+ </DefaultRolloverStrategy>
+ </RollingFile>
+ <RollingFile name="audit" fileName="${LOG_DIR}/audit.log" filePattern="${LOG_DIR}/archive/audit.log.%d{yyyyMMdd_HHmmss}-%i">
+ <RFC5424Layout enterpriseNumber="50177" includeMDC="true" mdcId="RequestContext" appName="Platform"
+ mdcPrefix=""/>
+ <Policies>
+ <SizeBasedTriggeringPolicy size="30 MB"/>
+ </Policies>
+ <!-- A max of 20 will allow 20 files per second with the date pattern specified on the RollingFile declaration.
+ Hopefully that is a ridiculous value -->
+ <DefaultRolloverStrategy min="1" max="20">
+ <Delete basePath="${LOG_DIR}/archive">
+ <!-- Nested conditions: the inner condition is only evaluated on files for which the outer conditions are true. -->
+ <IfFileName glob="audit.log.*">
+ <!-- Only allow 1 GB of files to accumulate -->
+ <IfAccumulatedFileSize exceeds="1 GB"/>
+ </IfFileName>
+ </Delete>
+ </DefaultRolloverStrategy>
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <Logger name="org.apache.logging.log4j.audit" level="info" additivity="false">
+ <AppenderRef ref="log4j"/>
+ </Logger>
+ <Logger name="AuditLogger" level="trace" additivty="false">
+ <AppenderRef ref="audit"/>
+ </Logger>
+ <Root level="warn">
+ <AppenderRef ref="log4j" />
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/audit-service-war/src/test/resources/transfer.json
----------------------------------------------------------------------
diff --git a/audit-service-war/src/test/resources/transfer.json b/audit-service-war/src/test/resources/transfer.json
new file mode 100644
index 0000000..3e7be70
--- /dev/null
+++ b/audit-service-war/src/test/resources/transfer.json
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+{ "eventName" : "transfer",
+ "properties": {
+ "toAccount": "123456",
+ "fromAccount": "111111",
+ "amount": "111.55"
+ },
+ "requestContextMap": {
+ "companyId": "12345",
+ "ipAddress": "127.0.0.1",
+ "environment": "dev",
+ "product": "TestProduct",
+ "timeZone" : "America/Phoenix",
+ "loginId": "testUser"
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/audit-test/catalog.json
----------------------------------------------------------------------
diff --git a/audit-test/catalog.json b/audit-test/catalog.json
new file mode 100644
index 0000000..b11111a
--- /dev/null
+++ b/audit-test/catalog.json
@@ -0,0 +1,196 @@
+/*
+ * 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.
+ */
+/*
+ * Do not modify this file. It is used by log4j-audit for testing.
+ */
+{
+ "products" : [ {
+ "name" : "banking",
+ "displayName" : "Banking",
+ "description" : "Fictional banking product",
+ "events" : [ "login", "transfer", "deposit", "billPay" ]
+ } ],
+ "categories" : [ {
+ "name" : "account",
+ "displayName" : "Account",
+ "description" : "Events related to accounts",
+ "events" : [ "transfer", "deposit" ]
+ }, {
+ "name" : "billPay",
+ "displayName" : "Bill Pay",
+ "description" : "Events related to bill payment",
+ "events" : [ "billPay" ]
+ } ],
+ "events" : [ {
+ "name" : "login",
+ "displayName" : "Login",
+ "description" : "User Login",
+ "aliases" : null,
+ "attributes" : null
+ }, {
+ "name" : "transfer",
+ "displayName" : "Transfer",
+ "description" : "Transfer between accounts",
+ "aliases" : null,
+ "attributes" : [ {"name" : "toAccount", "required" : true}, {"name" : "fromAccount", "required" : true},
+ {"name" :"amount", "required" : true} ]
+ }, {
+ "name" : "deposit",
+ "displayName" : "Deposit",
+ "description" : "Deposit funds",
+ "aliases" : null,
+ "attributes" : [ {"name" : "account", "required" : true}, {"name" : "amount", "required" : true} ]
+ }, {
+ "name" : "billPay",
+ "displayName" : "Bill Pay",
+ "description" : "Payment of a bill",
+ "aliases" : null,
+ "attributes" : [ {"name" : "fromAccount", "required" : true}, {"name" : "payee", "required" : true},
+ {"name" : "amount", "required" : true} ]
+ } ],
+ "attributes" : [ {
+ "name" : "accountNumber",
+ "displayName" : "Account Number",
+ "description" : "Company account number",
+ "dataType" : "INT",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : true,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "ipAddress",
+ "displayName" : "IP Address",
+ "description" : "IP Address of the caller",
+ "dataType" : "STRING",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : false,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : [ {
+ "constraintType" : {
+ "name" : "pattern"
+ },
+ "value" : "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
+ } ]
+ }, {
+ "name" : "userId",
+ "displayName" : "UserId",
+ "description" : "Id of the User",
+ "dataType" : "INT",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : true,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "loginId",
+ "displayName" : "LoginId",
+ "description" : "Id user logs in with",
+ "dataType" : "INT",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : true,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "hostName",
+ "displayName" : "Host Name",
+ "description" : "Name of the server",
+ "dataType" : "STRING",
+ "indexed" : true,
+ "sortable" : true,
+ "required" : false,
+ "requestContext" : true,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "toAccount",
+ "displayName" : "To Account Number",
+ "description" : "Destination account",
+ "dataType" : "INT",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : [ {
+ "constraintType" : {
+ "name" : "minValue"
+ },
+ "value" : "1"
+ } ]
+ }, {
+ "name" : "fromAccount",
+ "displayName" : "From Account Number",
+ "description" : "Source of funds",
+ "dataType" : "INT",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "amount",
+ "displayName" : "Amount",
+ "description" : "Amount to transfer",
+ "dataType" : "BIG_DECIMAL",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "account",
+ "displayName" : "Account Number",
+ "description" : "Accopunt number",
+ "dataType" : "INT",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ }, {
+ "name" : "payee",
+ "displayName" : "Payee",
+ "description" : "Recipient of payment",
+ "dataType" : "STRING",
+ "indexed" : false,
+ "sortable" : false,
+ "required" : true,
+ "requestContext" : false,
+ "examples" : null,
+ "aliases" : null,
+ "constraints" : null
+ } ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample/blob/165928bc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..bb82ff4
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,411 @@
+<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">
+ <!--
+ ~ 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.
+ -->
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>audit-sample-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <url>https://logging.apache.org/log4j-audit</url>
+ <name>Audit Sample Parent</name>
+ <scm>
+ <connection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample.git</connection>
+ <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4j-audit-sample.git</developerConnection>
+ <url>https://git-wip-us.apache.org/repos/asf?p=logging-log4j-audit-sample.git;a=summary</url>
+ <tag>log4j-${Log4jAuditReleaseVersion}</tag>
+ </scm>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
+ <classmate.version>1.2.0</classmate.version>
+ <jackson.version>2.8.5</jackson.version>
+ <log4j.version>2.9.0</log4j.version>
+ <log4j-audit.version>1.0.0-SNAPSHOT</log4j-audit.version>
+ <slf4j.version>1.6.2</slf4j.version>
+ <spring.version>4.3.3.RELEASE</spring.version>
+ </properties>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>audit-service-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-audit-api</artifactId>
+ <version>${log4j-audit.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-audit-war</artifactId>
+ <version>${log4j-audit.version}</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-catalog-api</artifactId>
+ <version>${log4j-audit.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jcl</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-jsr310</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml</groupId>
+ <artifactId>classmate</artifactId>
+ <version>${classmate.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context-support</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-orm</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aspects</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.4.1</version>
+ <executions>
+ <execution>
+ <id>enforce</id>
+ <configuration>
+ <rules>
+ <dependencyConvergence />
+ <requireJavaVersion>
+ <version>[1.8,)</version>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <compilerArguments>
+ <Xmaxwarns>10000</Xmaxwarns>
+ <Xlint />
+ </compilerArguments>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.5.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.18.1</version>
+ <executions>
+ <execution>
+ <id>default-test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <includes>
+ <include>**/Test*.java</include>
+ <include>**/*Test.java</include>
+ </includes>
+ <excludes>
+ <exclude>**/*FuncTest.java</exclude>
+ </excludes>
+ <forkCount>1</forkCount>
+ <reuseForks>false</reuseForks>
+ <systemPropertyVariables>
+ <environment>${environment}</environment>
+ <site>${site}</site>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.17</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.nextiva</groupId>
+ <artifactId>nextiva-build-tools</artifactId>
+ <version>6.0.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.4</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>2.6</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.17</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>checkstyle</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ <configuration>
+ <!--<propertiesLocation>${vfs.parent.dir}/checkstyle.properties</propertiesLocation> -->
+ <configLocation>nextiva/checkstyle.xml</configLocation>
+ <enableRulesSummary>false</enableRulesSummary>
+ <propertyExpansion>basedir=${basedir}</propertyExpansion>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.10.3</version>
+ <configuration>
+ <additionalparam>-Xdoclint:none</additionalparam>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <id>non-aggregate</id>
+ <reports>
+ <report>javadoc</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.8.1</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ <report>dependencies</report>
+ <report>dependency-info</report>
+ <report>dependency-convergence</report>
+ <report>dependency-management</report>
+ <report>license</report>
+ <report>scm</report>
+ <report>summary</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ <configuration>
+ <!-- you'd think these would be the defaults, right? -->
+ <customBundle>${project.basedir}/src/site/custom/project-info-report.properties</customBundle>
+ <webAccessUrl>${project.scm.url}</webAccessUrl>
+ <anonymousConnection>${project.scm.connection}</anonymousConnection>
+ <developerConnection>${project.scm.developerConnection}</developerConnection>
+ <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>3.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>3.0.3</version>
+ <configuration>
+ <maxHeap>1024</maxHeap>
+ <timeout>1800000</timeout>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ <profiles>
+ <profile>
+ <id>integration-tests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.18.1</version>
+ <executions>
+ <execution>
+ <id>integration-tests</id>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <reuseForks>false</reuseForks>
+ <includes>
+ <include>**/*FuncTest.java</include>
+ </includes>
+ <systemPropertyVariables>
+ <environment>${environment}</environment>
+ <site>${site}</site>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ <distributionManagement>
+ <repository>
+ <id>release</id>
+ <name>nextiva-releases</name>
+ <url>http://repository.nextiva.xyz:8081/nexus/content/repositories/releases</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots</id>
+ <name>nextiva-snapshots</name>
+ <url>http://repository.nextiva.xyz:8081/nexus/content/repositories/snapshots</url>
+ </snapshotRepository>
+ <site>
+ <id>site</id>
+ <url>file://${WORKSPACE}/sites/auditservice/</url>
+ </site>
+ </distributionManagement>
+ <modules>
+ <module>audit-service-war</module>
+ <module>audit-service-api</module>
+ </modules>
+</project>