Xwiki-platform-master build error

This is the first time I use xwiki. In order to meet the company’s needs, I need to modify some source code. However, I cloned from github and the build failed.
There are many places like this. I also configure pom.xml according to the official website.
please,help me ,have a nice day.
image

The org.xwiki.rest.model.jaxb.Map (same package as the class using it so no need to import it) is generated automatically through JAXB. Try to build from the console.

i re-clone the code,and mvn clean install ,however, it still build failure 。(crrrry)
image

xwiki-platform-oldcore builds fine for me on master. It’s hard to tell what the problem is on your side without seeing the actual build error. The screenshot you posted doesn’t give much detail, and anyway, posting the text log is better than uploading an image in this case.

where is text log?

this?(i am trainee,may be many stupid questions,sorry)
BTW,my build environment : java 1.8.0_271-b09 , apache-maven-3.6.3
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11:36 min
[INFO] Finished at: 2021-05-25T10:08:30+08:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile “dev” could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project xwiki-platform-filter-stream-xar: There are test failures.
[ERROR]
[ERROR] Please refer to H:\xxxx\xwiki-platform\xwiki-platform-core\xwiki-platform-filter\xwiki-platform-filter-streams\xwiki-platform-filter-stream-xar\target\surefire-reports for the i
ndividual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] → [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] MojoFailureException - Apache Maven - Apache Software Foundation
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :xwiki-platform-filter-stream-xar

i have found this.
[INFO] Running JUnit Vintage
11:47:39.982 [main] WARN o.x.f.x.i.input.DocumentLocaleReader - Unknown element [unknown] at line [3]
11:47:39.987 [main] WARN o.x.f.x.i.input.AttachmentReader - Unknown element [unknown] at line [29]
11:47:39.988 [main] WARN o.x.f.x.i.input.ClassPropertyReader - Unknown element [unknown] at line [42]
11:47:39.988 [main] WARN o.x.f.x.i.input.WikiObjectReader - Unknown element [unknown] at line [64]
11:47:39.988 [main] WARN o.x.f.x.i.input.ClassPropertyReader - Unknown element [unknown] at line [70]
[ERROR] Tests run: 44, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 1.394 s <<< FAILURE! - in JUnit Vintage
[ERROR] testSkipLastSpace Time elapsed: 0.064 s <<< FAILURE!
java.lang.AssertionError:
Following messages must be asserted: [Skipped document [space2.page2()]
]
at org.xwiki.test.AllLogRule.uninitializeLogger(AllLogRule.java:247)
at org.xwiki.test.AllLogRule.access$200(AllLogRule.java:56)
at org.xwiki.test.AllLogRule$LogStatement.after(AllLogRule.java:122)
at org.xwiki.test.AllLogRule$LogStatement.evaluate(AllLogRule.java:103)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:43)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:82)
at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:73)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:150)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)

[ERROR] testSkipFirstDocument Time elapsed: 0.02 s <<< FAILURE!
java.lang.AssertionError:
Following messages must be asserted: [Skipped document [space1.page1()]
]
at org.xwiki.test.AllLogRule.uninitializeLogger(AllLogRule.java:247)
at org.xwiki.test.AllLogRule.access$200(AllLogRule.java:56)
at org.xwiki.test.AllLogRule$LogStatement.after(AllLogRule.java:122)
at org.xwiki.test.AllLogRule$LogStatement.evaluate(AllLogRule.java:103)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:43)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:82)
at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:73)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:150)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)

[ERROR] xar/test1.output.test [filter+xml, xwiki+xar/1.1] Time elapsed: 0.065 s <<< FAILURE!
org.opentest4j.AssertionFailedError:
Entry [package.xml] has different content ==> expected: <<?xml version='1.0' encoding='UTF-8'?>


XAR Extension
Description
LGPL
Author
1.0
false
false
test


space.nestedspace.page
space.page

> but was: <<?xml version='1.0' encoding='UTF-8'?>


XAR Extension
Description
LGPL
Author
1.0
false
false
test


space.nestedspace.page
space.page

>
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1135)
at org.xwiki.filter.test.internal.StringFileAssertComparator.assertEquals(StringFileAssertComparator.java:50)
at org.xwiki.filter.test.internal.ZIPFileAssertComparator.assertEquals(ZIPFileAssertComparator.java:109)
at org.xwiki.filter.test.internal.FileAssert.assertEquals(FileAssert.java:104)
at org.xwiki.filter.test.internal.FileAssert.assertEquals(FileAssert.java:93)
at org.xwiki.filter.test.integration.FilterTest.assertExpectedResult(FilterTest.java:278)
at org.xwiki.filter.test.integration.FilterTest.runTestInternal(FilterTest.java:266)
at org.xwiki.filter.test.integration.FilterTest.execute(FilterTest.java:102)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.xwiki.filter.test.integration.FilterTestSuite$TestClassRunnerForParameters.runChild(FilterTestSuite.java:140)
at org.xwiki.filter.test.integration.FilterTestSuite$TestClassRunnerForParameters.runChild(FilterTestSuite.java:80)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:43)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:82)
at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:73)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:150)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] FilterTest.execute:102->runTestInternal:266->assertExpectedResult:278 Entry [package.xml] has different content ==> expected: <<?xml version='1.0' encoding='UTF-8'?>


XAR Extension
Description
LGPL
Author
1.0
false
false
test


space.nestedspace.page
space.page

> but was: <<?xml version='1.0' encoding='UTF-8'?>


XAR Extension
Description
LGPL
Author
1.0
false
false
test


space.nestedspace.page
space.page

>
[ERROR] XARInputFilterStreamTest.testSkipFirstDocument Following messages must be asserted: [Skipped document [space1.page1()]
]
[ERROR] XARInputFilterStreamTest.testSkipLastSpace Following messages must be asserted: [Skipped document [space2.page2()]
]
[INFO]
[ERROR] Tests run: 44, Failures: 3, Errors: 0, Skipped: 0

I’m using Java 1.8.0_292 and Maven 3.6.3 and the build for xwiki-platform-filter-stream-xar that has the testSkipFirstDocument and testSkipLastSpace tests passes for me. Double check that you followed everything from https://dev.xwiki.org/xwiki/bin/view/Community/Building/ .

i checked,it is right
but,why cant these plugins be found?
image

image

Hi @Suzi, have you imported it as a Maven project on Intellij?

Make sure you’re following this: https://dev.xwiki.org/xwiki/bin/view/Community/Building/ and add the required ~/.m2/settings.xml.

Hi, i have added the settings.xml ,I don’t know why it went wrong,sadddd
image

IntelliJ takes a while downloading the plugins and resolving the dependencies if you import xwiki-platform as a maven project (“File menu → New → Project”) or just “File menu → open”.

After that, the build should work fine.

i tried,but it still worry,
"Failed to execute goal fr.inria.gforge.spoon:spoon-maven-plugin:3.4.2:check (spoon-main) on project xwiki-platform-tool-standards-validator: Error to save result of the plugin
: java.net.URISyntaxException: Illegal character in opaque part at index 2: H:\xxxx\xwiki-platform\xwiki-platform-tools\xwiki-platform-tool-standards-validator\target\spoon-maven-plug
in\result-spoon-1622169959718.xml "
The content of this XML file is empty. I guess it’s my network problem.

This is a file generated during the build and not downloaded, so it does not feel like a network issue (unless it’s a very stretched side effect since I don’t know spoon that well).

That being said it’s not very clear to me why you are trying to build xwiki-platform-tool-standards-validator, the usual way to work on contribution is to build only what you are modifying.