diff --git a/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/java/org/xwiki/tool/xar/XARMojoTest.java b/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/java/org/xwiki/tool/xar/XARMojoTest.java index 9121b3657c..8d4e647a7b 100644 --- a/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/java/org/xwiki/tool/xar/XARMojoTest.java +++ b/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/java/org/xwiki/tool/xar/XARMojoTest.java @@ -211,6 +211,9 @@ void transformXML() throws Exception assertTrue(document.selectSingleNode("/xwikidoc/attachment/content") != null, "Insertion of attachment did not happen?"); + + assertTrue(document.selectSingleNode("//insertHereBlogXWikiClass") == null, + "Replacement of insertHereBlogXWikiClass did not happen?"); } @Test diff --git a/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/pom.xml b/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/pom.xml index d5c4ab2d96..f5db95e10a 100644 --- a/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/pom.xml +++ b/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/pom.xml @@ -60,6 +60,14 @@ INSERT_ATTACHMENT_CONTENT src/main/resources/Blog/BlogBackground.png + + + Blog/WebHome.xml + REPLACE + /xwikidoc/object/insertHereBlogXWikiClass + src/main/resources/Blog/BlogClass.xwikiclass + + diff --git a/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/src/main/resources/Blog/BlogClass.xwikiclass b/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/src/main/resources/Blog/BlogClass.xwikiclass new file mode 100644 index 0000000000..afa5a4a466 --- /dev/null +++ b/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/src/main/resources/Blog/BlogClass.xwikiclass @@ -0,0 +1,99 @@ + + Blog.BlogClass + + + + + + + + + 0 + + 0 + select + 0 + blogType + 5 + 0 + Blog type + 0 + + ,| + 1 + none + + 0 + + + local=Space blog (aggregates posts from its space only)|global=Global blog (aggregates posts from the entire wiki) + com.xpn.xwiki.objects.classes.StaticListClass + + + FullyRenderedText + + 0 + --- + description + 2 + 0 + Description + 5 + 60 + + 0 + + + com.xpn.xwiki.objects.classes.TextAreaClass + + + 0 + + 0 + select + 0 + displayType + 3 + 0 + Index display + 0 + + ,| + 1 + none + + 0 + + + paginated=Paginated|weekly=Group posts weekly|monthly=Group posts monthly|all=Show all posts + com.xpn.xwiki.objects.classes.StaticListClass + + + + 0 + itemsPerPage + 4 + integer + Items per page (only in the Paginated display mode) + 2 + + 0 + + + com.xpn.xwiki.objects.classes.NumberClass + + + <customDisplay/> + <disabled>0</disabled> + <name>title</name> + <number>1</number> + <picker>0</picker> + <prettyName>Blog title</prettyName> + <size>30</size> + <tooltip/> + <unmodifiable>0</unmodifiable> + <validationMessage/> + <validationRegExp/> + <classType>com.xpn.xwiki.objects.classes.StringClass</classType> + + diff --git a/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/src/main/resources/Blog/WebHome.xml b/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/src/main/resources/Blog/WebHome.xml index 8d3769b3a6..756a5c6fd6 100644 --- a/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/src/main/resources/Blog/WebHome.xml +++ b/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-integration-tests/src/test/resources/transformedXml/src/main/resources/Blog/WebHome.xml @@ -32,105 +32,7 @@ - - Blog.BlogClass - - - - - - - - - 0 - - 0 - select - 0 - blogType - 5 - 0 - Blog type - 0 - - ,| - 1 - none - - 0 - - - local=Space blog (aggregates posts from its space only)|global=Global blog (aggregates posts from the entire wiki) - com.xpn.xwiki.objects.classes.StaticListClass - - - FullyRenderedText - - 0 - --- - description - 2 - 0 - Description - 5 - 60 - - 0 - - - com.xpn.xwiki.objects.classes.TextAreaClass - - - 0 - - 0 - select - 0 - displayType - 3 - 0 - Index display - 0 - - ,| - 1 - none - - 0 - - - paginated=Paginated|weekly=Group posts weekly|monthly=Group posts monthly|all=Show all posts - com.xpn.xwiki.objects.classes.StaticListClass - - - - 0 - itemsPerPage - 4 - integer - Items per page (only in the Paginated display mode) - 2 - - 0 - - - com.xpn.xwiki.objects.classes.NumberClass - - - <customDisplay/> - <disabled>0</disabled> - <name>title</name> - <number>1</number> - <picker>0</picker> - <prettyName>Blog title</prettyName> - <size>30</size> - <tooltip/> - <unmodifiable>0</unmodifiable> - <validationMessage/> - <validationRegExp/> - <classType>com.xpn.xwiki.objects.classes.StringClass</classType> - - + Blog.WebHome 0 Blog.BlogClass