elstar IT

Fullstack | Java | Tech Speaker | Tech Coach | Frank van der Linden

  • About me
  • Blog license
  • My Open source projects

XPages Quick tip: Move Java files for a better Source Control experiences

23-09-2016 4 responses flinden68 development

Over the last months we build the HR Assistant for the ICS World Wide Development Competition.

The backend of the code is totally written in Java. The XPages and custom controls only serves the data to the browser, nothing more.

 

The Problem

We have all the Java classes in the application as Java Design Elements, which give you, like any other Domino Designer Element, an metadata file. I noticed that the runtime is mirroring the java files to a java directory under the WebContent –> WEB-INF, which went sometimes gone wrong in 8.5.x

 

This metadata files was causing the most annoying conflicts when using GIT during the development, as we developed everything on our local machine and the GIT repository the linking factor.

 

My experience

Today I was looking about moving the Java files to the correct location. For the development we had a debug application with a subset of the classes to test the connectivity with Cloudant.

So I found it a good candidate to do the move first.

Note: below everything happens in the Package Explorer ( found under Menu bar –> Window –> Show Eclipse Views

Step 1: Create in the NSF under WebContent –> WEB-INF a folder, called ‘java’

java-webcontent-location

And make it as source folder, by right clicking on the folder

java-make-it-a-source-folder

 

Step 2: Move the Java files

Locate the Code/Java folder, keep in mind it is not under Code as displayed in the Applications view

java-design-elements

And copy and paste them in the new source folder

java-correct-location

Remove the files under Code/Java.

 

Build the application and everything should work as before the move.

A big benefit it is there is much less metadata files which can causing conflicts when using Source Control. Another benefit is that you remove the tight integration of the Domino Designer and you can also move the Java files to a OSGi plugin to make it more flexible.

 

BTW, In my opinion you should get used to the Package Explorer, as you do Java development, so no pretty panes. In the JEE world where they use the plain Eclipse everything happens in the Package Explorer

4 thoughts on “XPages Quick tip: Move Java files for a better Source Control experiences”

  1. Patrick Kwinten says:
    23-09-2016 at 16:44

    what if you need to make changes in them? java as folder name is kinda standard naming convention in JEE world?

    Reply
    1. Frank van der Linden says:
      24-09-2016 at 19:03

      Changes can be made just as if they were Java Design elements, as it is still a java class but not with the corresponding metadata file. Java for the directory is a jee convention to store the java files.

      Reply
  2. Andrew Magerman says:
    04-10-2016 at 14:50

    It works well. Tip: Make really sure you’re in the package Explorer (I was in the navigator at first). If the project is not really building well, look into the Build Path and resolve as you would any normal Java project.

    Reply
    1. Frank van der Linden says:
      05-10-2016 at 20:12

      Yes it the correct view. In the build path I noticed the java design elements where mirrored to the Java directory under WebContent–> WEB-INF

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • « And the winner is…… HR Assistant
  • Heads up for Salesforces Trailhead »

Contact me

My name is Frank van der Linden and I am an independent software developer based in the Netherlands. The last 2 years I was awarded as IBM Champion. Also I am on the board of OpenNTF. My specialisations are Java, Web development and Domino.


If you want to hire me, please fill in the Contact form


IBM Champion web badge
Apache Logo

All the code on this blog are under the Apache License 2.0. For more details, see Apache License 2.0

Most recent posts

  • NL Portal, a open source project
  • 10th anniversary as a freelancer and more…
  • Engage 2020: Hello are you listening, There is stream for everything
  • Spring Cloud Function on Azure run locally
  • Deploy Spring Cloud Function to IBM Cloud

Latest reactions

  • Spring Cloud Function on Azure run locally - elstar IT on Deploy Spring Cloud Function to IBM Cloud
  • flinden68 on Quick XPages tip: add Fullcalendar plugin to your application
  • Rajesh samal on Quick tip: Swagger support for Spring Webflux
  • dsieyx on Quick XPages tip: add Fullcalendar plugin to your application
  • John on Named as IBM Champion 2019

Archive

  • November 2024
  • April 2024
  • March 2020
  • February 2020
  • January 2020
  • October 2019
  • September 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • October 2018
  • September 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014

Category

  • bluemix
  • business
  • cloudant
  • community
  • development
  • hrassistant
  • openntf
  • running
  • salesforce
  • Springboot
  • Tesla
  • trailrunning
  • Uncategorized
  • watson
  • OpenNTF
  • Collaboration Today
  • XSnippets
  • Stackoverflow
  • IBM Collaboration Solutions
  • Social Business Toolkit
  • About me
  • Dutch curriculum vitae
  • English curriculum vitae
  • Google+
  • LinkedIn profile
  • Twitter
  • Slideshare
  • Blog license
  • My open source projects