Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

How/where to find com.atlassian.plugins:atlassian-spring-scanner-annotation:jar?

I am trying to follow the tutorial "Creating an admin configuration form".

I got an error about the classes com.atlassian.plugin.spring.scanner.annotation.component.Scanned and com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport not being found, and found that I presumably need to add another dependency to the pom file.

I tried to add

 <dependency>
  <groupId>com.atlassian.plugins</groupId>
  <artifactId>atlassian-spring-scanner-annotation</artifactId>
  <version>2.2.1</version>
  <scope>provided</scope>
</dependency>

to this file, and also tried different versions. But none of the versions 2.2.2, 2.2.1-8199150, 2.2.1 which I found at the Maven Repository overview for Atlassian Public worked: I got the error

[ERROR] Failed to execute goal on project xproduct-admin-ui-plugin: Could not resolve dependencies for project de.steep.plugins.tutorial:xproduct-admin-ui-plugin:atlassian-plugin:1.0.0-SNAPSHOT: Could not find artifact com.atlassian.plugins:atlassian-spring-scanner-annotation:jar:2.2.1 in atlassian-public (https://maven.atlassian.com/repository/public) -> [Help 1]

for all these versions when running 

atlas-mvn clean package

I tried to look at the URL stated in the error message https://maven.atlassian.com/repository/public, which redirects to https://packages.atlassian.com/maven-external/, but that is a huge directory structure where I could not find anything like atlassian-spring-scanner-annotation.

How can I resolve this issue?

 

1 answer

I found a solution that seems to work - at least I can compile and deploy.

According to atlassian / atlassian-spring-scanner — Bitbucket, I changed several things in my pom.xml file:

  • use com.atlassian.plugin:atlassian-spring-scanner-annotation, not, my mis-spelled com.atlassian.plugins:atlassian-spring-scanner-annotation.
  • add another plugin as follows:
<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>
            <!-- process-classes seems to be skipped if you are using scala
                 so perhaps use prepare-package -->
            <phase>process-classes</phase> 
        </execution>
    </executions>
    <configuration>
       <!-- Enable this to get build-time logging of annotations atlassian-spring-scanner-maven-plugin has noticed -->
       <verbose>false</verbose>
    </configuration>
</plugin>
  •  Remove @Scanned from the servlet class source code.

After running

atlas-mvn eclipse:eclipse

the errors (but not all warnings) have disappeared in Eclipse now as well.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Miss the Confluence demos at Team 21? Watch them here!

Phew, Atlassian Team 2021 blew by. With dozens of demos and a handful of keynotes, you may have missed some of the awesome Confluence Cloud sessions. Don't' worry, you can watch them all here or on Y...

343 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