Cannot start two products that use different versions of Tomcat 8

Description

For example, let's say Jira uses Tomcat 8.5.x and Confluence uses 8.0.36. If you do a mvn clean and start Jira, AMPS correctly creates the directory target/container/tomcat8x/apache-tomcat-8.5.6. But if you now try to start Confluence from the same project (e.g. via a product definition), it fails with this error (even if you shut down Jira first):

If you delete the target/container/tomcat8x/apache-tomcat-8.5.6 directory, Confluence starts up OK.

The reverse is also true; if you've run Confluence, the presence of the directory target/container/tomcat8x/apache-tomcat-8.0.36 will prevent Jira starting, and the error message will say that apache-tomcat-8.5.6 is not a directory.

I've created a minimal Maven project here that demonstrates the problem. The steps to reproduce the bug are in the README.

I created the demo project by:

  1. Running atlas-create-jira-plugin

  2. Adding the products element

  3. Deleting all the unrelated files

You can see these changes in the Git log of the demo project.

Environment

Maven 3.3.9
Java 1.8
OSX 10.13.3

Testing Notes

Add notes...

Activity

Show:
Patrick Hobusch
March 28, 2018, 2:54 PM

Hi, first of all, your repository is empty...

I found this bug report while looking for general documentation, how to work with multiple products. For anybody else looking for the documentation, I think the following is the most useful page: https://developer.atlassian.com/server/framework/atlassian-sdk/using-the-amps-maven-plugin-directly-2818721/

And regarding the bug: My workaround was creating a symlink to the "missing" directory. So e.g. Crowd 3.1.3 is creating the target/container/tomcat8x/apache-tomcat-8.5.20/ directory and Jira is claiming the missing target/container/tomcat8x/apache-tomcat-8.5.6/ directory, then I create a apache-tomcat-8.5.6 symlink to apache-tomcat-8.5.20 in target/container/tomcat8x (ln -s TARGET LINK_NAME).

Cheers

Andrew S
April 4, 2018, 3:39 AM
Edited

your repository is empty

Sorry, I forgot to push the code; I've done it now.

Andrew S
May 4, 2018, 6:16 AM

Just to help define the impact of this, the workaround given above is fine when running locally, because you get a window between starting the two products, but it doesn't help in CI, where a single mvn verify kicks off the whole process of starting the two products, running the tests, and shutting the products down again (i.e. there's no gap in which to create the symlink).

Fixed

Assignee

Pawel Przytarski

Reporter

Andrew S

Labels

Add-on Type

None

Team

None

CC

None

Risk factor

None

QA Kickoff Status

None

QA Demo Status

None

Story point estimate

None

Story Points

4

Components

Fix versions

Affects versions

Priority

Critical