<p>A recent change in the build procedure produces broken startScripts in the respective <code>$destinationDir/bin</code>-directories.</p>
<h3>Issue</h3>
<p>startScripts located in <code>$destinationDir/bin</code>-directories yield</p>
<pre><code>Error: Could not find or load main class bisq.desktop.app.BisqAppMain
Caused by: java.lang.ClassNotFoundException: bisq.desktop.app.BisqAppMain
</code></pre>
<p>when executed.</p>
<h3>Cause</h3>
<p>The startScripts get changed in order to be executed in the project root directory. However, they get changed before they are copied and thus, the original startScripts (still located in the <code>$destinationDir/bin</code>-directories) have a wrong path prefix for the classpath declaration (i.e. <code>.../bin/lib/...</code> instead of <code>.../bin/../lib/...</code>)</p>
<h3>Fix</h3>
<p>First copy the startScripts to <code>rootProject.projectDir</code> and only then change them.</p>
<h3>Notes</h3>
<ul>
<li>I believe that every startScript should work, regardless where it resides (even when its use is somewhat deprecated)</li>
<li>I stumbled over the issue while fixing the <a href="https://aur.archlinux.org/packages/bisq-git/" rel="nofollow">AUR bisq-git package</a> (doing my duty <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="376878921" data-permission-text="Issue title is private" data-url="https://github.com/bisq-network/roles/issues/78" data-hovercard-type="issue" data-hovercard-url="/bisq-network/roles/issues/78/hovercard" href="https://github.com/bisq-network/roles/issues/78">bisq-network/roles#78</a>)</li>
</ul>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/1979'>https://github.com/bisq-network/bisq/pull/1979</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Fix broken executables in /bin dirs</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/1979/files#diff-0">build.gradle</a>
    (22)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/1979.patch'>https://github.com/bisq-network/bisq/pull/1979.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/1979.diff'>https://github.com/bisq-network/bisq/pull/1979.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/1979">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AkpZtilUnz4_ONzziL5RL7q809izjDXdks5uzKCRgaJpZM4Y0Y8V">mute the thread</a>.<img src="https://github.com/notifications/beacon/AkpZtsZtHJ48XsWoYRv5TqKvDRzWVxIgks5uzKCRgaJpZM4Y0Y8V.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bisq-network/bisq","title":"bisq-network/bisq","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/bisq-network/bisq"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Fix broken startScripts in $destinationDir/bin dirs (#1979)"}],"action":{"name":"View Pull Request","url":"https://github.com/bisq-network/bisq/pull/1979"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/1979",
"url": "https://github.com/bisq-network/bisq/pull/1979",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Fix broken startScripts in $destinationDir/bin dirs (#1979)",
"sections": [
{
"text": "",
"activityTitle": "**Florian Reimair**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@freimair",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "00f0174",
"value": "Fix broken executables in /bin dirs"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Modified",
"value": "[build.gradle](https://github.com/bisq-network/bisq/pull/1979/files#diff-0) (22 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"bisq-network/bisq\",\n\"issueId\": 1979,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"bisq-network/bisq\",\n\"pullRequestId\": 1979\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1979"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1979.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq/pull/1979.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 416386837\n}"
}
],
"themeColor": "26292E"
}
]</script>