mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merge pull request #4 from Alfresco/develop
sync feature branch with develop
This commit is contained in:
43
pom.xml
43
pom.xml
@@ -30,6 +30,8 @@
|
|||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<licenseName>community</licenseName>
|
||||||
|
|
||||||
<index.subsystem.name>buildonly</index.subsystem.name>
|
<index.subsystem.name>buildonly</index.subsystem.name>
|
||||||
<dir.root>${project.build.directory}/alf_data</dir.root>
|
<dir.root>${project.build.directory}/alf_data</dir.root>
|
||||||
<img.exe>convert</img.exe>
|
<img.exe>convert</img.exe>
|
||||||
@@ -1147,10 +1149,51 @@
|
|||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>license-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
|
||||||
|
<organizationName>Alfresco Software Limited</organizationName>
|
||||||
|
<failOnMissingHeader>true</failOnMissingHeader>
|
||||||
|
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
|
||||||
|
<licenseResolver>classpath://alfresco</licenseResolver>
|
||||||
|
<licenseName>${licenseName}</licenseName>
|
||||||
|
<roots>
|
||||||
|
<root>src</root>
|
||||||
|
</roots>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.java</include>
|
||||||
|
<include>**/*.jsp</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>check-licenses</id>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>check-file-header</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.alfresco</groupId>
|
||||||
|
<artifactId>alfresco-license-headers</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>license-maven-plugin</artifactId>
|
||||||
|
<version>1.13</version>
|
||||||
|
</plugin>
|
||||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.eclipse.m2e</groupId>
|
<groupId>org.eclipse.m2e</groupId>
|
||||||
|
@@ -32,6 +32,9 @@ import static org.mockito.Mockito.when;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.alfresco.service.cmr.repository.MimetypeService;
|
import org.alfresco.service.cmr.repository.MimetypeService;
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
@@ -110,6 +113,25 @@ public class TransformerDebugTest
|
|||||||
debug.setTransformerConfig(transformerConfig);
|
debug.setTransformerConfig(transformerConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replaces any transformer reference numbers N.N.N with "0" before checking
|
||||||
|
private String[] unnumbered(String actual[])
|
||||||
|
{
|
||||||
|
for (int i = actual.length-1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
StringJoiner sj = new StringJoiner("\n");
|
||||||
|
String[] bits = actual[i].split("\n");
|
||||||
|
for (String bit: bits)
|
||||||
|
{
|
||||||
|
Pattern p = Pattern.compile("^[0-9.]*");
|
||||||
|
Matcher m = p.matcher(bit);
|
||||||
|
bit = m.replaceFirst("0");
|
||||||
|
sj.add(bit);
|
||||||
|
}
|
||||||
|
actual[i] = sj.toString();
|
||||||
|
}
|
||||||
|
return actual;
|
||||||
|
}
|
||||||
|
|
||||||
// Replaces any times with " NN ms" before checking
|
// Replaces any times with " NN ms" before checking
|
||||||
private String[] untimed(String[] actual)
|
private String[] untimed(String[] actual)
|
||||||
{
|
{
|
||||||
@@ -146,8 +168,8 @@ public class TransformerDebugTest
|
|||||||
"0 --a) [---] transformer1<<Component>> > 50 KB\n"+
|
"0 --a) [---] transformer1<<Component>> > 50 KB\n"+
|
||||||
"0 --b) [---] transformer3<<Component>> > 50 KB\n"+
|
"0 --b) [---] transformer3<<Component>> > 50 KB\n"+
|
||||||
"0 --c) [---] transformer4<<Component>> > 50 KB\n"+
|
"0 --c) [---] transformer4<<Component>> > 50 KB\n"+
|
||||||
"0 Finished in NN ms Transformer NOT called\n"}, untimed(debug.getEntries(10)));
|
"0 Finished in NN ms Transformer NOT called"}, unnumbered(untimed(debug.getEntries(10))));
|
||||||
assertLogEntriesEquals(new String[] {
|
assertLogEntriesEquals(new String[] {
|
||||||
"0 pdf txt WARN 1.5 MB NN ms No transformers as file is > 50 KB"}, untimed(log.getEntries(10)));
|
"0 pdf txt WARN 1.5 MB NN ms No transformers as file is > 50 KB"}, unnumbered(untimed(log.getEntries(10))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user