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:
Adding the products element
Deleting all the unrelated files
You can see these changes in the Git log of the demo project.
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).
your repository is empty
Sorry, I forgot to push the code; I've done it now.
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).