AOP + Jenkins + Maven Integration

I am using aop and can publish the apk with the help of eclipse aop plugin. As you already know in aop, a lot of codes must be added into some pre-stated classes in compiling time.

But I dont know what to do if I want to automatize this operation via jenkins + maven. To be clear, I want to transfer the whole compiling (packaging) issues on to jenkins + maven platform. Maven should build the application but how?

Answers


Use aspectj maven plugin. Ensure that your compiler plugin excludes your aspects and the aspectj compiler plugin only compiles the aspects. Something like these:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.4</version>
    <configuration>
        <source>1.6</source>
        <target>1.6</target>
        <encoding>UTF-8</encoding>
        <excludes>
            <exclude>*.aj</exclude>
        </excludes>
    </configuration>
</plugin>


<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>aspectj-maven-plugin</artifactId>
    <version>1.3</version>
    <configuration>
        <verbose>true</verbose>
        <complianceLevel>1.6</complianceLevel>
        <showWeaveInfo>true</showWeaveInfo>
        <sources>
            <source>
                <basedir>src/main/java</basedir>
                <includes>
                    <include>**/*.aj</include>
                </includes>
            </source>
        </sources>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
                <goal>test-compile</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.6.10</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>1.6.10</version>
        </dependency>
    </dependencies>
</plugin>

Need Your Help

DocBook XSL - ok to edit the original stylesheets?

xslt docbook

I would like to make certain lines of a DocBook table of contents bold based on whether the particular &lt;section&gt; has a certain attribute defined. This is easy by adding an &lt;xsl:if test=".....

codeigniter-paypal. doesn't redirect to paypal in iframe

php codeigniter iframe paypal

i'm using codeigniter to integrate paypal digital goods payment.