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

Getting error "cannot find symbol: class Scanned" while upgrading plugin from 7.2.1 to 8.2.2 Edited

I am getting following error while trying to upgrade my custom plugin from 7.2.1 to 8.2.2:

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project perforce-changelist-plugin: Compilation failure
[ERROR] /C:/Apps/perforce-changelist-plugin/src/main/java/com/nvidia/plugins/jira/perforcechangelist/adminui/AdminServlet.java:[29,64] cannot find symbol
[ERROR] symbol: class Scanned
[ERROR] location: package com.atlassian.plugin.spring.scanner.annotation.component

I see some packages were changed from 7.2.1 to 8.2.2. I modified those dependencies. However I don't see any spring plugins released for 8.2.2 https://mvnrepository.com/artifact/com.atlassian.jira/jira-bundled-plugins?repo=springio-plugins-release 

and I am unable to find the following dependencies in 8.2.2:

<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-runtime</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>runtime</scope>
</dependency>

 

<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>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<scannedDependencies>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-external-jar</artifactId>
</dependency>
</scannedDependencies>
<verbose>false</verbose>
</configuration>
</plugin>

 

Could anybody help me figure out what needs to be done here?

 

Thank You in advance,

1 answer

Changes required if you're upgrading from atlassian-spring-scanner 1.x to 2.0+

  • VERY IMPORTANT! Change all the atlassian-scanner namespaces in your spring context files (where you have <scan-indexes> - see the "Spring runtime integration" example below) from http://www.atlassian.com/schema/atlassian-scanner to http://www.atlassian.com/schema/atlassian-scanner/2
  • Remove your dependency on atlassian-spring-scanner-runtime.
  • Change your dependency on atlassian-spring-scanner-annotation to be <scope>provided</scope>.
  • atlassian-spring-scanner-processor is gone. If you had a dependency on it, remove it.
  • Add atlassian-spring-scanner-maven-plugin to <plugins> - see example below. ** If your build then fails to find org.springframework.stereotype or javax.inject, add spring-context or javax.inject to <dependencies> with <scope>provided</scope> - you'd been relying on those transitively.
  • Remove use of @Scanned - this feature is removed. All classes are now scanned.
  • Remove 'auto-imports' attribute from <scan-indexes>.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

976 views 11 25
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