It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

About Bamboo PluginLoadEventListner

Dear all.

I'm bamboo plug-in developer.

I want to code the event when the bamboo plug-in is loaded and destined.

so, I'm implement InitializingBean, DisposalBean
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

import com.atlassian.event.api.EventPublisher;
import com.atlassian.plugin.event.PluginEventListener;
import com.atlassian.plugin.event.events.PluginEnabledEvent;

public class PluginLoadEventListener implements InitializingBean, DisposableBean {

private static final Logger LOGGER = LoggerFactory.getLogger(PluginLoadEventListener.class);

private final EventPublisher eventPublisher;

public PluginLoadEventListener(final EventPublisher eventPublisher) {
this.eventPublisher = eventPublisher;
}

@Override
public void afterPropertiesSet() throws Exception {
eventPublisher.register(this);
}

@Override
public void destroy() throws Exception {
try {
---- my code
}
....
but, this code not work.
It works fine in jira.


pom.xml
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-bamboo-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${bamboo.version}</productVersion>
<productDataVersion>${bamboo.data.version}</productDataVersion>
<enableQuickReload>true</enableQuickReload>
<enableFastdev>false</enableFastdev>
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<Export-Package>
mypackage
</Export-Package>
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
</plugin>

Please Help me..

Thanks
Best Regards.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

302 views 2 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you