powered by Jive Software

Openfire project setup in Intellij IDEA

I have downloaded the latest sources of Openfire from github and imported the project into Intellij IDEA.
When I build the project the following errors are thrown:

Error:(19, 25) java: package com.install4j.api does not exist
Error:(20, 25) java: package com.install4j.api does not exist
Error:(21, 25) java: package com.install4j.api does not exist
Error:(30, 34) java: cannot find symbol
  symbol: class UninstallAction
Error:(38, 34) java: cannot find symbol
  symbol:   class Context
  location: class org.jivesoftware.openfire.launcher.Uninstaller
Error:(38, 51) java: cannot find symbol
  symbol:   class ProgressInterface
  location: class org.jivesoftware.openfire.launcher.Uninstaller
Error:(32, 5) java: method does not override or implement a method from a supertype
Error:(37, 5) java: method does not override or implement a method from a supertype
Error:(56, 16) java: cannot find symbol
  symbol:   variable super
  location: class org.jivesoftware.openfire.launcher.Uninstaller

I tried adding i4jruntime.jar from build/lib directory in modules dependencies as suggested here but it throws another error

Content root "Openfire\src\java" is defined for modules "starter" and "webadmintld".
Two modules in a project cannot share the same content root.

Earlier I tried in eclipse too where the errors ran into thousands.

Please help me with setting up the project and how to debug it.

Thanks.

How did you import it? The best way is to tell it to import the pom.xml, rather than the whole directory.

Greg

Thanks for the reply.

I am completely new to Maven and followed suggestions found in google.

I imported as Existing Maven Project into eclipse and selected the pom files.
It shows the error

No marketplace entries found to handle native2ascii-maven-plugin:1.0-beta-1:native2ascii in Eclipse

I followed the suggested solutions here and set it to my own maven installation of maven 3.2.2 but it still throws the same error.

I tried using maven 2.2.1 bug get the error Target is not a supported maven home. It seems eclipse removed support for older versions of maven.

When I do project->Maven->Update Project it threw thousands of errors like:

|Description|Resource|Path|Location|Type| |---|---|---|---|---| |Action cannot be resolved to a type|CreateWorkgroup.java|/fastpath/src/java/org/jivesoftware/openfire/fastpath/commands|line 117|Java Problem| |Action cannot be resolved to a type|DeleteWorkgroup.java|/fastpath/src/java/org/jivesoftware/openfire/fastpath/commands|line 97|Java Problem| |Action cannot be resolved to a type|GetGroupConversationTranscript.java|/monitoring/src/java/org/jivesoftware/openfire/archive/commands|line 189|Java Problem| |Action cannot be resolved to a type|GetGroupConversationTranscript.java|/monitoring/src/java/org/jivesoftware/openfire/archive/commands|line 194|Java Problem| |Action cannot be resolved to a variable|GetGroupConversationTranscript.java|/monitoring/src/java/org/jivesoftware/openfire/archive/commands|line 190|Java Problem| |Action cannot be resolved to a variable|GetGroupConversationTranscript.java|/monitoring/src/java/org/jivesoftware/openfire/archive/commands|line 195|Java Problem| |AdHocCommand cannot be resolved to a type|CreateWorkgroup.java|/fastpath/src/java/org/jivesoftware/openfire/fastpath/commands|line 39|Java Problem| |AdHocCommand cannot be resolved to a type|CreateWorkgroup.java|/fastpath/src/java/org/jivesoftware/openfire/fastpath/commands|line 122|Java Problem| |AdHocCommand cannot be resolved to a type|CreateWorkgroup.java|/fastpath/src/java/org/jivesoftware/openfire/fastpath/commands|line 128|Java Problem| |AdHocCommand cannot be resolved to a type|DeleteWorkgroup.java|/fastpath/src/java/org/jivesoftware/openfire/fastpath/commands|line 38|Java Problem| |AdHocCommand cannot be resolved to a type|DeleteWorkgroup.java|/fastpath/src/java/org/jivesoftware/openfire/fastpath/commands|line 102|Java Problem|

In Intellij I imported pom.xml file and did “Build Project” and the first shown errors are generated

I wouldn’t build the whole project in your IDE; use the command line (mvn verify). Simply use the IDE for editing files, highlighting syntax errors etc. So long as you can open a selection of .java files, and you IDE doesn’t complain, you should be good to go.

Greg