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

XCOMMONS-3174: Move org.xwiki.cache.util.AbstractCache#AbstractCache() to legacy #1128

Merged
merged 1 commit into from
Oct 17, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
<xwiki.jacoco.instructionRatio>0.10</xwiki.jacoco.instructionRatio>
<!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions -->
<xwiki.extension.features>org.xwiki.platform:xwiki-platform-cache-api</xwiki.extension.features>
<!-- Skipping revapi since xwiki-commons-legacy-cache-api wraps this module and runs checks on it -->
<xwiki.revapi.skip>true</xwiki.revapi.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/**
* Base class for {@link Cache} implementations. It provides events {@link DisposableCacheValue} management.
*
*
* @param <T> the class of the data stored in the cache.
* @version $Id$
*/
Expand All @@ -52,15 +52,6 @@ public abstract class AbstractCache<T> implements Cache<T>
*/
protected final EventListenerList cacheEntryListeners = new EventListenerList();

/**
* @deprecated since 8.3RC1, use {@link #AbstractCache(CacheConfiguration)} instead
*/
@Deprecated
public AbstractCache()
{
this(null);
}

/**
* @param configuration the configuration of the cache
*/
Expand Down
1 change: 1 addition & 0 deletions xwiki-commons-core/xwiki-commons-legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<xwiki.enforcer.no-legacy-dependencies.skip>true</xwiki.enforcer.no-legacy-dependencies.skip>
</properties>
<modules>
<module>xwiki-commons-legacy-cache</module>
<module>xwiki-commons-legacy-classloader</module>
<module>xwiki-commons-legacy-component</module>
<module>xwiki-commons-legacy-configuration</module>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-legacy</artifactId>
<version>16.9.0-SNAPSHOT</version>
</parent>
<artifactId>xwiki-commons-legacy-cache</artifactId>
<name>XWiki Commons - Legacy - Cache - Parent POM</name>
<packaging>pom</packaging>
<description>Legacy modules for xwiki-commons-cache-*</description>
<modules>
<module>xwiki-commons-legacy-cache-api</module>
</modules>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-legacy-cache</artifactId>
<version>16.9.0-SNAPSHOT</version>
</parent>
<artifactId>xwiki-commons-legacy-cache-api</artifactId>
<name>XWiki Commons - Legacy - Classloader - API</name>
<packaging>jar</packaging>
<description>Legacy module for xwiki-commons-cache-api</description>
<properties>
<xwiki.jacoco.instructionRatio>0.00</xwiki.jacoco.instructionRatio>
<!-- The features provided by this module so that it's found when resolving extension -->
<xwiki.extension.features>org.xwiki.commons:xwiki-commons-cache-api</xwiki.extension.features>
</properties>
<dependencies>
<!-- Trigger xwiki-commons-cache-api (but without xwiki-commons-cache-api jar itself) -->
<dependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-cache-api</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>

<!-- Needed for backward compatibility Aspects -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>

<!-- We need this dependency so that the wrapped module is built before this one -->
<dependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-cache-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Apply Compatibility Aspects -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<executions>
<execution>
<id>backward-compatibility-aspects</id>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<weaveDependencies>
<weaveDependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-cache-api</artifactId>
</weaveDependency>
</weaveDependencies>
</configuration>
</plugin>
<!-- Exclude AspectJ's builddef.lst file form the generated JAR since it's not useful there. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/builddef.lst</exclude>
</excludes>
</configuration>
</plugin>
<!-- Make sure we run the tests only with the aspectified JARs since otherwise components will be registered
twice for example. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<classpathDependencyExcludes>
<classpathDependencyExcludes>org.xwiki.commons:xwiki-commons-cache-api:jar</classpathDependencyExcludes>
</classpathDependencyExcludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

package org.xwiki.cache.util;

public privileged aspect AbstractCacheCompatibilityAspect
{
/**
* @deprecated since 8.3RC1, use {@link #AbstractCache(CacheConfiguration)} instead
*/
@Deprecated(since = "8.3RC1")
public AbstractCache.new() {
this(null);
}
}