mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-24 14:32:01 +00:00
Compare commits
12 Commits
18.3
...
repo-5439v
Author | SHA1 | Date | |
---|---|---|---|
|
7c37144678 | ||
|
01977e06bd | ||
|
6559994575 | ||
|
c054a8a2de | ||
|
582c09563c | ||
|
019ad6da47 | ||
|
a17bb830f2 | ||
|
d062140883 | ||
|
993f42c877 | ||
|
6ba5c3ac35 | ||
|
a9cf423885 | ||
|
047c47def4 |
@@ -33,7 +33,7 @@ stages:
|
|||||||
- name: test
|
- name: test
|
||||||
if: commit_message !~ /\[skip tests\]/
|
if: commit_message !~ /\[skip tests\]/
|
||||||
- name: release
|
- name: release
|
||||||
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no release\]/
|
if: fork = false AND (branch = master OR branch =~ /release\/.*/ OR branch =~/fix\/.*/) AND type != pull_request AND commit_message !~ /\[no release\]/
|
||||||
- name: update_downstream
|
- name: update_downstream
|
||||||
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no downstream\]/
|
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no downstream\]/
|
||||||
- name: trigger_downstream
|
- name: trigger_downstream
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@@ -424,6 +424,7 @@ public abstract class AbstractAsynchronouslyRefreshedCache<T>
|
|||||||
@Override
|
@Override
|
||||||
public Void call()
|
public Void call()
|
||||||
{
|
{
|
||||||
|
liveLock.writeLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
doCall();
|
doCall();
|
||||||
@@ -444,6 +445,10 @@ public abstract class AbstractAsynchronouslyRefreshedCache<T>
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
liveLock.writeLock().unlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doCall() throws Exception
|
private void doCall() throws Exception
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -9,6 +9,6 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
</project>
|
</project>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
4
pom.xml
4
pom.xml
@@ -2,7 +2,7 @@
|
|||||||
<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/xsd/maven-4.0.0.xsd">
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Alfresco Community Repo Parent</name>
|
<name>Alfresco Community Repo Parent</name>
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||||
<tag>HEAD</tag>
|
<tag>repo-5439v2-c2</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@@ -1081,7 +1081,6 @@
|
|||||||
<property name="authorityService" ref="AuthorityService" />
|
<property name="authorityService" ref="AuthorityService" />
|
||||||
<property name="tenantAdminService" ref="tenantAdminService"/>
|
<property name="tenantAdminService" ref="tenantAdminService"/>
|
||||||
<property name="networksService" ref="networksService"/>
|
<property name="networksService" ref="networksService"/>
|
||||||
<property name="cmisCreateDocRequestRenditionsSet" value="${cmis.create.doc.request.renditions.set}" />
|
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="cmisDispatcherRegistry" class="org.alfresco.opencmis.CMISDispatcherRegistryImpl">
|
<bean id="cmisDispatcherRegistry" class="org.alfresco.opencmis.CMISDispatcherRegistryImpl">
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>8.393-SNAPSHOT</version>
|
<version>repo-5439v2-c2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@@ -211,16 +211,6 @@ public class AlfrescoCmisServiceFactory extends AbstractServiceFactory
|
|||||||
}
|
}
|
||||||
|
|
||||||
AlfrescoCmisService service = getCmisServiceTarget(connector);
|
AlfrescoCmisService service = getCmisServiceTarget(connector);
|
||||||
if (service instanceof AlfrescoCmisServiceImpl)
|
|
||||||
{
|
|
||||||
Set<String> stringSet = parseCommaSeparatedSet(getCmisCreateDocRequestRenditionsSet());
|
|
||||||
((AlfrescoCmisServiceImpl)service).setCmisRequestRenditionsOnCreateDoc(stringSet);
|
|
||||||
|
|
||||||
if (logger.isTraceEnabled())
|
|
||||||
{
|
|
||||||
logger.trace("getService: cmis.create.doc.request.renditions.set=" + stringSet);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wrap it
|
// Wrap it
|
||||||
ProxyFactory proxyFactory = new ProxyFactory(service);
|
ProxyFactory proxyFactory = new ProxyFactory(service);
|
||||||
@@ -245,7 +235,13 @@ public class AlfrescoCmisServiceFactory extends AbstractServiceFactory
|
|||||||
|
|
||||||
protected AlfrescoCmisService getCmisServiceTarget(CMISConnector connector)
|
protected AlfrescoCmisService getCmisServiceTarget(CMISConnector connector)
|
||||||
{
|
{
|
||||||
return new AlfrescoCmisServiceImpl(connector);
|
AlfrescoCmisServiceImpl cmisService = new AlfrescoCmisServiceImpl(connector);
|
||||||
|
|
||||||
|
Set<String> stringSet = parseCommaSeparatedSet(getCmisCreateDocRequestRenditionsSet());
|
||||||
|
logger.trace("getCmisServiceTarget: cmis.create.doc.request.renditions.set=" + stringSet);
|
||||||
|
cmisService.setCmisRequestRenditionsOnCreateDoc(stringSet);
|
||||||
|
|
||||||
|
return cmisService;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set<String> parseCommaSeparatedSet(String str)
|
private Set<String> parseCommaSeparatedSet(String str)
|
||||||
|
@@ -150,24 +150,10 @@ public final class DefaultSimpleCache<K extends Serializable, V extends Object>
|
|||||||
* @return <code>true</code> if the put resulted in a change in value, <code>false</code> otherwise.
|
* @return <code>true</code> if the put resulted in a change in value, <code>false</code> otherwise.
|
||||||
*/
|
*/
|
||||||
public boolean putAndCheckUpdate(K key, V value)
|
public boolean putAndCheckUpdate(K key, V value)
|
||||||
{
|
|
||||||
return putAndCheckUpdate(key, value, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <code>put</code> method that may be used to check for updates in a thread-safe manner.
|
|
||||||
*
|
|
||||||
* @param includeNewCheck if true then we include the new value in the check
|
|
||||||
* @return <code>true</code> if the put resulted in a change in value,
|
|
||||||
* or if includeNewCheck is true and the put resulted in a new value,
|
|
||||||
* <code>false</code> otherwise.
|
|
||||||
*/
|
|
||||||
public boolean putAndCheckUpdate(K key, V value, boolean includeNewCheck)
|
|
||||||
{
|
{
|
||||||
AbstractMap.SimpleImmutableEntry<K, V> kvp = new AbstractMap.SimpleImmutableEntry<K, V>(key, value);
|
AbstractMap.SimpleImmutableEntry<K, V> kvp = new AbstractMap.SimpleImmutableEntry<K, V>(key, value);
|
||||||
AbstractMap.SimpleImmutableEntry<K, V> priorKVP = cache.asMap().put(key, kvp);
|
AbstractMap.SimpleImmutableEntry<K, V> priorKVP = cache.asMap().put(key, kvp);
|
||||||
|
return (priorKVP != null && (!priorKVP.equals(kvp)));
|
||||||
return (includeNewCheck && priorKVP == null) || (priorKVP != null && (!priorKVP.equals(kvp)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -136,7 +136,6 @@
|
|||||||
<property name="tenantAware" value="false" />
|
<property name="tenantAware" value="false" />
|
||||||
<property name="cacheStats" ref="cacheStatistics"/>
|
<property name="cacheStats" ref="cacheStatistics"/>
|
||||||
<property name="cacheStatsEnabled" value="${cache.immutableEntitySharedCache.tx.statsEnabled}"/>
|
<property name="cacheStatsEnabled" value="${cache.immutableEntitySharedCache.tx.statsEnabled}"/>
|
||||||
<property name="allowEqualsChecks" value="true" />
|
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -131,45 +131,6 @@ public class DefaultSimpleCacheTest extends SimpleCacheTestBase<DefaultSimpleCac
|
|||||||
assertEquals(false, cache.putAndCheckUpdate(104, "104"));
|
assertEquals(false, cache.putAndCheckUpdate(104, "104"));
|
||||||
assertEquals(true, cache.putAndCheckUpdate(104, null));
|
assertEquals(true, cache.putAndCheckUpdate(104, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void putAndCheckUpdateIncludeNewCheck()
|
|
||||||
{
|
|
||||||
// Put an initial value
|
|
||||||
cache.put(101, "101");
|
|
||||||
// Update it
|
|
||||||
assertEquals(true, cache.putAndCheckUpdate(101, "99101", true));
|
|
||||||
// Check the value really was updated
|
|
||||||
assertEquals("99101", cache.get(101));
|
|
||||||
|
|
||||||
// Precondition: no value for key 102
|
|
||||||
assertFalse(cache.contains(102));
|
|
||||||
// Put a value - and test the return
|
|
||||||
assertEquals(true, cache.putAndCheckUpdate(102, "102", true));
|
|
||||||
assertEquals("102", cache.get(102));
|
|
||||||
|
|
||||||
cache.put(103, null);
|
|
||||||
assertEquals(true, cache.putAndCheckUpdate(103, "103", true));
|
|
||||||
// Repeat the put, this should not be an update
|
|
||||||
assertEquals(false, cache.putAndCheckUpdate(103, "103", true));
|
|
||||||
|
|
||||||
assertFalse(cache.contains(104));
|
|
||||||
assertEquals(true, cache.putAndCheckUpdate(104, null, true));
|
|
||||||
// Repeat putting null - still not an update, as we had that value a moment ago.
|
|
||||||
assertEquals(false, cache.putAndCheckUpdate(104, null, true));
|
|
||||||
// Now an update
|
|
||||||
assertEquals(true, cache.putAndCheckUpdate(104, "104", true));
|
|
||||||
// Another update
|
|
||||||
assertEquals(true, cache.putAndCheckUpdate(104, "99104", true));
|
|
||||||
// Another update, back to null
|
|
||||||
assertEquals(true, cache.putAndCheckUpdate(104, null, true));
|
|
||||||
// Not an update - still null
|
|
||||||
assertEquals(false, cache.putAndCheckUpdate(104, null, true));
|
|
||||||
|
|
||||||
cache.remove(104);
|
|
||||||
assertEquals(true, cache.putAndCheckUpdate(104, "104", true));
|
|
||||||
assertEquals(true, cache.putAndCheckUpdate(104, null, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Timer-based tests are not ideal. An alternative approach is to factor out the CacheBuilder.newBuilder()
|
// TODO: Timer-based tests are not ideal. An alternative approach is to factor out the CacheBuilder.newBuilder()
|
||||||
// call to a protected method, override that in this test class to return a mock and use the mock to check
|
// call to a protected method, override that in this test class to return a mock and use the mock to check
|
||||||
|
@@ -14,6 +14,7 @@ git config user.email "${GIT_EMAIL}"
|
|||||||
mvn -B \
|
mvn -B \
|
||||||
-PfullBuild,all-tas-tests \
|
-PfullBuild,all-tas-tests \
|
||||||
"-Darguments=-PfullBuild,all-tas-tests -DskipTests -Dbuild-number=${TRAVIS_BUILD_NUMBER}" \
|
"-Darguments=-PfullBuild,all-tas-tests -DskipTests -Dbuild-number=${TRAVIS_BUILD_NUMBER}" \
|
||||||
|
-DreleaseVersion=repo-5439v2-c2 -DdevelopmentVersion=8.400-SNAPSHOT \
|
||||||
release:clean release:prepare release:perform \
|
release:clean release:prepare release:perform \
|
||||||
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
|
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
|
||||||
-Dusername="${GIT_USERNAME}" \
|
-Dusername="${GIT_USERNAME}" \
|
||||||
|
@@ -13,10 +13,10 @@ printf "POM version: %s\n" "${POM_VERSION}"
|
|||||||
|
|
||||||
TAG="${POM_VERSION%-SNAPSHOT}"
|
TAG="${POM_VERSION%-SNAPSHOT}"
|
||||||
|
|
||||||
if git rev-parse "${TAG}^{tag}" &>/dev/null ; then
|
#if git rev-parse "${TAG}^{tag}" &>/dev/null ; then
|
||||||
echo "The next tag \"${TAG}\" already exists in the git project"
|
# echo "The next tag \"${TAG}\" already exists in the git project"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
popd
|
popd
|
||||||
set +vex
|
set +vex
|
||||||
|
Reference in New Issue
Block a user