Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

I'm new to CAS development, but here's how I was able to get CAS up and running in eclipse:

1. Download CAS source repos:
    svn checkout https://source.jasig.org/cas-clients/java-client/tags/cas-java-client-3-1-10-final/ cas-client-3.1.10
    svn checkout https://source.jasig.org/cas3/tags/cas-server-3.4.2.1/ cas-server-3.4.2.1

2. Perform Maven2 builds:
    cd cas-client-3.1.10
    mvn package install
    cd ../cas-server-3.4.2.1
    [to enable LDAP connections: add a "cas-server-support-ldap" dependency in cas-server-webapp/pom.xml]
    mvn package install

3. Test the generated WAR file in Tomcat (a sanity check to ensure default functionality):
    cas-server-3.4.2.1/cas-server-webapp/target/cas.war

4. Prepare the Eclipse IDE
    Download and install Eclipse "Ganymede"
    Install m2eclipse plugin for Maven
    Import the cas-server-core, cas-server-ldap and cas-client-core projects from your svn repos:
        file > import > "existing maven projects"
    Create new empty "dynamic web project" in eclipse. Call it something like "CASWebappProject", for example.

5. Link the eclipse project to the maven repositories
    In the WebContent directory, delete the generated WEB-INF subdirectory
    In the WebContent directory, create the following symbolic links to the CAS source in the svn repository directory:
        ln -s <for each path to maven src listed below>
        ..cas-server-3.4.2.1/cas-server-webapp/src/main/webapp/css
        ..cas-server-3.4.2.1/cas-server-webapp/src/main/webapp/images
        ..cas-server-3.4.2.1/cas-server-webapp/src/main/webapp/js
        ..cas-server-3.4.2.1/cas-server-webapp/src/main/webapp/themes
        ..cas-server-3.4.2.1/cas-server-webapp/src/main/webapp/WEB-INF
        ..cas-server-3.4.2.1/cas-server-webapp/src/main/webapp/favicon.ico
        ..cas-server-3.4.2.1/cas-server-webapp/src/main/webapp/index.jsp
    In the CASWebappProject src directory, create a symbolic link to the maven source packages:
        ..cas-server-3.4.2.1/cas-server-webapp/src/main/java/org
    Copy the POM dependencies from Maven "target" into the web project library:
        cd into the WEB-INF directory
        cp -R ..cas-server-3.4.2.1/cas-server-webapp/target/cas-server-webapp-3.4.2.1/WEB-INF/lib/ .
    In Eclipse, use the "New Server" wizard to create a new "Server" project.
    Add the CASWebappProject to the server configuration
    Modify the WEB-INF/classes/log4j.xml so the the cas.log and perfStats.log file paths map to a permissible location
    In the CASWebappProject project, add the other projects to the build path

6. Right-click the CASWebappProject and "run as > run on server".

7. Source code changes you make in eclipse will be reflected in the maven repository.

8. To create a deployable war file, cd into cas-server-webapp in your svn repos and re-run mvn package install. The war file will be created in the "target" directory.

  • No labels