You are here: Foswiki>Applications Web>ApMigrationToGitWorkshop (07 Aug 2019, JuttaFitzek)Edit Attach

Migration to Git Workshop 2019-08-07

Prerequisit steps for the workshop

  • You will need a working xdmcp-session on one of the cluster machines asl74x, so please check your login etc. today

  • create a new empty workspace by calling
    /common/usr/lsa/bin/mkws/mkws.common -ws PATH_TO_WORKSPACE
  • afterwards, please start Eclipse using
    • for members of groups cscoap or lsa: simply call
      eclipse-app-2019-03
    • for non-members of cscoap/lsa:
      /common/usr/cscoap/opt/eclipse/2019-03/eclipse-app-2019-03

  • eventually, if not yet done, please follow all these instructions to setup Maven (typically, you have done this before and do not need to do it again)

Migrating a project

For migrating the project, please follow the steps described 15 steps to migrating a project including Jenkins and project renaming.

Eclipse Run Configurations

After successful migration, we already got the project from Git. After updating the pom.xml as described, we have to make a smoke test to see, if our application is still running.

After using the mkws scripts, you already have one run configuration exec-java-on-type. This executes the currently selected class with a main method with the dev environment configuration and database.

You might want to setup more goals in order to run the application against the pro environment you can do this by duplicating and modifying the existing configuration in eclipse:

exec-java-on-type PRO 2tier

  1. Select Eclipse Menu -> Run
  2. Run Configurations ...
    1. Screenshot
  3. Select the Group Maven Build -> exec-java-on-type
  4. Secondary-Mouse-Button -> Select Duplicate
  5. Select the Name Field on the top right and enter a suitable name like exec-java-on-type PRO 2tier
  6. In the field Profiles: add pro-2tier
    1. List of available profiles: APHowToLaunchAppsWithMaven
  7. Click Apply
type-pro-2tier.png

exec-java-on-pom

I also suggest to create a target exec-java-on-pom which simply uses the main class configured in the pom file of the currently selected project. This might save you some time if this is mostly what you wanted because you don't have to select a specific class. Again you can simply duplicate the run configuration and remove the bundle.mainClass parameter. This only works well if you mostly use one main class in your project.

Here you can also select a profile like PRO 2tier. In Profile add "pro-2tier".

on-pom.png

For this you have to make sure you have an appropriate entry in you pom.xml file.
<properties>
    <bundle.mainClass>de.gsi.fcc.requester.app.RequesterApp</bundle.mainClass>
    <!-- ... other properties -->
</properties>

More Information

For more Information and profiles set, please check the Wiki Site on how to launch Apps with Maven.
Topic attachments
I Attachment Action Size Date Who Comment
on-pom.pngpng on-pom.png manage 114 K 07 Aug 2019 - 06:30 BenjaminPeter  
run-configuration-menu.pngpng run-configuration-menu.png manage 156 K 07 Aug 2019 - 06:36 BenjaminPeter  
type-pro-2tier.pngpng type-pro-2tier.png manage 120 K 07 Aug 2019 - 06:30 BenjaminPeter  
Topic revision: r4 - 07 Aug 2019, JuttaFitzek
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 Foswiki? Send feedback