Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

classdefnotfoundexception during bitbucket plugin execution

I try to develop a bitbucket plugin. This plugin need to consume a dependency call com.soprahr.factory.api.devops.

<dependency>
<groupId>com.soprahr.factory.api.devops</groupId>
<artifactId>domain</artifactId>
<version>${com.soprahr.factory.api.devops.domain.version}</version>
<scope>compile</scope>
</dependency>

When I builded the plugin, maven returned the log bellow.

NFO] --- bitbucket-maven-plugin:8.2.0:validate-banned-dependencies (default-validate-banned-dependencies) @ com.soprahr.paas.scm.fork ---
[INFO] validate banned dependencies
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.BannedDependencies failed with message:
make sure platform artifacts are not bundled into plugin
Found Banned Dependency: org.slf4j:jcl-over-slf4j:jar:1.7.25
Found Banned Dependency: org.springframework:spring-beans:jar:5.2.6.RELEASE
Found Banned Dependency: com.google.guava:guava:jar:26.0-jre
Found Banned Dependency: javax.annotation:javax.annotation-api:jar:1.3.2
Found Banned Dependency: org.apache.commons:commons-lang3:jar:3.8.1
Found Banned Dependency: javax.ws.rs:javax.ws.rs-api:jar:2.0.1
Found Banned Dependency: org.apache.httpcomponents:httpmime:jar:4.5.10
Found Banned Dependency: dom4j:dom4j:jar:1.6.1-atlassian-2
Found Banned Dependency: org.slf4j:slf4j-api:jar:1.7.25
Found Banned Dependency: javax.validation:validation-api:jar:2.0.1.Final
Found Banned Dependency: com.google.code.findbugs:jsr305:jar:3.0.0
Found Banned Dependency: org.apache.httpcomponents:httpclient:jar:4.5.10
Found Banned Dependency: org.apache.httpcomponents:httpcore:jar:4.4.12
Found Banned Dependency: org.springframework:spring-core:jar:5.2.6.RELEASE

I excluded all banned dependencies and my plugin correctly builded.

<dependency>
<groupId>com.soprahr.factory.api.devops</groupId>
<artifactId>domain</artifactId>
<version>${com.soprahr.factory.api.devops.domain.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
</exclusion>
<exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>


During the runtime exececution, classdefnotfoundexception was throwed by the plugin as soon as I use one of this ban dependency

I try to add ban dependencies in my pom.xml as provided dependency. The result was the same.

Should I add something in the Import package ? As of now, my import package is the following.

<Import-Package>
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
*
javax.servlet*;version="2.5",
*;version="0";resolution:=optional,
</Import-Package>

My experiences with OSGI is limited. I suppose I don't understand several concepts.

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.6.3
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,805 views 10 16
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