Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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?
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:
<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>
@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.
Hi @Frank
You can change
<atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
It's work for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.