tigase-server icon indicating copy to clipboard operation
tigase-server copied to clipboard

maven build error

Open whwususu opened this issue 2 years ago • 7 comments

When I used Maven to compile version 8.3.0, I reported an error of ". git directory is not found! Please specify a valid [dotGitDirectory] in your pom. xml". How should I set Maven? Thank you!

whwususu avatar Jun 05 '23 10:06 whwususu

Could you please share exact steps you did to compile the Tigase and complete output?

In a nutshell, you should clone the repository, checkout the 8.3.0 tag and simply run mvn -Pdist clean install.

It seems you download only sources of the particular version without cloning the repository - we do calculate build number information based on git information.

woj-tek avatar Jun 05 '23 11:06 woj-tek

Yes, you are right. I downloaded the entire source code and compiled it through. Thank you. After I successfully compiled, I started XMPPServer in the idea and the system prompted "Please setup server at http://localhost:8080/ When I open it in a browser, the browser always fails to open. Do I need any other configuration? Thank you!

whwususu avatar Jun 06 '23 01:06 whwususu

What do you mean "fails to open"? Do you have any errors in the log? Do you have all the dependencies (including http-api component) in the classpath? Does Tigase starts listening on the port 8080?

woj-tek avatar Jun 06 '23 14:06 woj-tek

QQ图片20230612181332 I would like to include components such as tigase-server and tigase-muc in a Maven module project. Currently, I have only copied one branch of tigase server, but compilation still cannot pass. Is there any other way or integrated one?

whwususu avatar Jun 12 '23 10:06 whwususu

What are you trying to achieve?

tigase-server is the core server component. tigase-server-distribution (https://github.com/tigase/tigase-server-distribution) is a project responsible for bringing all required components and building distribution package.

You can easily build tigase-server either with maven or in IDEA - it will build just fine.

You can also run tigase-server from IDEA, but you have to include required dependencies (http-api to have the setup up and running) - you can do that by including them in the pom.xml file and reloading dependencies in IDEA.

woj-tek avatar Jun 12 '23 17:06 woj-tek

I want to modify the code of some of the components and add them as references to the tigase server code for debugging purposes

whwususu avatar Jun 13 '23 00:06 whwususu

You should follow those steps:

  1. add relevant component sources in the same project as tigase-server
  2. add them to tigase-server pom.xml as dependencies (with corresponding versions)

IDEA should pick up the correct sources when running tigase-server.

woj-tek avatar Jun 13 '23 11:06 woj-tek