Skip to content

Commit

Permalink
spring aspectj @configurable pour jdk1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
karim authored and karim committed Jan 31, 2016
1 parent 4a94822 commit 2391f2c
Show file tree
Hide file tree
Showing 8 changed files with 197 additions and 103 deletions.
208 changes: 186 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,39 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<build.number>SNAPSHOT</build.number>
<proj.version>0.0.1-</proj.version>
<spring.version>3.2.16.RELEASE</spring.version>
<project.build.jdkVersion>1.6</project.build.jdkVersion>
<version.aspectj-maven-plugin>1.7</version.aspectj-maven-plugin>
<version.aspectjrt>1.8.8</version.aspectjrt>
<version.aspectjweaver>1.8.8</version.aspectjweaver>
<version.aspectjtools>1.8.8</version.aspectjtools>

</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>

<configuration>
<source>1.6</source>
<target>1.6</target>
<source>${project.build.jdkVersion}</source>
<target>${project.build.jdkVersion}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>${version.aspectj-maven-plugin}</version>
<configuration>
<complianceLevel>1.6</complianceLevel>
<source>${project.build.jdkVersion}</source>
<target>${project.build.jdkVersion}</target>
<complianceLevel>${project.build.jdkVersion}</complianceLevel>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
<aspectLibrary>
<groupId>org.dellroad</groupId>
<artifactId>dellroad-stuff</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
<executions>
Expand All @@ -56,6 +63,11 @@
<artifactId>plexus-utils</artifactId>
<version>3.0.21</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${version.aspectjtools}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand All @@ -76,27 +88,32 @@
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.2</version>
<version>${version.aspectjrt}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${version.aspectjweaver}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.1.4.RELEASE</version>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>4.1.4.RELEASE</version>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>4.1.4.RELEASE</version>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.1.4.RELEASE</version>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
Expand All @@ -107,21 +124,15 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>4.1.4.RELEASE</version>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>4.1.4.RELEASE</version>
<version>${spring.version}</version>
</dependency>
<!-- <dependency> <groupId>org.springframework</groupId> <artifactId>spring-instrument</artifactId>
<version>4.1.4.RELEASE</version> </dependency> -->
<dependency>
<groupId>org.dellroad</groupId>
<artifactId>dellroad-stuff</artifactId>
<version>1.0.905</version>
</dependency>

<version>${spring.version}</version> </dependency> -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down Expand Up @@ -161,10 +172,161 @@
</dependency>
</dependencies>

<profiles>
<!-- <profile> <id>nodep</id> <activation> <activeByDefault>false</activeByDefault>
</activation> <properties> </properties> </profile> -->
<profile>
<id>dep</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>

<!-- -->
<version.maven-antrun-plugin>1.7</version.maven-antrun-plugin>
<version.maven-assembly-plugin>2.3</version.maven-assembly-plugin>
<version.maven-clean-plugin>2.4.1</version.maven-clean-plugin>
<version.maven-dependency-plugin>2.4</version.maven-dependency-plugin>
<version.maven-deploy-plugin>2.7</version.maven-deploy-plugin>
<version.maven-install-plugin>2.3.1</version.maven-install-plugin>
<version.maven-release-plugin>2.2.2</version.maven-release-plugin>
<version.maven-site-plugin>3.0</version.maven-site-plugin>

<version.maven-compiler-plugin>2.3.2</version.maven-compiler-plugin>
<version.maven-ear-plugin>2.7</version.maven-ear-plugin>
<version.maven-war-plugin>2.1.1</version.maven-war-plugin>
<version.maven-jar-plugin>2.4</version.maven-jar-plugin>
<version.maven-eclipse-plugin>2.9</version.maven-eclipse-plugin>
<version.maven-resources-plugin>2.5</version.maven-resources-plugin>
<version.maven-surefire-plugin>2.12</version.maven-surefire-plugin>
<version.maven-enforcer-plugin>1.0.1</version.maven-enforcer-plugin>
<!---->

<profiles>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${version.maven-antrun-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${version.maven-assembly-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${version.maven-clean-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${version.maven-dependency-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${version.maven-deploy-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${version.maven-install-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${version.maven-release-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${version.maven-site-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.maven-compiler-plugin}</version>
<configuration>
<source>${project.build.jdkVersion}</source>
<target>${project.build.jdkVersion}</target>
</configuration>
</plugin>
<plugin>
<!-- Using the eclipse:eclipse goal of the maven-eclipse-plugin creates
the files needed by Eclipse for a proper project. Unfortunately the obtained
configuration is NOT COMPATIBLE with the use of the Eclipse m2eclipse plugin. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>${version.maven-eclipse-plugin}</version>
<configuration>
<!-- By default we do not want projects found in the workspace to
be used instead of proper Maven dependencies. -->
<useProjectReferences>false</useProjectReferences>
<!-- The source jar of each dependency will be downloaded and configured. -->
<downloadSources>true</downloadSources>
<!-- By default we do not download Javadocs because their path is
put in .classpath as an absolute path, which may be different on each workstation. -->
<downloadJavadocs>false</downloadJavadocs>
<!-- With this additionalConfig the eclipse:eclipse goal overrides
a file in the .settings directory in order to set the encoding of the project
for Eclipse. WARNING : if you use this, do not change file encoding settings
from inside Eclipse. -->
<additionalConfig>
<file>
<name>.settings/org.eclipse.core.resources.prefs</name>
<content>
<![CDATA[encoding/<project>=${project.build.sourceEncoding}${line.separator}eclipse.preferences.version=1${line.separator}]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>${version.maven-ear-plugin}</version>
<configuration>
<archive>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${version.maven-war-plugin}</version>
<configuration>
<archive>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${version.maven-jar-plugin}</version>
<configuration>
<archive>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${version.maven-resources-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.maven-surefire-plugin}</version>
</plugin>
</plugins>
</pluginManagement>

</build>
</profile>
<profile>
<id>m2e</id>
<!-- This profile is only active when the property "m2e.version" is set,
Expand All @@ -191,6 +353,7 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<!-- <version>${version.aspectj-maven-plugin}</version> -->
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
Expand All @@ -211,6 +374,7 @@
</pluginManagement>
</build>
</profile>

</profiles>

</project>
14 changes: 0 additions & 14 deletions src/main/java/org/tata/ThreadConfigurableBean.java

This file was deleted.

10 changes: 5 additions & 5 deletions src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level (%file:%line\) - %message%n</pattern>
</encoder>
Expand All @@ -9,19 +9,19 @@

<logger name="org.springframework">
<level value="${org.springframework-level:-{$root-level:-INFO}}" />
<appender-ref ref="CONSOLE" />
<appender-ref ref="STDOUT" />
</logger>
<logger name="org.tata">
<level value="${org.toto-level:-{$root-level:-INFO}}" />
<appender-ref ref="CONSOLE" />
<appender-ref ref="STDOUT" />
</logger>
<logger name="org.toto">
<level value="${org.tata-level:-{$root-level:-INFO}}" />
<appender-ref ref="CONSOLE" />
<appender-ref ref="STDOUT" />
</logger>
<root>
<level value="${root-level:-INFO}" />
<appender-ref ref="CONSOLE" />
<appender-ref ref="STDOUT" />
</root>

</configuration>
26 changes: 0 additions & 26 deletions src/test/java/org/tata/ThreadConfigurableTest.java

This file was deleted.

23 changes: 0 additions & 23 deletions src/test/java/org/tata/ThreadConfigurableTestConfig.java

This file was deleted.

Loading

0 comments on commit 2391f2c

Please sign in to comment.