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

stash plugin - ApplicationProperties

AbrahamA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 24, 2013

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
Answer accepted
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 24, 2013

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

AbrahamA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 24, 2013

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.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 24, 2013

Hi Abraham,

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

Charles

AbrahamA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 25, 2013

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.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 25, 2013

Hi Abraham,

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

Cheers,

Charles

AbrahamA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 25, 2013

Thanks a lot.

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

Merry Christmas.

Yogesh Mude[Jira]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2016

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
TAGS
AUG Leaders

Atlassian Community Events