Skip to content

Commit

Permalink
Merge branch 'xwiki:master' into XWIKI-19383
Browse files Browse the repository at this point in the history
  • Loading branch information
Sereza7 authored Apr 5, 2024
2 parents 897dbf6 + 91030e5 commit 9b4bf98
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 27 deletions.
16 changes: 8 additions & 8 deletions .mvn/gradle-enterprise.xml → .mvn/develocity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<gradleEnterprise
xmlns="https://www.gradle.com/gradle-enterprise-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/gradle-enterprise-maven https://www.gradle.com/schema/gradle-enterprise-maven.xsd">
<develocity
xmlns="https://www.gradle.com/develocity-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/develocity-maven https://www.gradle.com/schema/develocity-maven.xsd">
<server>
<url>https://ge.xwiki.org</url>
</server>
Expand All @@ -31,11 +31,11 @@
<!-- Always publish build scans on CI but on demand for devs so that we don't get false positives on ge.xwiki.org
due to local changes from users and so that it doesn't pollute the ge.xwiki.org data.
To force publishing a build scan: -Dscan -->
<publish>#{env['CI'] == null ? 'ON_DEMAND' : 'ALWAYS'}</publish>
<publish><![CDATA[env['CI'] == null ? 'ON_DEMAND' : 'ALWAYS']]</publish>
<captureGoalInputFiles>true</captureGoalInputFiles>
<!-- Use background scans only locally to avoid potential issues on CI (the ephemeral docker agent could terminate
as soon as the build is finished and thus the upload may be terminated before it completes) -->
<backgroundBuildScanUpload>#{env['CI'] == null}</backgroundBuildScanUpload>
<backgroundBuildScanUpload><![CDATA[env['CI'] == null]]</backgroundBuildScanUpload>
</buildScan>
<buildCache>
<!-- Notes:
Expand All @@ -44,15 +44,15 @@
more to save the goal outputs since they're not going to be re-used.
-->
<local>
<enabled>#{env['CI'] == null}</enabled>
<enabled><![CDATA[env['CI'] == null]]</enabled>
</local>
<remote>
<!-- Notes:
* To disable the remote build cache on the command line, pass: -Dgradle.cache.remote.enabled=false
-->
<enabled>true</enabled>
<!-- Only CI jobs are allowed to store build outputs in the remote cache -->
<storeEnabled>#{isTrue(env['CI']) and isTrue(env['GRADLE_ENTERPRISE_ACCESS_KEY'])}</storeEnabled>
<storeEnabled><![CDATA[isTrue(env['CI']) and isTrue(env['GRADLE_ENTERPRISE_ACCESS_KEY'])]]</storeEnabled>
<server>
<!-- Note: Remote cache authentication is handled in the Maven settings.xml file. The id below is the one
found in settings.xml -->
Expand All @@ -63,4 +63,4 @@
</server>
</remote>
</buildCache>
</gradleEnterprise>
</develocity>
4 changes: 2 additions & 2 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<extensions>
<extension>
<groupId>com.gradle</groupId>
<artifactId>gradle-enterprise-maven-extension</artifactId>
<version>1.20.1</version>
<artifactId>develocity-maven-extension</artifactId>
<version>1.21</version>
</extension>
<extension>
<groupId>com.gradle</groupId>
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@
<pluginRepositories>
<pluginRepository>
<id>xwiki-snapshots</id>
<name>XWiki Nexus Plugin Snapshot Repository Proxy</name>
<url>https://nexus.xwiki.org/nexus/content/groups/public-snapshots</url>
<name>XWiki Nexus Plugin Snapshot Repository</name>
<url>https://nexus-snapshots.xwiki.org/repository/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
Expand All @@ -342,8 +342,8 @@
<repositories>
<repository>
<id>xwiki-snapshots</id>
<name>XWiki Nexus Snapshot Repository Proxy</name>
<url>https://nexus.xwiki.org/nexus/content/groups/public-snapshots</url>
<name>XWiki Nexus Snapshot Repository</name>
<url>https://nexus-snapshots.xwiki.org/repository/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ private void prepare(Block block, Syntax parentSyntax)
try {
macro = this.macroManager.getMacro(new MacroId(macroBlock.getId(), currentSyntax));
} catch (Exception e) {
this.logger.warn(
this.logger.debug(
"Failed to get the macro with identifier [{}] for syntax [{}] (this macro block won't be prepared): {}",
macroBlock.getId(), currentSyntax, ExceptionUtils.getRootCauseMessage(e));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.xwiki.rendering.block.Block;
Expand All @@ -41,9 +40,7 @@
import org.xwiki.rendering.renderer.printer.WikiPrinter;
import org.xwiki.rendering.syntax.Syntax;
import org.xwiki.rendering.transformation.TransformationContext;
import org.xwiki.test.LogLevel;
import org.xwiki.test.annotation.AllComponents;
import org.xwiki.test.junit5.LogCaptureExtension;
import org.xwiki.test.junit5.mockito.ComponentTest;
import org.xwiki.test.junit5.mockito.InjectComponentManager;
import org.xwiki.test.junit5.mockito.InjectMockComponents;
Expand All @@ -69,9 +66,6 @@ class MacroTransformationTest
@Named("macro")
private MacroTransformation transformation;

@RegisterExtension
private LogCaptureExtension logCapture = new LogCaptureExtension(LogLevel.WARN);

/**
* Test that a simple macro is correctly evaluated.
*/
Expand Down Expand Up @@ -382,11 +376,5 @@ void prepareNotExistingMacro()
this.transformation.prepare(dom);

assertTrue(macroBlock.getAttributes().isEmpty());

assertEquals(
"Failed to get the macro with identifier [notexisting] for syntax [null]"
+ " (this macro block won't be prepared):"
+ " MacroNotFoundException: No macro [notexisting] could be found.",
this.logCapture.getMessage(0));
}
}

0 comments on commit 9b4bf98

Please sign in to comment.