DPascalBernard / maven-alfresco-archetypes

Automatically exported from code.google.com/p/maven-alfresco-archetypes
0 stars 0 forks source link

Embedded tomcat port configuration #154

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Would be nice if the port would be configurable to which Tomcat binds in 
amp-to-war profile. This way Alfresco and Share AMP projects can be started 
simultaneously, Share using the Alfresco.

This could be done by following addition in alfresco-sdk-parent (using 1.1.0 
right now):

  <plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>run-wars</id>
            <goals>
                <goal>run-war-only</goal>
            </goals>
            <phase>integration-test</phase>
            <configuration>
                <contextFile>${alfresco.client.war.folder}/WEB-INF/context.xml</contextFile>
                <!-- To run a non WAR project -->
                <ignorePackaging>true</ignorePackaging>
                <port>${alfresco.client.port}</port>
            </configuration>
        </execution>
    </executions>
  </plugin>

Probably it's possible to also configure the port using the context.xml file in 
AMP project, but I could not quickly find how.

Original issue reported on code.google.com by bulat.ya...@gmail.com on 6 Nov 2013 at 9:36

GoogleCodeExporter commented 8 years ago
Hey Bulat,

I think we could use the standard Tomcat7 Maven plugin property for that, i.e.

http://tomcat.apache.org/maven-plugin-2.0/tomcat7-maven-plugin/run-war-only-mojo
.html#port

Meaning, you can always configure in your POM <properties> section:

<maven.tomcat.port>8888</maven.tomcat.port>

and whatever execution of the Tomcat7 Maven plugin will honor that.

Closing this with Won't Fix as the mentioned solution should provide enough 
flexibility already. Feel free to reopen if I'm missing something.

Makes sense?

Original comment by colum...@gmail.com on 17 Nov 2013 at 3:14

GoogleCodeExporter commented 8 years ago
Thanks, the <maven.tomcat.port>8888</maven.tomcat.port> config works perfectly!

Original comment by bulat.ya...@gmail.com on 17 Nov 2013 at 3:43