Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace tomcat7-maven-plugin with cargo-maven3-plugin #1522

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 94 additions & 159 deletions dev/dev-acs-amps-overlay/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<properties>
<dependency.sis.version>1.3</dependency.sis.version>

<tomcat.version>7.0.86</tomcat.version>
<tomcat.default.solr6.port>8983</tomcat.default.solr6.port>
</properties>

Expand All @@ -32,180 +31,116 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Provided dependencies to satisfy Cargo requirement, but not include in built WAR -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-server-root</artifactId>
<version>${dependency.alfresco-server-root.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>api-explorer</artifactId>
<version>${alfresco.api-explorer.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>dev-community-share-amps-overlay</artifactId>
<version>${project.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<finalName>alfresco</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<overlays>
<overlay>
<groupId>org.alfresco</groupId>
<artifactId>dev-community-repo-amps-overlay</artifactId>
<type>war</type>
</overlay>
</overlays>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
<executions>
<execution>
<id>prepare-exploded-war</id>
<goals>
<goal>exploded</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven3-plugin</artifactId>
<configuration>
<systemProperties>
<index.subsystem.name>solr6</index.subsystem.name>
<solr.port>${tomcat.default.solr6.port}</solr.port>
<dir.root>${runtime.data.folder}/alf_data</dir.root>
<solr.host>localhost</solr.host>
<solr.base.url>/solr</solr.base.url>
<solr.secureComms>secret</solr.secureComms>
<solr.sharedSecret>secret</solr.sharedSecret>
<encryption.keystore.type>pkcs12</encryption.keystore.type>
<encryption.cipherAlgorithm>AES/CBC/PKCS5Padding</encryption.cipherAlgorithm>
<encryption.keyAlgorithm>AES</encryption.keyAlgorithm>
<metadata-keystore.password>mp6yc0UD9e</metadata-keystore.password>
<metadata-keystore.aliases>metadata</metadata-keystore.aliases>
<metadata-keystore.metadata.password>mp6yc0UD9e</metadata-keystore.metadata.password>
<metadata-keystore.metadata.algorithm>AES</metadata-keystore.metadata.algorithm>
</systemProperties>
<delegate>false</delegate>
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
<contextFile>${runtime.tomcat.conf.folder}/alfresco-context.xml</contextFile>
<tomcatUsers>${runtime.tomcat.conf.folder}/tomcat-users.xml</tomcatUsers>
<webapps>
<webapp>
<container>
<containerId>tomcat9x</containerId>
<type>embedded</type>
<log>target/cargo.log</log>
<systemProperties>
<cargo.tomcat.ajp.port>-1</cargo.tomcat.ajp.port>

<index.subsystem.name>solr6</index.subsystem.name>
<solr.port>${tomcat.default.solr6.port}</solr.port>
<dir.root>${runtime.data.folder}/alf_data</dir.root>
<solr.host>localhost</solr.host>
<solr.base.url>/solr</solr.base.url>
<solr.secureComms>secret</solr.secureComms>
<solr.sharedSecret>secret</solr.sharedSecret>
<encryption.keystore.type>pkcs12</encryption.keystore.type>
<encryption.cipherAlgorithm>AES/CBC/PKCS5Padding</encryption.cipherAlgorithm>
<encryption.keyAlgorithm>AES</encryption.keyAlgorithm>
<metadata-keystore.password>mp6yc0UD9e</metadata-keystore.password>
<metadata-keystore.aliases>metadata</metadata-keystore.aliases>
<metadata-keystore.metadata.password>mp6yc0UD9e</metadata-keystore.metadata.password>
<metadata-keystore.metadata.algorithm>AES</metadata-keystore.metadata.algorithm>
</systemProperties>
</container>
<configuration>
<configfiles>
<configfile>
<file>${runtime.tomcat.conf.folder}/alfresco-context.xml</file>
<todir>conf</todir>
<tofile>context.xml</tofile>
</configfile>
<configfile>
<file>${runtime.tomcat.conf.folder}/tomcat-users.xml</file>
<todir>conf</todir>
<tofile>tomcat-users.xml</tofile>
</configfile>
</configfiles>
<files>
<file>
<file>${runtime.tomcat.conf.folder}/shared</file>
<todir>shared</todir>
</file>
</files>
</configuration>
<deployables>
<deployable>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-server-root</artifactId>
<version>${dependency.alfresco-server-root.version}</version>
<contextPath>/</contextPath>
<type>war</type>
<asWebapp>true</asWebapp>
<!-- Workaround for https://issues.apache.org/jira/browse/MTOMCAT-269 -->
<!-- tomcat7-maven-plugin does not pick up the context.xml file from META-INF -->
<contextFile>
${project.build.directory}/tomcat/webapps/alfresco-server-root/META-INF/context.xml
</contextFile>
</webapp>
<webapp>
<properties>
<context>/</context>
</properties>
</deployable>
<deployable>
<groupId>org.alfresco</groupId>
<artifactId>api-explorer</artifactId>
<version>${alfresco.api-explorer.version}</version>
<contextPath>/api-explorer</contextPath>
<type>war</type>
<asWebapp>true</asWebapp>
</webapp>
<webapp>
<properties>
<context>/api-explorer</context>
</properties>
</deployable>
<deployable>
<groupId>org.alfresco</groupId>
<artifactId>dev-community-share-amps-overlay</artifactId>
<contextPath>/share</contextPath>
<version>${project.version}</version>
<type>war</type>
<asWebapp>true</asWebapp>
</webapp>
</webapps>
<properties>
<context>/share</context>
</properties>
</deployable>
<deployable>
<groupId>org.alfresco</groupId>
<artifactId>dev-acs-community-amps-overlay</artifactId>
<type>war</type>
<properties>
<context>/alfresco</context>
</properties>
</deployable>
</deployables>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-util</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-coyote</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-dbcp</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jsp-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jasper</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jasper-el</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-el-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-tribes</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina-ha</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-annotations-api</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-juli</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-juli</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-log4j</artifactId>
<version>${tomcat.version}</version>
</dependency>
<!-- Workaround required to make Share work after Tika upgrade -->
<dependency>
<groupId>org.apache.sis.core</groupId>
Expand Down Expand Up @@ -318,8 +253,8 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven3-plugin</artifactId>
<executions>
<execution>
<id>run-exploded-webapp</id>
Expand Down
12 changes: 6 additions & 6 deletions dev/dev-tomcat/src/main/tomcat/alfresco-context.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${project.build.directory}/${project.build.finalName}" path="/alfresco">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}" />
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${runtime.tomcat.conf.folder}/shared/classes" />
<Context>
<Resources cachingAllowed="true" cacheMaxSize="102400">
<PostResources className="org.apache.catalina.webresources.DirResourceSet"
base="${catalina.home}/shared/classes"
webAppMount="/WEB-INF/classes"/>
</Resources>
</Context>
13 changes: 0 additions & 13 deletions dev/dev-tomcat/src/main/tomcat/solr-context.xml

This file was deleted.

6 changes: 3 additions & 3 deletions dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ services:
mem_limit: 2g
environment:
#Solr needs to know how to register itself with Alfresco
SOLR_ALFRESCO_HOST: "alfresco"
SOLR_ALFRESCO_HOST: "host.docker.internal"
SOLR_ALFRESCO_PORT: "8080"
#Alfresco needs to know how to call solr
SOLR_SOLR_HOST: "solr6"
SOLR_SOLR_HOST: "localhost"
SOLR_SOLR_PORT: "8983"
#Create the default alfresco and archive cores
SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive"
Expand All @@ -44,7 +44,7 @@ services:
"
SOLR_JAVA_MEM: "-Xms2g -Xmx2g"
ports:
- 8083:8983 #Browser port
- 8983:8983 #Browser port

activemq:
image: alfresco/alfresco-activemq:5.17.4-jre17-rockylinux8
Expand Down