Subversion in Infor e-Commerce Development Studio

Here is an illustration of how to setup Apache Subversion for source control in Infor e-Commerce Development Studio, such that multiple developers can work on the same e-Commerce project at the same time, for team development.

Problem

The problem is that by design an Eclipse workspace cannot be shared, i.e. there can only be one developer using a workspace at a time, others will get the message “Workspace in use or cannot be created, choose a different one”:
0

Small teams can setup multiple workspaces, one per team member, share the same source code, and mutually agree on which non-overlapping files to work on, being careful to not touch each other’s files. This is workable in small teams, but is not scalable for large teams or inexperienced team members as there is risk of data loss.

The correct solution is to setup source control software to manage that.

Objective

Supposing there a N team members doing e-Commerce development, we will setup one Subversion server & repository, and N e-Commerce Development Studios & workspaces all using the same Subversion repository. In my case, there are three developers, Thibaud, Chris, and Madan, thus I will setup three workspaces to use the same Subversion respository.

Documentation

There is a dedicated chapter in the Infor e-Commerce Development Studio User’s Guide:

Even better, there is a dedicated document in the M3 Adaptation Kit Version Control Guide, not for e-Commerce, but similar setup:
2_

What about Git?

I wish I could use Git, instead of Subversion. I believe Git would work for e-Commerce just as well as Subversion does. The e-Commerce Development Studio requires Subclipse during installation; I could install Subclipse just to surpass that, then ignore it, and install Git. However, I asked Infor Support if Git would work with e-Commerce, and they responded it has not been tested and certified to completely work, and should problems arise due to an effect from using Git, they cannot provide support for it. So I will skip Git for now, and I will try it another time.

1. Subversion server

Install a Subversion server of your choice (e.g. Apache Subversion, TortoiseSVNVisualSVN):
3

Create the users (e.g. THIBAUD, CHRIS, MADAN):
4

Create a new repository, and save the Repository URL in your notes:
5_ 5__

Schedule a regular backup of the repository, e.g.:

The Subversion repository is now ready to host the e-Commerce projects.

2. Bootstrap

Choose one user (e.g. Thibaud) to bootstrap the e-Commerce projects (e.g. B2C and B2B) to the Subversion repository for the rest of the team (e.g. Chris, Madan).

I make the assumption that the Eclipse workspace is private (non-shared), e.g. C:\Users\THIBAUD\workspace\ , that it already has the e-Commerce Development Studio fully setup, and that the e-Commerce projects (e.g. B2C, B2B) are fully setup (see previous post):

Note 1: If the projects are in a shared workspace, e.g. C:\e-Commerce\workspace\, and you want to move them to the private workspace, simply cut and paste the project folder from the shared workspace to the private workspace.

Note 2: Don’t make a duplicate (copy) of a project, because after we bootstrap the project to the Subversion repository, any duplicate of that project would be out of reach of Subversion and deprecated.

Go to Eclipse > Window > Open Perspective > SVN Repository Exploring, create new Repository Location, and enter the URL of the Subversion repository created earlier, with the username and password of the workspace’s user (e.g. THIBAUD):

For each project (e.g. B2C, and B2B), do the following:

Select > Team > Share Project:
7_

Select repository type SVN:
7__

Use existing repository location:
7___

Change folder to trunk:
7____

Enter a commit comment, e.g. Initial import:
7_____

Wait for the synchronization to finish:
7_______

Select Team > Commit:

Select everything except the following files and folders, and enter a commit comment, e.g. Initial commit:
extensions/businessobjectmethods.jar
src/com/
businessobject_timestamps.txt

Wait for the SVN Commit to finish:
8 8_

Each file now has a revision number, date, and author:

Verify in Team > Show history:
8_____

Verify the repository in the Subversion server:
8___

The project is now ready for the rest of the team to checkout.

Repeat for each project (e.g. B2C, B2B).

3. Other team members

Now we can setup the Eclipse workspaces and projects for the rest of the team (e.g. Chris, Madan).

Regarding the Eclipse IDE itself, you can choose to use a private install for each user, a shared install for all users, or a shared configuration, see the Eclipse multi-user installs.

I make the assumption that each user has the e-Commerce Development Studio fully setup, with a private workspace, e.g. C:\Users\CHRIS\workspace\ , and with no e-Commerce project (e.g. no B2C, B2B), like so:
9

Setup the SVN Repository for this user and password (e.g. CHRIS):
9_

Expand the trunk, and checkout the projects (e.g. B2C, B2B):
9__

Leave the default values and click Next:
9___

Leave the default workspace and click Finish:
9____

Wait for the SVN Checkout to finish:

Verify the result:
9______

Select the Active project:
10_

Go to Business Objects tab, click Generate Stub Codes, and wait for it to finish:
10__ 10___

That will create the files:
extensions/businessobjectmethods.jar
src/com/
businessobject_timestamps.txt

10____

If not, you may have to clean, re-build, and/or refresh the project.

This team member’s environment is now all set.

Repeat for each remaining team member.

4. Everyday development

For everyday development:

Set the Active Project as usual:
10_

Select Team > Update to HEAD to update the project with the latest changes of everyone else:
11

Make the changes you need to any of the files (e.g. JSP, CSS, HTML), and save your changes:
11_

Deploy the application or presentation as needed:
11_____

Test your changes in e-Commerce as usual:
11___

Repeat as needed: make changes, deploy, test.

When done, select the files you modified, select Team > Commit, and enter a comment of your changes; ensure you select only the files you changed, nothing else:
11__ 11____

Verify in the SVN Repository > Show History.

Now, when the other team members select Team > Update to HEAD, they will see your changes in their workspace.

Future work

Next time, I would like to try with Git instead of Subversion.

Conclusion

That was an illustration of how to setup Subversion in e-Commerce for a team to work on the same project at the same time. The first user bootstraps the project to the Subversion repository, and the other users checkout that project from the repository.

Special thanks to Wayne Liu of Infor and Marina Baldan of CAD IT for the help.

That’s it!

Please like, comment, subscribe, share, author.

Relate articles

Published by

thibaudatwork

ex- M3 Technical Consultant

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s