I created an OSGi plugin for Confluence, using the command line:
mvn archetype:generate -DarchetypeCatalog=http://svn.atlassian.com/svn/public/atlassian/maven-plugins/archetype-catalog
I then tried building once with "atlas-mvn install" to populate the .m2 cache with non-standard dependencies. The build failed with the missing dependency tangosol-coherence:coherence:jar:3.3.
Should I run the archetype in a different way? Can i fix this missing dependency somehow?
Thanks!
Here's the full output from "atlas-mvn install" in the freshly created OSGi plugin project:
C:\Users\steinarb\temp\sb_macro>atlas-mvn install Executing: "C:\Users\steinarb\atlassian-plugin-sdk\apache-maven\bin\mvn.bat" -gs C:\Users\steinarb\atlassian-plugin-sdk\apache-maven/conf/settings.xml install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 0 resource Downloading: https://maven.atlassian.com/repository/public/tangosol-coherence/tangosol/3.3/tangosol-3.3.pom [INFO] Unable to find resource 'tangosol-coherence:tangosol:pom:3.3' in repository atlassian-public (https://maven.atlassian.com/repository/public) Downloading: file://C:\Users\steinarb\atlassian-plugin-sdk/repository/tangosol-coherence/tangosol/3.3/tangosol-3.3.pom [INFO] Unable to find resource 'tangosol-coherence:tangosol:pom:3.3' in repository atlassian-plugin-sdk (file://C:\Users\steinarb\atlassian-plugin-sdk/repository) Downloading: http://repo1.maven.org/maven2/tangosol-coherence/tangosol/3.3/tangosol-3.3.pom [INFO] Unable to find resource 'tangosol-coherence:tangosol:pom:3.3' in repository central (http://repo1.maven.org/maven2) Downloading: https://maven.atlassian.com/repository/public/tangosol-coherence/coherence/3.3/coherence-3.3.pom [INFO] Unable to find resource 'tangosol-coherence:coherence:pom:3.3' in repository atlassian-public (https://maven.atlassian.com/repository/public) Downloading: file://C:\Users\steinarb\atlassian-plugin-sdk/repository/tangosol-coherence/coherence/3.3/coherence-3.3.pom [INFO] Unable to find resource 'tangosol-coherence:coherence:pom:3.3' in repository atlassian-plugin-sdk (file://C:\Users\steinarb\atlassian-plugin-sdk/repository) Downloading: http://repo1.maven.org/maven2/tangosol-coherence/coherence/3.3/coherence-3.3.pom [INFO] Unable to find resource 'tangosol-coherence:coherence:pom:3.3' in repository central (http://repo1.maven.org/maven2) Downloading: https://maven.atlassian.com/repository/public/tangosol-coherence/tangosol/3.3/tangosol-3.3.jar [INFO] Unable to find resource 'tangosol-coherence:tangosol:jar:3.3' in repository atlassian-public (https://maven.atlassian.com/repository/public) Downloading: file://C:\Users\steinarb\atlassian-plugin-sdk/repository/tangosol-coherence/tangosol/3.3/tangosol-3.3.jar [INFO] Unable to find resource 'tangosol-coherence:tangosol:jar:3.3' in repository atlassian-plugin-sdk (file://C:\Users\steinarb\atlassian-plugin-sdk/repository) Downloading: http://repo1.maven.org/maven2/tangosol-coherence/tangosol/3.3/tangosol-3.3.jar [INFO] Unable to find resource 'tangosol-coherence:tangosol:jar:3.3' in repository central (http://repo1.maven.org/maven2) Downloading: https://maven.atlassian.com/repository/public/tangosol-coherence/coherence/3.3/coherence-3.3.jar [INFO] Unable to find resource 'tangosol-coherence:coherence:jar:3.3' in repository atlassian-public (https://maven.atlassian.com/repository/public) Downloading: file://C:\Users\steinarb\atlassian-plugin-sdk/repository/tangosol-coherence/coherence/3.3/coherence-3.3.jar [INFO] Unable to find resource 'tangosol-coherence:coherence:jar:3.3' in repository atlassian-plugin-sdk (file://C:\Users\steinarb\atlassian-plugin-sdk/repository) Downloading: http://repo1.maven.org/maven2/tangosol-coherence/coherence/3.3/coherence-3.3.jar [INFO] Unable to find resource 'tangosol-coherence:coherence:jar:3.3' in repository central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) tangosol-coherence:tangosol:jar:3.3 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=tangosol-coherence -DartifactId=tangosol -Dversion=3.3 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=tangosol-coherence -DartifactId=tangosol -Dversion=3.3 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[i d] Path to dependency: 1) no.steria.confluence.macros:sb_macro:atlassian-plugin:1.0-SNAPSHOT 2) com.atlassian.confluence:confluence:jar:2.10 3) tangosol-coherence:tangosol:jar:3.3 2) tangosol-coherence:coherence:jar:3.3 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=tangosol-coherence -DartifactId=coherence -Dversion=3.3 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=tangosol-coherence -DartifactId=coherence -Dversion=3.3 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[ id] Path to dependency: 1) no.steria.confluence.macros:sb_macro:atlassian-plugin:1.0-SNAPSHOT 2) com.atlassian.confluence:confluence:jar:2.10 3) tangosol-coherence:coherence:jar:3.3 ---------- 2 required artifacts are missing. for artifact: no.steria.confluence.macros:sb_macro:atlassian-plugin:1.0-SNAPSHOT from the specified remote repositories: atlassian-plugin-sdk (file://C:\Users\steinarb\atlassian-plugin-sdk/repository), central (http://repo1.maven.org/maven2), atlassian-public (https://maven.atlassian.com/repository/public) [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5 seconds [INFO] Finished at: Mon May 26 16:12:01 CEST 2014 [INFO] Final Memory: 29M/303M [INFO] ------------------------------------------------------------------------ C:\Users\steinarb\temp\sb_macro>
I was told to use atlas-create-confluence-plugin instead of using the archetypes, and at least I lost the annoying dependency.
I still got this error message when building, but the same workaround of adjusting the confluence.version from 5.5.2 to 5.5.0 worked for me.
So to others ending up here from a google search: don't use any of the atlassian archetypes directly, they are outdated! Use the atlas-create-* commands instead.
This was a bit strange: The confluence 2.10 POM has dependencies without version numbers:
<dependency> <groupId>tangosol-coherence</groupId> <artifactId>coherence</artifactId> </dependency>
I didn't think that was allowed in maven 3 and upwards? And I didn't think this was a good idea in deployed versions anyway?
And why doesn't google find any repository for tangosol-coherence? Very strange!
(it's not in file://C:\Users\steinarb\atlassian-plugin-sdk/repository either. That was the first place I checked)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SDK 4.2.20 didn't have the dependency tangosol-coherence:coherence:jar:3.3 either (or was able to find it).
Is the problem in the archetype I used? What is the current archetype to use?
I tried creating the project again, using the archetype catalog at https://maven.atlassian.com/content/groups/public/archetype-catalog.xml
I did the following:
mvn archetype:generate -DarchetypeCatalog=https://maven.atlassian.com/repository/public/archetype-catalog.xml
atlas-mvn install
And then I hit the now expected error abut the missing tangosol-coherence:coherence:jar:3.3 dependency
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
atlas-version says SDK 4.2.10, and the current SDK is 4.2.20. I will try installing the newest SDK and see.
Here's the full output from atlas-version:
ATLAS Version: 4.2.10
ATLAS Home: C:\Users\steinarb\atlassian-plugin-sdk
ATLAS Scripts: C:\Users\steinarb\atlassian-plugin-sdk\bin
ATLAS Maven Home: C:\Users\steinarb\atlassian-plugin-sdk\apache-maven
--------
Executing: "C:\Users\steinarb\atlassian-plugin-sdk\apache-maven\bin\mvn.bat" --version -gs C:\Users\steinarb\atlassian-plugin-sdk\apache-maven/conf/settings.xml
Apache Maven 2.1.0 (r755702; 2009-03-18 20:10:27+0100)
Java version: 1.7.0_21
Java home: C:\Program Files\Java\jdk1.7.0_21\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"
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.