Project

General

Profile

Help compiling and deploying

Diego Barrera
Added almost 5 years ago

Hello everybody,

I'm new to Tigase, I'm trying to compile and deploy from command line following this guide:

http://www.tigase.org/content/tigase-xmpp-server-520-and-later-compilation-and-generating-distribution-packages

All is good until this point:

./scripts/installer-prepare.sh

Where I get this error:

~/git/tigase-server $ ./scripts/installer-prepare.sh 
Cloning into 'installer/izpack.original'...
remote: Counting objects: 72954, done.
remote: Compressing objects: 100% (23221/23221), done.
remote: Total 72954 (delta 35861), reused 70475 (delta 34354)
Receiving objects: 100% (72954/72954), 37.02 MiB | 817.00 KiB/s, done.
Resolving deltas: 100% (35861/35861), done.
Checking connectivity... done
Switched to a new branch 'original'
Switched to a new branch 'v4'
patching file .gitignore
patching file src/build.xml
patching file src/lib/com/izforge/izpack/installer/ConsoleHelper.java
patching file src/lib/com/izforge/izpack/installer/ConsoleInstallHelper.java
patching file src/lib/com/izforge/izpack/installer/ConsoleMenu.java
patching file src/lib/com/izforge/izpack/installer/ConsolePager.java
patching file src/lib/com/izforge/izpack/installer/HTMLHelper.java
patching file src/lib/com/izforge/izpack/installer/IConsoleMenuItem.java
patching file src/lib/com/izforge/izpack/installer/Option.java
patching file src/lib/com/izforge/izpack/installer/PanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/installer/ResourceHelper.java
patching file src/lib/com/izforge/izpack/installer/ValidatingConverter.java
patching file src/lib/com/izforge/izpack/installer/VariablesHelper.java
patching file src/lib/com/izforge/izpack/panels/CheckedHelloPanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/DerbyPathPanel.java
patching file src/lib/com/izforge/izpack/panels/HTMLInfoPanel.java
patching file src/lib/com/izforge/izpack/panels/HTMLInfoPanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/HTMLLicencePanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/HelloPanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/PacksPanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/PathInputPanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/TargetPanel.java
patching file src/lib/com/izforge/izpack/panels/TargetPanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/TigaseConfigConst.java
patching file src/lib/com/izforge/izpack/panels/TigaseConfigLoadPanel.java
patching file src/lib/com/izforge/izpack/panels/TigaseConfigLoadPanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/TigaseConfigSavePanel.java
patching file src/lib/com/izforge/izpack/panels/TigaseConfigSavePanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/TigaseDBCheckPanel.java
patching file src/lib/com/izforge/izpack/panels/TigaseDBCheckPanelConsoleHelper.java
patching file src/lib/com/izforge/izpack/panels/TigaseInstallerDbHelperFunctionalTest.java
patching file src/lib/com/izforge/izpack/panels/UserInputPanel.java
patching file src/lib/com/izforge/izpack/panels/UserInputPanel.java
patching file src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
cp: cannot stat ‘jars/tigase-server.jar’: No such file or directory
cp: cannot stat ‘jars/tigase-utils.jar’: No such file or directory
cp: cannot stat ‘jars/tigase-xmltools.jar’: No such file or directory
./scripts/installer-prepare.sh: line 60: ant: command not found

Thanks in advance for taking the time to read my problem.


Replies (6)

Added by Diego Barrera almost 5 years ago

I thought it'd be good to list the contents of the jars/ folder:

~/git/tigase-server $ ls jars/ -l
total 10216
-rw-r--r-- 1 diego diego 2703892 mar  6 15:06 derby.jar
-rw-r--r-- 1 diego diego  174932 mar  6 15:06 derbytools.jar
-rw-r--r-- 1 diego diego 6317783 mar  6 15:06 groovy-all.jar
-rw-r--r-- 1 diego diego  703265 mar  6 15:06 mysql-connector-java.jar
-rw-r--r-- 1 diego diego  551290 mar  6 15:06 postgresql.jar

Added by Diego Barrera almost 5 years ago

I managed to get past that point although it still complains about:

cp: cannot stat ‘jars/tigase-server.jar’: No such file or directory
cp: cannot stat ‘jars/tigase-utils.jar’: No such file or directory
cp: cannot stat ‘jars/tigase-xmltools.jar’: No such file or directory

And goes on until this point:

    [javac] Compiling 5 source files to /home/diego/git/tigase-server/installer/izpack.patched/bin/panels/TigaseDBCheckPanel
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:15: error: package tigase.db does not exist
    [javac] import tigase.db.DBInitException;
    [javac]                 ^
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:16: error: package tigase.db does not exist
    [javac] import tigase.db.RepositoryFactory;
    [javac]                 ^
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:17: error: package tigase.db does not exist
    [javac] import tigase.db.TigaseDBException;
    [javac]                 ^
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:18: error: package tigase.db does not exist
    [javac] import tigase.db.AuthRepository;
    [javac]                 ^
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:19: error: package tigase.db does not exist
    [javac] import tigase.db.UserExistsException;
    [javac]                 ^
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:20: error: package tigase.xmpp does not exist
    [javac] import tigase.xmpp.BareJID;
    [javac]                   ^
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:600: error: cannot find symbol
    [javac]         Set<BareJID> jids = new LinkedHashSet<BareJID>();
    [javac]             ^
    [javac]   symbol:   class BareJID
    [javac]   location: class TigaseInstallerDBHelper
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:600: error: cannot find symbol
    [javac]         Set<BareJID> jids = new LinkedHashSet<BareJID>();
    [javac]                                               ^
    [javac]   symbol:   class BareJID
    [javac]   location: class TigaseInstallerDBHelper
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:606: error: cannot find symbol
    [javac]                     jids.add(BareJID.bareJIDInstanceNS(jid));
    [javac]                              ^
    [javac]   symbol:   variable BareJID
    [javac]   location: class TigaseInstallerDBHelper
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:634: error: cannot find symbol
    [javac]             AuthRepository repo = RepositoryFactory.getAuthRepository(
    [javac]             ^
    [javac]   symbol:   class AuthRepository
    [javac]   location: class TigaseInstallerDBHelper
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:634: error: cannot find symbol
    [javac]             AuthRepository repo = RepositoryFactory.getAuthRepository(
    [javac]                                   ^
    [javac]   symbol:   variable RepositoryFactory
    [javac]   location: class TigaseInstallerDBHelper
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:637: error: cannot find symbol
    [javac]             for (BareJID jid : jids) {
    [javac]                  ^
    [javac]   symbol:   class BareJID
    [javac]   location: class TigaseInstallerDBHelper
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:640: error: cannot find symbol
    [javac]                 } catch (UserExistsException e) {
    [javac]                          ^
    [javac]   symbol:   class UserExistsException
    [javac]   location: class TigaseInstallerDBHelper
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:647: error: cannot find symbol
    [javac]         } catch (DBInitException e) {
    [javac]                  ^
    [javac]   symbol:   class DBInitException
    [javac]   location: class TigaseInstallerDBHelper
    [javac] /home/diego/git/tigase-server/installer/izpack.patched/src/lib/com/izforge/izpack/panels/TigaseInstallerDBHelper.java:650: error: cannot find symbol
    [javac]         } catch (TigaseDBException e) {
    [javac]                  ^
    [javac]   symbol:   class TigaseDBException
    [javac]   location: class TigaseInstallerDBHelper
    [javac] 15 errors
    [javac] 1 warning

BUILD FAILED
/home/diego/git/tigase-server/installer/izpack.patched/src/build.xml:834: The following error occurred while executing this line:
/home/diego/git/tigase-server/installer/izpack.patched/src/build.xml:581: Compile failed; see the compiler error output for details.

I am completely lost, any help is welcome.

Added by Wojciech Kapcia TigaseTeam almost 5 years ago

Most important question - have you build the server first with:

mvn -f modules/master/pom.xml clean package

The errors you experience come from the fact that there is not server binaries hence building of installer package fails.

Linked page outlines two steps in generating distribution packages:

  • generating basic binaries with all dependencies and regular archives;

  • (based on previous step) generating only installer packages.

I'll update article to reflect that.

Added by Diego Barrera almost 5 years ago

Thanks for you answer.

I am new to both Tigase and maven and I'm very lost, I tried to use 'clean package' as you said, followed by 'clean install'.

The jars are still not created and I get the same error when I run installer-prepare.sh.

I also tried 'clean compile'.

Thanks.

Added by Wojciech Kapcia TigaseTeam almost 5 years ago

I'm sorry, recently distribution building was move to separate maven profile (@dist@) hence building without specifying which profile to use resulted in empty dependencies (as well as missing packages). Please use following:

mvn -Pdist -f modules/master/pom.xml clean install

I'll update the documentation.

Added by Diego Barrera almost 5 years ago

Wow thanks a lot, that really did the trick!

    (1-6/6)