Xwiki-platform compile problem

Hi, guys! I download the source code that version is 12.3. I check the pom.xml and it works!

But, when i compile code, i meet another problem that is “package org.incava.util.diff.Diff is not exist”.
So i check the dependency of “java-diff” and unzip it.

org.incava
java-diff
1.1.0

In the final, I find catagolue of package is not same with .java file.
import org.incava.util.diff.Diff;
import org.incava.util.diff.Difference;

Two lines above is in “/xwiki-platform-core/xwiki-platform-annotation/xwiki-platform-annotation-maintainer/src/main/java/org/xwiki/annotation/maintainer/internal/CharacterDiffService.java” file.

Two lines below is in the zipFile “java-diff-1.1.0.jar”.
And When I change package import from above lines to below lines. it works.

import org.incava.diff.Diff;
import org.incava.diff.Difference;

So, can you check it? Is there something wrong with me?
Thanks a lot again!

Hi, WDYM by download? Ideally you should use git and do a checkout of the tag xwiki-platform-12.3.

Let us know how it goes.

Thanks

Hi, I have download source code that version is 12.3 and compile it !

If i download code with git in shell, it always fails. So i download source code package directly from github!

I think i should give some more info about compile!

The picture below is that where i download from and where the error comes from!
微信图片_20200707173416

编译报错

The picture above is the error when i compile source code of xwiki-platform!

We do give info. See https://dev.xwiki.org/xwiki/bin/view/Community/Building/

Please show us what you did and the error. This is not related to XWiki.

package
The pictures above is the category that i unzip package java-dff-1.1.0.jar!

So, i hope you can check three prictures!
Is there something wrong with me?

I’ll assume you downloaded from https://github.com/xwiki/xwiki-platform/archive/xwiki-platform-12.4.zip

Ok, I will try it and check it!
Thanks for your reply!

I am rebuilding from https://github.com/xwiki/xwiki-platform/archive/xwiki-platform-12.4.zip and it’s working very well so far… BTW why do you need to recompile since the artifacts are already compiled? You just need to compile if you make source changes and you only need to recompile that module, not everything.

Em… Sorry! I am a starter about xwiki! Language internationalization does not satisfied our need. So i accept a task that i need to read and change some code!
That’s all !

Thanks for your reply!

I confirm it builds fine.

Hi,

if the problem is about internationalization, it’s possible to submit new translations in https://l10n.xwiki.org they are usually quickly integrated in XWiki.

Ok, thanks for your remind!

Version 12.3 is fine ?

If it works then i really do not know what is wrong here?
I am rebuilding the source code (version : 12.5)

Can you show the category after unziping java-diff-1.1.0.jar like third pic ?

Thanks !

Hi, bro, I have rebuild source code that version is 12.5.1 ! But i meet the same problem with version 12.3 !

error

I have no idea about it except that i change the class import path in .java file !
I think i can give you more info!

java -version
java version “1.8.0_191”
Java™ SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot™ 64-Bit Server VM (build 25.191-b12, mixed mode)

mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/benhairui/Documents/java/apache-maven-3.6.3-bin/apache-maven-3.6.3
Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: /home/benhairui/Documents/java/jdk1.8.0_191/jre
Default locale: en_US, platform encoding: UTF-8
OS name: “linux”, version: “4.15.0-50-generic”, arch: “amd64”, family: “unix”

Rebuilding Command is “mvn clean install”
setting.xml is in next post below.

So can you help me anylasis it ?
Beside it, can you compare the category after unziping the java-diff.jar in your computer with mine above ! I want to confirm that package is or not different from mine .

Thanks again ! Have a nice day! :grinning:

This is the setting.xml !
image

To be extra safe, I tested building the annotation modules where you have problem and it works perfectly well. I think you have a problem with your environment. Maybe delete your maven local repo and try again.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for XWiki Platform - Annotations - Parent POM 12.4:
[INFO] 
[INFO] XWiki Platform - Annotations - Parent POM .......... SUCCESS [  4.311 s]
[INFO] XWiki Platform - Annotations - Core Services ....... SUCCESS [ 33.976 s]
[INFO] XWiki Platform - Annotations - References Manipulation SUCCESS [  3.390 s]
[INFO] XWiki Platform - Annotations - XWiki Storage Implementation SUCCESS [ 18.887 s]
[INFO] XWiki Platform - Annotations - Maintainer .......... SUCCESS [ 19.245 s]
[INFO] XWiki Platform - Annotations - REST Services ....... SUCCESS [ 19.137 s]
[INFO] XWiki Platform - Annotations - Scripting APIs ...... SUCCESS [ 17.242 s]
[INFO] XWiki Platform - Annotations - UI .................. SUCCESS [  6.888 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:04 min
[INFO] Finished at: 2020-07-08T10:00:46+02:00
[INFO] ------------------------------------------------------------------------

Thanks for your advice! I try with that and it works right now!

I delete the java-diff.jar and rebuild the module that you have show above .
finally, it success!

So the problem is that the package java-diff.jar in maven central repository is different with it in the xwiki respository!

Because of the network speed,After I follow the link that you had gave above and configure , then I rebuild source code, but i can not download the package java-diff.jar at the beginning. So I change the repository to maven repository and it works !

Now it is clear! The java-diff.jar package in the maven central repository and xwiki respository is different ! Did someone change the package?I have try two pakcage of different version, its category is same!

Finally, thanks for your help!
Respect ! :+1: :grinning: