stash plugin - ApplicationProperties

Hi

I created stash plugin from archetype using "atlas-create-stash-plugin" and then followed atlas-mvn eclipse:eclipse and imported into eclipse.

Pointed MAVEN installation to atlassian maven.

When import project in eclipse I get error ApplicationProperties cannot resolve to type.

Added per this post maven dependency:

https://jira.atlassian.com/browse/STASH-4161

I get error runing mvn clean install

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running it.com.collabconsulting.ndg.MyComponentWiredTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
s.
[INFO] [talledLocalContainer] 2013-12-25 12:14:15,831 WARN  [http-bio-7990-exec-
8]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [requestAttributeFilte
r]; no Spring WebApplicationContext is available
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.126 sec <<< FA
ILURE!

Results :

Tests in error:
  it.com.collabconsulting.ndg.MyComponentWiredTest

How do I resolve this, please let me know.

Abe

1 answer

1 accepted

0 votes
Accepted answer

Hi Abraham,

Honestly, the easiest thing to do is to delete "src/test/java/it/com/collabconsulting/ndg/MyComponentWiredTest.java" for now. Later on if you want to add integration tests for your components you may want to revisit why it was failing, but it's certainly not important at this stage.

Merry Christmas.

Charles

Thanks Charles. I did that could successfully do the build

For sal-api, I added dependency

<dependency>
        <groupId>com.atlassian.sal</groupId>
        <artifactId>sal-api</artifactId>
        <version>2.10.9</version>
        <scope>provided</scope>
    </dependency>

in pom.xml, but I had ApplicationProperties error, then I addded sal-api jar manually as external jar and it resolved, why did it not resolve and add to referenced libraries when I added pom.xml entry.

I cleaned project, restarted eclipse etc. Not that I am blocked because manually adding worked, just wanted to know why pom.xml entry did not make any difference.

Hi Abraham,

What do you mean it did not resolve? Was it not compiling in maven (ie clean install) or just Eclipse?

Charles

I was expecting sal-api.jar as part of "Referenced Libraries" , since I added it as maven dependency in package explorer and it was not there..

I also added following entry in atlassian-plugin.xml

<component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties" />

But in eclipse I continued to see error, until I added sal-api jar as shown in attachment.

Hi Abraham,

Did you re-run 'mvn eclipse:eclipse' after you added the dependency (or reimport using the Eclipse maven plugin)?

Cheers,

Charles

Thanks a lot.

I did mvn eclipse:eclipse again and error is gone.

Merry Christmas.

Hi Abraham Abe

i'm, also getting same error at the time of building plan using Bamboo.

i added the dependency that you have been mentioned as above comment then also the error was not resolved.

I attached the build log details please go through it once and let me know how i resolve this.

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

197 views 3 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you