Skip to content

Commit 42c2234

Browse files
committed
added changes in to pom
1 parent 451d77a commit 42c2234

File tree

3 files changed

+134
-36
lines changed

3 files changed

+134
-36
lines changed

pom.xml

Lines changed: 94 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,51 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>org.audit4j.integration.spring</groupId>
4+
<groupId>org.audit4j</groupId>
55
<artifactId>audit4j-spring</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.0-SNAPSHOT</version>
87
<name>Audit4j - Spring Integration</name>
9-
<url>http://maven.apache.org</url>
8+
<version>1.0.0</version>
9+
<url>http://www.mechanizedspace.com/audit4j</url>
10+
<description>Audit4j - An open-source audit suit for enterprise java platform, Spring Integration</description>
11+
<organization>
12+
<name>Audit4j</name>
13+
<url>http://www.mechanizedspace.com/audit4j</url>
14+
</organization>
15+
<licenses>
16+
<license>
17+
<name>The Apache Software License, Version 2.0</name>
18+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
19+
<distribution>repo</distribution>
20+
</license>
21+
</licenses>
22+
<scm>
23+
<connection>scm:git:[email protected]:audit4j/audit4j-core.git</connection>
24+
<developerConnection>scm:git:[email protected]:audit4j/audit4j-core.git</developerConnection>
25+
<url>scm:git:[email protected]:audit4j/audit4j-core.git</url>
26+
<tag>1.0.0</tag>
27+
</scm>
28+
<developers>
29+
<developer>
30+
<id>janith</id>
31+
<name>Janith Bandara</name>
32+
<organization>Audit4j</organization>
33+
<organizationUrl>http://www.mechanizedspace.com/audit4j</organizationUrl>
34+
<roles>
35+
<role>owner</role>
36+
<role>developer</role>
37+
</roles>
38+
<timezone>0</timezone>
39+
</developer>
40+
</developers>
41+
42+
<parent>
43+
<groupId>org.sonatype.oss</groupId>
44+
<artifactId>oss-parent</artifactId>
45+
<version>7</version>
46+
</parent>
1047

1148
<properties>
12-
<hapi.version.stable>2.1</hapi.version.stable>
13-
<slf4j.version>1.7.5</slf4j.version>
14-
<log4j.version>1.2.17</log4j.version>
1549
<spring.version>3.0.5.RELEASE</spring.version>
1650
<aspectj.version>1.6.11</aspectj.version>
1751
</properties>
@@ -20,15 +54,14 @@
2054
<dependency>
2155
<groupId>junit</groupId>
2256
<artifactId>junit</artifactId>
23-
<version>3.8.1</version>
24-
<scope>test</scope>
57+
<version>4.11</version>
2558
</dependency>
59+
2660
<dependency>
27-
<groupId>org.slf4j</groupId>
28-
<artifactId>slf4j-api</artifactId>
29-
<version>1.7.6</version>
61+
<groupId>org.audit4j</groupId>
62+
<artifactId>audit4j-core</artifactId>
63+
<version>1.0.0</version>
3064
</dependency>
31-
3265
<!-- Spring AOP + AspectJ -->
3366
<dependency>
3467
<groupId>org.springframework</groupId>
@@ -47,32 +80,73 @@
4780
</dependency>
4881
</dependencies>
4982

83+
5084
<build>
5185
<plugins>
5286
<plugin>
5387
<groupId>org.apache.maven.plugins</groupId>
5488
<artifactId>maven-compiler-plugin</artifactId>
89+
<configuration>
90+
<!-- or whatever version you use -->
91+
<source>1.7</source>
92+
<target>1.7</target>
93+
</configuration>
5594
</plugin>
5695
<plugin>
5796
<groupId>org.apache.maven.plugins</groupId>
58-
<artifactId>maven-eclipse-plugin</artifactId>
97+
<artifactId>maven-javadoc-plugin</artifactId>
98+
<executions>
99+
<execution>
100+
<id>attach-javadocs</id>
101+
<!-- Restrict execution of source compilation to install -->
102+
<phase>install</phase>
103+
<goals>
104+
<goal>jar</goal>
105+
</goals>
106+
</execution>
107+
</executions>
59108
</plugin>
60109
<plugin>
61110
<groupId>org.apache.maven.plugins</groupId>
62-
<artifactId>maven-jar-plugin</artifactId>
111+
<artifactId>maven-source-plugin</artifactId>
112+
<executions>
113+
<execution>
114+
<phase>install</phase>
115+
<goals>
116+
<goal>jar</goal>
117+
</goals>
118+
</execution>
119+
</executions>
120+
</plugin>
121+
<plugin>
122+
<groupId>org.apache.maven.plugins</groupId>
123+
<artifactId>maven-release-plugin</artifactId>
124+
<version>2.5</version>
63125
<configuration>
64-
<archive>
65-
<manifest>
66-
<addClasspath>true</addClasspath>
67-
<mainClass>org.foo.App</mainClass>
68-
</manifest>
69-
</archive>
126+
<tagNameFormat>v@{project.version}</tagNameFormat>
70127
</configuration>
71128
</plugin>
129+
<plugin>
130+
<groupId>org.apache.maven.plugins</groupId>
131+
<artifactId>maven-eclipse-plugin</artifactId>
132+
</plugin>
72133
<plugin>
73134
<groupId>org.apache.maven.plugins</groupId>
74135
<artifactId>maven-surefire-plugin</artifactId>
75136
</plugin>
137+
<plugin>
138+
<groupId>org.apache.maven.plugins</groupId>
139+
<artifactId>maven-gpg-plugin</artifactId>
140+
<executions>
141+
<execution>
142+
<id>sign-artifacts</id>
143+
<phase>verify</phase>
144+
<goals>
145+
<goal>sign</goal>
146+
</goals>
147+
</execution>
148+
</executions>
149+
</plugin>
76150
</plugins>
77151
</build>
78152
</project>
Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
1+
/*
2+
* Copyright 2014 Janith Bandara, This source is a part of Audit4j -
3+
* An open-source audit platform for Enterprise java platform.
4+
* http://mechanizedspace.com/audit4j
5+
* http://audit4j.org
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
120
package org.audit4j.integration.spring;
221

322
import java.lang.reflect.Method;
423

5-
import org.apache.commons.logging.Log;
6-
import org.apache.commons.logging.LogFactory;
724
import org.audit4j.core.AuditManager;
825
import org.springframework.aop.MethodBeforeAdvice;
926

@@ -15,19 +32,12 @@
1532
*/
1633
public class AuditAdvice implements MethodBeforeAdvice {
1734

18-
/** The log. */
19-
private final Log log = LogFactory.getLog(AuditAdvice.class);
20-
2135
/* (non-Javadoc)
2236
* @see org.springframework.aop.MethodBeforeAdvice#before(java.lang.reflect.Method, java.lang.Object[], java.lang.Object)
2337
*/
2438
@Override
2539
public void before(final Method method, final Object[] arg1, final Object arg2) throws Throwable {
26-
27-
if (log.isDebugEnabled())
28-
log.debug("Calling Audit advice before " + method.getName());
29-
3040
AuditManager manager = AuditManager.getInstance();
31-
manager.auditWithAnnotation(method.getClass(), method, arg1);
41+
manager.audit(method.getClass(), method, arg1);
3242
}
3343
}

src/main/java/org/audit4j/integration/spring/AuditAspect.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
1+
/*
2+
* Copyright 2014 Janith Bandara, This source is a part of Audit4j -
3+
* An open-source audit platform for Enterprise java platform.
4+
* http://mechanizedspace.com/audit4j
5+
* http://audit4j.org
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
120
package org.audit4j.integration.spring;
221

322
import java.lang.reflect.Method;
423

5-
import org.apache.commons.logging.Log;
6-
import org.apache.commons.logging.LogFactory;
724
import org.aspectj.lang.ProceedingJoinPoint;
825
import org.aspectj.lang.annotation.Around;
926
import org.aspectj.lang.annotation.Aspect;
@@ -21,9 +38,6 @@
2138
@Aspect
2239
public class AuditAspect {
2340

24-
/** The log. */
25-
private final Log log = LogFactory.getLog(AuditAspect.class);
26-
2741
/**
2842
* Execute public method.
2943
*/
@@ -46,7 +60,7 @@ public Object logAction(final ProceedingJoinPoint pjp) throws Throwable {
4660
MethodSignature methodSignature = (MethodSignature) pjp.getSignature();
4761
Method method = methodSignature.getMethod();
4862

49-
manager.auditWithAnnotation(clazz, method, pjp.getArgs());
63+
manager.audit(clazz, method, pjp.getArgs());
5064
return pjp.proceed();
5165
}
5266
}

0 commit comments

Comments
 (0)