According to the setup instruction for SDK it still uses Maven 2.
But within Eclipse Maven plugin m2e the current Maven 3.0.4 is the default.
Is it possible to use Maven 3.0.4 to build the SDK?
Community moderators have prevented the ability to post new answers.
Hi Jörg,
It's technically possible to use Maven 3 with the SDK, however it's not officially supported. It's also missing some major features. There's currently a Ticket open to move to Maven 3. As Joseph Walton states in the ticket, it's possible to build with Maven 3.
However we definitely recommend staying with Maven 2 until it 3 supported and implemented.
Cheers,
Ivan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What's the holdup on this? To tell you the truth I really hate working with the plugin SDK as it always conflicts my development environment while working on other non Atlassian product projects. I'd vouch that almost all Java developers have their own Maven and have to switch between it and the atlassian Maven configurations; it's more difficult when hosting your own maven repo (like Nexus) as it can't be used with the Atlassian SDK (well I've never got it to work).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The holdup is amps:cli (AMPS-551). maven-cli-plugin needs work to be compatible with Maven 3 and one of the ideal alternatives (Mvnsh) isn't a drop-in replacement (or maintained). Personally, I use my own installation of Maven 3 to run the SDK's plugins, rather than the atlas- commands, but it wouldn't necessarily be appropriate for the SDK to force everyone to work like that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Joseph, could you please tell me how to do this? I have been struggling and given up trying to get my setup to work. I want to acheive the following:
If you have any documentation on this could you please link it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I don't think this is documented, but I've opened AMPS-950. You should be able to:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's some documentation now for this: Developing Plugins with Maven 3.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI, AMPS 4.1.7 was just released and now let's you easily swap out maven executables without having to setup a nexus proxy or anything.
Simply set an environment variable called ATLAS_MVN and point it to your maven executable.
example:
export ATLAS_MVN=/usr/bin/maven3/mvn
Note: point it to the maven executable, NOT the maven home.
This will tell AMPS to use your custom executable, but will still use the SDK's built-in repo and settings.xml
This does NOT fix AMPS-551
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great Jonathan, tx!!
Can we go even further? Similar to this, isn't it a good idea to also allow the user to set the maven home as an environment variable?
Right now I point the atlassian-plugin-sdk-4.2.x/conf/settings.xml file to my ~/.m2/settings.xml, which I use point to our Nexus. This works, but I still have to recreate this symlink after each atlassian SDK update.
If the atlas- scripts would check for an environment variable like they do with ATLAS_MVN, we would no longer have to update our settings.xml every time an atlas update is done, as we could keep it pointed to our local settings.xml!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For Brett's usecase, if he's happy keeping the local atlassian repository alongside his atlassian one, he'd also need to update the mirror entry in his "normal" settings file which default (http://books.sonatype.com/nexus-book/reference/maven-sect-single-group.html) sends everything to nexus. Nexus configuration states setting mirrorOf to *, but it will need to be changed to external:* so that it doesn't block the atlassian-plugin-sdk.
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>external:*</mirrorOf>
<url>http://{yourNexusServer}/nexus/content/groups/public/</url>
</mirror>
This way, maven will let nexus handle the atlassian maven repo and the atlassian versions of artifacts (for example gson 2.2.2-atlassian-1) can still be handled by the localy installed sdk repo.
n.b. it would be good if Atlassian made their amended dependancies more easily available so nexus could handle them simply.
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.