Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-744

Consider build steps as opposed to code duplication for Tomcat container integration code

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.0.0.Final
    • None

      Since 2.0 we are using code duplication that is then recompiled against Tomcat libraries. This is step from recompiling against common module which is not safe.

      To deal with this on a build level is quite simple: files that don't require changes for a specific Tomcat version can be just copied to the module and then compiled against proper Tomcat dependencies.

      However, this is not usable from na IDE. For instance, IDEA doesn't allow same source root to be used from multiple modules: https://youtrack.jetbrains.com/issue/IDEA-201683

          <build>
              <plugins>
                  <plugin>
                      <groupId>org.codehaus.mojo</groupId>
                      <artifactId>build-helper-maven-plugin</artifactId>
                      <executions>
                          <execution>
                              <id>add-source-tomcat-common</id>
                              <phase>generate-sources</phase>
                              <goals>
                                  <goal>add-source</goal>
                              </goals>
                              <configuration>
                                  <sources>
                                      <source>${tomcat-common-sources-path}/src/main/java</source>
                                  </sources>
                              </configuration>
                          </execution>
                          <execution>
                              <id>add-test-source-tomcat-common</id>
                              <phase>generate-sources</phase>
                              <goals>
                                  <goal>add-test-source</goal>
                              </goals>
                              <configuration>
                                  <sources>
                                      <source>${tomcat-common-sources-path}/src/test/java</source>
                                  </sources>
                              </configuration>
                          </execution>
                      </executions>
                  </plugin>
              </plugins>
          </build>
      
      

              rhn-engineering-rhusar Radoslav Husar
              rhn-engineering-rhusar Radoslav Husar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: