-
I tried to debug it and I have no idea why those old scripts are included. During build I get:
wojtek@atlantiscity.local ~/dev/tigase/tigase-server-distribution $ mvn clean -Pdist validate [INFO] Scanning for projects... [INFO] [INFO] ---------------------< tigase:tigase-server-dist >---------------------- [INFO] Building Tigase XMPP Server Distribution 8.1.2-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ tigase-server-dist --- [INFO] Deleting /Users/wojtek/dev/tigase/tigase-server-distribution/target [INFO] [INFO] --- buildnumber-maven-plugin:1.4:create (default) @ tigase-server-dist --- [INFO] ShortRevision tag detected. The value is '8'. [INFO] Executing: /bin/sh -c cd '/Users/wojtek/dev/tigase/tigase-server-distribution' && 'git' 'rev-parse' '--verify' '--short=8' 'HEAD' [INFO] Working directory: /Users/wojtek/dev/tigase/tigase-server-distribution [INFO] Storing buildNumber: 09c0854c at timestamp: 22-sep-2020 17:05:52 [INFO] Storing buildScmBranch: stable [INFO] [INFO] --- maven-dependency-plugin:3.1.1:copy-dependencies (copy-dependencies) @ tigase-server-dist --- … [INFO] Copying tigase-pubsub-4.1.0.jar to /Users/wojtek/dev/tigase/tigase-server-distribution/target/dist/jars/tigase-pubsub.jar … [INFO] [INFO] --- maven-dependency-plugin:3.1.1:unpack (tigase-docs-resource) @ tigase-server-dist --- … [INFO] Configured Artifact: tigase:tigase-pubsub:?:jar … [INFO] Unpacking /No to /Users/wojtek/dev/tigase/tigase-server-distribution/target/documentation/tigase-pubsub with includes "documentation/**/*" and excludes "" … [INFO] Expanding: /Users/wojtek/.m2/repository/tigase/tigase-server/8.1.0/tigase-issue #8.1.0-resources.tar.gz into /Users/wojtek/dev/tigase/tigase-server-distribution/target/documentation/tigase-server [INFO] [INFO] --- maven-dependency-plugin:3.1.1:unpack (tigase-resources) @ tigase-server-dist --- … [INFO] Configured Artifact: tigase:tigase-pubsub:?:jar … [INFO] Unpacking /Users/wojtek/.m2/repository/tigase/tigase-pubsub/4.1.0/tigase-pubsub-4.1.0.jar to /Users/wojtek/dev/tigase/tigase-server-distribution/target/dist with includes "certs/**/*,database/**/*,etc/**/*,scripts/**/*,*.html,COPYING" and excludes "" … [INFO] Expanding: /Users/wojtek/.m2/repository/tigase/tigase-server/8.1.0/tigase-issue #8.1.0-resources.tar.gz into /Users/wojtek/dev/tigase/tigase-server-distribution/target/dist [INFO] [INFO] --- maven-antrun-plugin:1.8:run (default) @ tigase-server-dist --- [INFO] Executing tasks main: [INFO] Executed tasks [INFO] [INFO] --- maven-resources-plugin:3.1.0:copy-resources (copy-resources) @ tigase-server-dist --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/wojtek/dev/tigase/tigase-server-distribution/src/non-packaged-resources [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.736 s [INFO] Finished at: 2020-09-22T17:05:55-03:00 [INFO] ------------------------------------------------------------------------ wojtek@atlantiscity.local ~/dev/tigase/tigase-server-distribution $
Afterwards we end-up with old scrips, eg:
wojtek@atlantiscity.local ~/dev/tigase/tigase-server-distribution $ cat target/dist/scripts/admin/CreateNode.groovy /* * Tigase Jabber/XMPP Server * Copyright (C) 2004-2013 "Artur Hefczyc" <artur.hefczyc@tigase.org> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. Look for COPYING file in the top folder. * If not, see http://www.gnu.org/licenses/. * * $Rev: $ * Last modified by $Author: $ * $Date: $ */ /* Create PubSub node AS:Description: Create node AS:CommandId: create-node AS:Component: pubsub …
Yet that exact binary file referenced in unpacking holds correct version of the script:
wojtek@atlantiscity.local ~/dev/tigase/tigase-server-distribution $ unzip -qc /Users/wojtek/.m2/repository/tigase/tigase-pubsub/4.1.0/tigase-pubsub-4.1.0.jar scripts/admin/CreateNode.groovy | cat /** * Tigase PubSub - Publish Subscribe component for Tigase * Copyright (C) 2008 Tigase, Inc. (office@tigase.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. Look for COPYING file in the top folder. * If not, see http://www.gnu.org/licenses/. */ /* Create PubSub node AS:Description: Create node AS:CommandId: create-node AS:Component: pubsub */ package tigase.admin import groovy.transform.CompileStatic import tigase.db.TigaseDBException import tigase.eventbus.EventBus import tigase.kernel.core.Kernel import tigase.pubsub.* import tigase.pubsub.exceptions.PubSubException import tigase.pubsub.modules.NodeCreateModule import tigase.pubsub.modules.PublishItemModule import tigase.pubsub.repository.IPubSubRepository import tigase.server.Command import tigase.server.Iq …
I tried clearing local repository, building on remote machines yet the effect was always the same - older version of the script. Setting explicitly tigase-pubsub version in
maven-dependency-plugin
doesn't change anything.Maven with debug flag doesn't provide any more information:
[INFO] Unpacking /Users/wojtek/.m2/repository/tigase/tigase-pubsub/4.1.0/tigase-pubsub-4.1.0.jar to /Users/wojtek/dev/tigase/tigase-server-distribution/target/dist with includes "certs/**/*,database/**/*,etc/**/*,scripts/**/*,*.html,COPYING" and excludes "" [DEBUG] Found unArchiver by type: org.codehaus.plexus.archiver.zip.ZipUnArchiver$__sisu1@7e7fe6d [DEBUG] Expanding: /Users/wojtek/.m2/repository/tigase/tigase-pubsub/4.1.0/tigase-pubsub-4.1.0.jar into /Users/wojtek/dev/tigase/tigase-server-distribution/target/dist [DEBUG] expand complete
After some digging I finally figured it out - it was due to tigase-server resources being pulled in, which contained old scripts, which overridden correct ones. After recreating the resource package of tigase-issue #8.1.0 the distribution package is correct now.
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Version |
tigase-server-8.1.1
|
Spent time |
0
|
Reported https://github.com/tigase/tigase-server/issues/55
After startup there are a bunch of exceptions. It turns out that for some reason old scripts are included (rest, adhoc) even though dependency binaries are correct.