jackrabbit icon indicating copy to clipboard operation
jackrabbit copied to clipboard

JCR-4892: support the jakarta.servlet package name

Open jespersm opened this issue 1 year ago • 8 comments

This is an update of JCR-4892 on top of current trunk

jespersm avatar Jun 09 '24 17:06 jespersm

Thank you for migrating Jackrabbit to the Jakarta namespace.

Can you estimate when this feature will be released?

oleosterhagen avatar Jun 16 '25 16:06 oleosterhagen

No, not really; this lacks both test coverage and energy to get it done.

reschke avatar Jun 16 '25 17:06 reschke

I wonder, is there no automatic pipeline runner set up for this repo? Or am I doing something wrong?

Also: @oleosterhagen : Can you test this to ensure we resulting jar match you expectations and use case?

jespersm avatar Jun 24 '25 19:06 jespersm

I wonder, is there no automatic pipeline runner set up for this repo? Or am I doing something wrong?

Not here, only for Jackrabbit Oak.

EDIT: working on it, see https://issues.apache.org/jira/browse/JCR-5157

reschke avatar Jun 25 '25 06:06 reschke

Also: @oleosterhagen : Can you test this to ensure we resulting jar match you expectations and use case?

We have now migrated enough parts of our application to run the first tests. We deploy the Jackrabbit Webapp to a JBoss application server (now JBoss 8.x / Jakarta EE 10). We use

  • the WebDAV interface
  • JCR operations (for cleanup)

Both use cases work with this PR as expected. Two things I have noticed:

  1. For jackrabbit-webapp-jakarta (pom.xml) only a WAR and no additional JAR (e.g. jackrabbit-webapp-2.22.0.jar) is created. We need the JAR as a dependency in an overlay to refer to classes from Jackrabbit.

The JAR can be produced with a second execution of the transformer-maven-plugin and an extra attach for the resulting JAR:

[...]
          </execution>
          <execution>
            <id>default-jar</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <artifact>
                <groupId>org.apache.jackrabbit</groupId>
                <artifactId>jackrabbit-webapp</artifactId>
                <version>${project.version}</version>
                <type>jar</type>
              </artifact>
              <type>jar</type>
              <attach>false</attach>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-jar</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.build.directory}/jackrabbit-webapp-jakarta-${project.version}.jar</file>
                  <type>jar</type>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
[...]
  1. The Derby database driver is no longer included in the WAR. That is unrelated to this PR and already the case in Jackrabbit 2.22.0. @reschke Is the change of the scope to test in https://github.com/apache/jackrabbit/pull/157/files#diff-de0290e6ab0121b9a3d0753f5a4ffc5977e9097a52fa1ca76cf2390035d9c6b3 intentional? (It is no problem for us to include the needed driver JARs in our WAR overlay.)

oleosterhagen avatar Jul 10 '25 17:07 oleosterhagen

@oleosterhagen : Thank you for checking, sounds promising. I will not be looking at this PR over the next few weeks, and haven't tackled the package renaming situation.

jespersm avatar Jul 10 '25 18:07 jespersm

@oleosterhagen - as far as I can tell, the Derby driver is still there.

reschke avatar Aug 12 '25 08:08 reschke

@reschke Thank you for your reply. I commented directly on the change: https://github.com/apache/jackrabbit/pull/157/files#r2277386239

oleosterhagen avatar Aug 14 '25 18:08 oleosterhagen