Git Product home page Git Product logo

spring-load-time-weaving-clickstart's Introduction

Spring Load Time Weaving Clickstart

This is a "ClickStart" that gets you going with a "Spring & AspectJ Load-time weaving in tomcat7" seed project starting point. You can launch it here:

This will setup a continuous deployment pipeline - a CloudBees Git repository, a Jenkins build compiling and running the test suite (on each commit). Should the build succeed, this seed app is deployed on a Tomcat 7 container.

You will see in this seed

  • How to add a jar to the classpath of your CloudBees container (Tomcat7 - $TOMCAT_HOME/lib, Glassfish3, Glassfish4) via the $WAR_HOME/META-INF/lib folder of your war file
  • How to use 9.8.4 Load-time weaving with AspectJ in the Spring Framework on a Tomcat7 CloudBees container (this would also apply to CloudBees' Glassfish 3 and 4 containers)

How to add a jar to a CloudBees container with Maven

Sample with Maven and spring-instrument-tomcat-3.2.8.RELEASE.jar

<project>
    <build>
        <plugins>
          <plugin>
                <!--
                (1) Copy spring-instrument-tomcat-3.2.8.RELEASE.jar to 'target/tomcat-extra-lib' folder during 'prepare-package' phase
                -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <artifactItems>
                        <artifactItem>
                            <groupId>org.springframework.</groupId>
                            <artifactId>spring-instrument-tomcat</artifactId>
                            <version>3.2.8.RELEASE</version>
                            <type>jar</type>
                            <outputDirectory>${project.build.directory}/tomcat-extra-lib
                            </outputDirectory>
                        </artifactItem>
                    </artifactItems>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <phase>prepare-package</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!--
                (1) Copy the content of the folder 'target/tomcat-extra-lib' in '$WAR_HOME/META-INF/lib'
                -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>${project.build.directory}/tomcat-extra-lib</directory>
                            <targetPath>META-INF/lib</targetPath>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

References

spring-load-time-weaving-clickstart's People

Contributors

cyrille-leclerc avatar

Forkers

ronysebastian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.