Hi,
I tried to set up a developing environment for xwiki following this documentation yet I am constantly failing.
I checked out xwiki-platform repo on Win10 and using branch “stable-10.4.x”.
Output of mvn -v
:
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
Maven home: C:\Program Files (x86)\maven\apache-maven-3.5.3\bin\..
Java version: 1.8.0_172, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.8.0_172\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "x86", family: "windows"
If I use mvn install clean
I constantly get:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single (default) on project xwiki-platform-tool-jetty-resources: Failed to create assembly: Error adding file 'org.xwiki.platform:xwiki-platform-tool-jetty-listener:jar:10.4.1-SNAPSHOT' to archive: C:\Users\rbr\git\xwiki-platform\xwiki-platform-tools\xwiki-platform-tool-jetty\xwiki-platform-tool-jetty-listener\target\xwiki-platform-tool-jetty-listener-10.4.1-SNAPSHOT.jar isn't a file.
If I use mvn install
I get:
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project xwiki-platform-filter-stream-xar: There are test failures.
Please refer to C:\Users\rbr\git\xwiki-platform\xwiki-platform-core\xwiki-platform-filter\xwiki-platform-filter-streams\xwiki-platform-filter-stream-xar\target\surefire-reports for the individual test results.
The content of the file is the following:
-------------------------------------------------------------------------------
Test set: JUnit Vintage
-------------------------------------------------------------------------------
Tests run: 40, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 2.033 sec <<< FAILURE! - in JUnit Vintage
testSkipLastSpace Time elapsed: 0.078 sec <<< FAILURE!
java.lang.AssertionError:
Following messages must be asserted: [Skipped document [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.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
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:39)
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:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
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:79)
at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:70)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
at org.junit.platform.surefire.provider.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:132)
at org.junit.platform.surefire.provider.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:111)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
testSkipFirstDocument Time elapsed: 0.033 sec <<< FAILURE!
java.lang.AssertionError:
Following messages must be asserted: [Skipped document [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.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
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:39)
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:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
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:79)
at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:70)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
at org.junit.platform.surefire.provider.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:132)
at org.junit.platform.surefire.provider.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:111)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
xar/test1.output.test [filter+xml, xwiki+xar/1.1] Time elapsed: 0.058 sec <<< FAILURE!
org.opentest4j.AssertionFailedError:
Entry [package.xml] has different content ==> expected: <<?xml version='1.0' encoding='UTF-8'?>
<package>
<infos>
<name>XAR Extension</name>
<description>Description</description>
<licence>LGPL</licence>
<author>Author</author>
<version>1.0</version>
<backupPack>false</backupPack>
<preserveVersion>false</preserveVersion>
<extensionId>test</extensionId>
</infos>
<files>
<file defaultAction="0" language="">space.nestedspace.page</file>
<file defaultAction="0" language="">space.page</file>
</files>
</package>> but was: <<?xml version='1.0' encoding='UTF-8'?>
<package>
<infos>
<name>XAR Extension</name>
<description>Description</description>
<licence>LGPL</licence>
<author>Author</author>
<version>1.0</version>
<backupPack>false</backupPack>
<preserveVersion>false</preserveVersion>
<extensionId>test</extensionId>
</infos>
<files>
<file defaultAction="0" language="">space.nestedspace.page</file>
<file defaultAction="0" language="">space.page</file>
</files>
</package>>
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:52)
at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:186)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:497)
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:275)
at org.xwiki.filter.test.integration.FilterTest.runTestInternal(FilterTest.java:263)
at org.xwiki.filter.test.integration.FilterTest.execute(FilterTest.java:99)
at sun.reflect.GeneratedMethodAccessor13.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:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
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$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
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:39)
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:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
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:79)
at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:70)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
at org.junit.platform.surefire.provider.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:132)
at org.junit.platform.surefire.provider.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:111)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
If I use mvn install -Dtest=none -DfailIfNoTests=false
I get:
Failed to execute goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress (default-compress) on project xwiki-platform-job-webjar: Execution default-compress of goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress failed: Compilation produced 9 syntax errors.
If I try to import the projects into eclipse (Neon.3) I get a lot of these errors:
Plugin execution not covered by lifecycle configuration: org.xwiki.commons:xwiki-commons-tool-remote-resource-plugin:10.4.1-SNAPSHOT:process (execution: xwiki-license-resources, phase: generate-resources)
So I’m pretty lost now. Although I’m a developer I must admit that my Java is pretty rusty and I just started working with maven.
So any help is greatly apreciated.
Best regards
rbr