Quantcast
Channel: Active questions tagged atlassian-plugin-sdk - Stack Overflow
Viewing all articles
Browse latest Browse all 282

Bitbucket DC 8.18 – AMPS 8.6.0 won’t compile .soy → .soy.js; file missing in the final JAR

$
0
0

I’m writing a pre-receive hook for Bitbucket Data Center 8.18.
The add-on builds successfully, but the Soy template never gets compiled to JS, so the settings form cannot be rendered in Bitbucket (“Unable to render configuration form for External API Branch Hook”)


1) Environment

ComponentVersion
Bitbucket DC8.18.0
Atlassian SDK8.6.1
Apache Maven3.9.9 (via ATLAS_MVN; atlas-version shows Maven home = 3.9.9)
Java11
bitbucket-maven-plugin8.6.0
atlassian-webresource-maven-plugin4.2.9-bitbucket1
Repo URLhttps://packages.atlassian.com/maven/public/
OSWindows 10

2) pom.xml (extract)

<build><plugins><plugin><groupId>com.atlassian.maven.plugins</groupId><artifactId>bitbucket-maven-plugin</artifactId><version>${amps.version}</version><extensions>true</extensions><configuration><productVersion>8.18.0</productVersion><enableQuickReload>true</enableQuickReload><compressResources>false</compressResources><products><product><id>bitbucket</id><instanceId>bitbucket</instanceId><version>${bitbucket.version}</version><dataVersion>${bitbucket.data.version}</dataVersion></product></products><instructions><Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key><!-- Add package to export here --><Export-Package>com.gateops.bitbucket</Export-Package><!-- Add package import here --><Import-Package>org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package><!-- Ensure plugin is Spring powered --><Spring-Context>*</Spring-Context></instructions></configuration></plugin><plugin><groupId>com.atlassian.plugin</groupId><artifactId>atlassian-spring-scanner-maven-plugin</artifactId><version>${atlassian.spring.scanner.version}</version><executions><execution><goals><goal>atlassian-spring-scanner</goal></goals><phase>process-classes</phase></execution></executions><configuration><verbose>false</verbose></configuration></plugin></plugins></build>

3)atlassian-plugin.xml (web-resource + hook)

<?xml version="1.0" encoding="UTF-8"?><atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2"><plugin-info><description>Rejects pushes to specific branches unless an external API returns HTTP 200.</description><version>1.0.0</version><vendor name="GateOps" url="http://www.gateops.com"/><param name="plugin-icon">images/pluginIcon.png</param><param name="plugin-logo">images/pluginLogo.png</param></plugin-info><!-- Compile-time pre-compiled Soy templates & other static assets --><web-resource key="external-api-hook-resources" name="External API Hook Resources"><!-- Bitbucket’ın çekirdek UI kaynaklarına bağımlılık --><dependency>com.atlassian.auiplugin:ajs</dependency><dependency>com.atlassian.bitbucket.server.bitbucket-web-resources</dependency><!-- Soy tarafından derlenen JS şablon dosyası --><resource type="download" name="externalapi-config.soy.js" location="templates/externalapi-config.soy.js"/><resource type="download" name="external-api-hook.css" location="css/external-api-hook.css"/><resource type="download" name="external-api-hook.js" location="js/external-api-hook.js"/><resource type="download" name="images/" location="images"/><!-- Bu kaynak yalnızca repository ayar sayfalarında yüklenir --><context>bitbucket.hook.settings</context></web-resource><!-- Pre-receive hook tanımı --><repository-hook key="externalApiHook"                     name="External API Branch Hook"                     class="com.gateops.bitbucket.hooks.ExternalApiPreReceiveHook"><description>Call external API on push and reject if it returns an error.</description><!-- Yapılandırma formu (config form) --><config-form key="externalApiHook-config"                     name="External API Hook Configuration"><!-- Soy namespace + template adı --><view>com.gateops.bitbucket.hooks.externalapi.formContents</view><!-- Yukarıda tanımlı web-resource’u yükle --><resource name="external-api-hook-resources"/></config-form><!-- Kullanıcıdan gelen form verilerini doğrulamak için validator --><validator>com.gateops.bitbucket.validator.ExternalApiHookValidator</validator></repository-hook></atlassian-plugin>
  1. What I already triedRenamed the template to external-api.soy → still not compiled.

Downgraded AMPS to 8.4.1 (Maven 3.6.3) → same behaviour.

Upgraded WRM plugin to 4.4.4-bitbucket1 →“No plugin descriptor found”.

Ran atlas-mvn -X clean package – generate-resources step shows no Soy activity.

Expected: externalapi-config.soy.js appears in the JAR so the settings form renders.

Any hints appreciated—thanks!


Viewing all articles
Browse latest Browse all 282

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>