2
votes

I just formatted my laptop, and install everything fresh and new. But now I am unable to start Jira.

Here is the error message I get:

The POM for com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:jar:1.2.6 is missing, no dependency information available
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.428s
Finished at: Fri Nov 20 08:18:15 IST 2015
Final Memory: 11M/166M
------------------------------------------------------------------------
Plugin com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:1.2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:jar:1.2.6: Failure to find com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:pom:1.2.6 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

and this is my pom.xml:

    <dependency>
        <groupId>com.atlassian.jira</groupId>
        <artifactId>jira-api</artifactId>
        <version>${jira.version}</version>
        <scope>provided</scope>
    </dependency>
    <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>
    <dependency>
        <groupId>javax.inject</groupId>
        <artifactId>javax.inject</artifactId>
        <version>1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>jsr311-api</artifactId>
        <version>1.1.1</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.2.2-atlassian-1</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.4</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.plugins.rest</groupId>
        <artifactId>atlassian-rest-common</artifactId>
        <version>1.0.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.sal</groupId>
        <artifactId>sal-api</artifactId>
        <version>2.6.0</version>
        <scope>provided</scope>
    </dependency>

</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-jira-plugin</artifactId>
            <version>${amps.version}</version>
            <extensions>true</extensions>
            <configuration>
                <productVersion>${jira.version}</productVersion>
                <productDataVersion>${jira.version}</productDataVersion>
                <enableQuickReload>true</enableQuickReload>
                <enableFastdev>false</enableFastdev>
                <instructions>
                    <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                    <Export-Package>net.gisnas.jira.mailqueue.api,</Export-Package>
                    <Import-Package>org.springframework.osgi.*;resolution:="optional",
                        org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package>
                    <Spring-Context>*</Spring-Context>
                </instructions>
            </configuration>
        </plugin>
        <plugin>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
            <version>1.2.6</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>

    </plugins>
</build>
<properties>
    <maven.local.repo>C:\Applications\Atlassian\atlassian-plugin-sdk-6.1.0\repository</maven.local.repo>
    <jira.version>7.0.2</jira.version>
    <amps.version>6.1.2</amps.version>
    <plugin.testrunner.version>1.2.3</plugin.testrunner.version>
    <atlassian.spring.scanner.version>1.2.6</atlassian.spring.scanner.version>
    <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
    <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
    <!-- TestKit version 6.x for JIRA 6.x -->
    <testkit.version>6.3.11</testkit.version>
</properties>

Sometimes the above error is throwing, and sometimes I am facing jta.jar error even I don't understand why that jar is required. I tried with cloning the repo and starting it, but I'm still facing the same error.

2
It seems it's looking for com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:jar:1.2.6 in the wrong repo. Can you post the content on your settings.xml files (there can be more than one). If you are unsure where to find them run atlas-cli clean install -X and somewhere in the output it'll say which settings.xml it uses. - Pixy
What is the reason you don't use the vendor offered binaries? - Koshinae

2 Answers

3
votes

Please add into your project pom.xml, following

<pluginRepositories>
    <pluginRepository>
        <id>atlassian-public</id>
        <url>https://maven.atlassian.com/content/repositories/atlassian-public/</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
            <checksumPolicy>warn</checksumPolicy>
        </snapshots>
        <releases>
            <enabled>true</enabled>
            <checksumPolicy>warn</checksumPolicy>
        </releases>
    </pluginRepository>
</pluginRepositories>
2
votes

atlassian-spring-scanner-maven-plugin of course is Maven plugin of Atlassian. It should be hosted in Atlassian Maven Repositories - https://maven.atlassian.com/#nexus-search;quick~atlassian-spring-scanner-maven-plugin. But I see this error message:

Failure to find com.atlassian.plugin:atlassian-spring-scanner-maven-plugin:pom:1.2.6 in http://repo.maven.apache.org/maven2

It says that it can not be looked up in Maven Central Repositories instead of Atlassian Maven Repositories

So I think you should check your Maven runtime settings. Your maven should read local settings.xml from Atlassian plugin SDK which configured Atlassian Maven Proxy, please refer this resource for configuration Atlassian Maven Proxy https://developer.atlassian.com/docs/advanced-topics/working-with-maven/atlassian-maven-repositories

I see your pom.xml has maven.local.repo

<maven.local.repo>C:\Applications\Atlassian\atlassian-plugin-sdk-6.1.0\repository</maven.local.repo>

But it just means that you are using a custom local repository directory, it does not mean your Maven has Atlassian Maven Proxy yet