Setting up the Security Suite as an Multiple Module Eclipse Project -Walkthrough- for Linux users

This is the second draft for a howto for Linux users. It is based on the Gentoo Linux Distribution. It was tested on Ubuntu Linux as well. Other distributions may vary. Please remark: The use of the Eclipse Maven plug-in is currently discouraged.

Used versions:

  • Eclipse-SDK Europa (3.3.3)
  • Maven 2.0.7, also works with 2.1.x and 2.2.x

Here we go:

  1. Install the latest Eclipse (http://www.eclipse.org/downloads/).
  2. Download and install Maven2. Download and installation instructions here.
  3. Run mvn to create local settings folder in your local home directory. You will see some errors, but don`t mind.
  4. Install the Subclipse plugin as described here: http://subclipse.tigris.org/install.html.
  5. Get the source from the 52North Subversion Eclipse->File->Import->Other->Checkout projects from SVN, click Next=->Create a new Repository Location->Next. Use the following URL: https://core-52n.svn.sourceforge.net/svnroot/core-52n and accept all certificates. Select Security->52n-security->trunk and click Next. Select Check out as project using the New Project Wizard and confirm with Finish. Select the General->Project wizard and click Next. Choose a name and click Finish.
  6. Go to Windows->Preferences->Java->Build Path->Classpath Variables->New and create a new CLASSPATH variable (name: M2_REPO, value: ~/.m2/repository).
  7. Go to your maven install folder and copy the settings.xml from the conf subfolder to your local .m2/ folder. Open your favorite editor and insert the following inside the profiles tag insert:
    //define a profile that specifies the 52n release repository
    <profile>
      <id>52n-start</id>
      <repositories>
        <repository>
          <id>n52-releases</id>
          <name>52n Releases</name>
          <url>http://52north.org/maven/repo/releases/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
          <repository>
            <id>n52-snapshots</id>
            <name>52n Snapshots</name>
            <url>http://52north.org/maven/repo/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
            </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
         <pluginRepository>
            <id>n52-releases</id>
            <name>52n Releases</name>
            <url>http://52north.org/maven/repo/releases/</url>
        </pluginRepository>              
      </pluginRepositories>            
    
    </profile>
          
    And again under the settings tag:
    <activeProfiles>
      <activeProfile>52n-start</activeProfile>
    </activeProfiles>
          
  8. Go to the directory where your svn checked out files are located. The root directory should contain a pom.xml. Run mvn eclipse:eclipse.
  9. Go to File/Import...->Existing Projects into Workspace->Next->Select root directory->Click on "Browse->Switch into the first subfolder inside your Security API folder->OK->Uncheck "Copy projects into workspace" (this is crucial)->Finish. Repeat this step for every sub-module of the Security API. Everything went fine, if each submodule is now available as a single project in your workspace. There should not be any compile errors (unless they already existed in SVN).
  10. Go to Run->External Tools->External Tools....Select Program and create a new launch configuration. As Location, select the maven batch file (maven.bat) in you maven directory. Use the "Browse File System" Dialog. As Working Directory use ${project_loc}. As Argument insert "install" and name the configuration e.g. maven install.
  11. Repeat the previous step with other arguments to create configurations for various tasks. You can specify the maven goals of your choice as arguments. To build a WAR File specify package as argument. For further informations of the maven build lifecycle take a look here.

If you have questions or remarks please feel free to contact name@domain where name is joejoe and domain is uni-muenster.de or contribute directly.

-- JohannesBrauner - 23 Feb 2007
Topic revision: r8 - 11 Jun 2013 14:39:55, EikeJuerrens - This page was cached on 30 Jul 2016 - 11:05.

This site is powered by FoswikiCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback