Plugin to get intellij to handle broken alfresco source jars

52 views
Skip to first unread message

Bindu Wavell

unread,
Apr 10, 2013, 1:02:58 PM4/10/13
to maven-a...@googlegroups.com
Maurizio Pillitu reported an issue with the Alfresco source jars here: https://issues.alfresco.com/jira/browse/MNT-6496

I had also reported this through support but then found this issue, looks like it will be resolved for 4.1.4 and 4.2.d. 

In the mean time I created an IntelliJ plugin that you can run on your project, if you have automatically associated source jars that don't include the !/java suffix, this plugin will add an additional reference with the appropriate suffix for jars matching alfresco-.*-source.jar in any of the modules in your current project.

The plugin is available here:

Simply grab the alfresco-source-linking-plugin.jar file from the repo and use the option to install a plugin from disk to reference the jar. It will add an "Update Referenced Alfresco Source Jars" menu item to the Tools menu. Run this with a project open that has source jars pulled via the maven repo and magically your source will become available during development and debugging in IntelliJ.

Maurizio Pillitu

unread,
Apr 16, 2013, 5:41:27 PM4/16/13
to maven-a...@googlegroups.com
Great job Bindu!
One question, I'm trying to test it on Idea Ultimate 12.1.1 and I could not see the option showing up in the Tools menu.

Is there a way I can check what is going on (i.e. locating Intellij logs)?

Thanks,
   mao


--
You received this message because you are subscribed to the Google Groups "Maven Alfresco Lifecycle Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-alfresc...@googlegroups.com.
To post to this group, send email to maven-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/maven-alfresco?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Maurizio Pillitu
Technical Consultant
Mobile: +31615655668
Skype: m.pillitu

Bindu Wavell

unread,
Apr 16, 2013, 6:31:55 PM4/16/13
to maven-a...@googlegroups.com
I'm using IntelliJ 12.1 on Mac. I'll update to 12.1.1 to test. Yup that is working… I tried uninstalling the plugin and then installing the exact version that's checked in. It's still working for me… hmm..

I have some logging in the code that processes the source jars, however there is no plugin code for getting the menu item to show, it's done through configuration.

You could try checking out the project and then creating a intellij plugin run profile… This will ask you to create an SDK, you'll point to the intellij program folder (should be there by default) then it will ask which version of java you want to use. 

The run profile should spin up a new instance of intellij with the plugin enabled. There may be some debugging you can do from that point. I didn't really have to.

One issue I did run into when I was developing this was that I was compiling the plugin with java 7 however intellij runs with java 6. In that case the menu item did not show up when I used the jar to install the plugin (it did work via the run profile which also ran intellij with java 7.) It's possible that I need to commit a new version of the jar compiled with java 6… although I thought I had done that already. Hmm… I just checked and the version that's checked in was compiled for java 6…

Are you using the jar from bitbucket or are you re-compiling it?


-- Bindu

You received this message because you are subscribed to a topic in the Google Groups "Maven Alfresco Lifecycle Discussion Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maven-alfresco/QAs2eTMOZBw/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to maven-alfresc...@googlegroups.com.

Maurizio Pillitu

unread,
Apr 19, 2013, 3:51:55 AM4/19/13
to maven-a...@googlegroups.com
Hi Bindu,

thanks for your answer; I've only tried the JAR downloaded from bitbucket, but I can try to checkout the project and run the build.
I'll keep you posted with my findings.

Thanks!
  mao

Bindu Wavell

unread,
Apr 29, 2013, 12:05:58 AM4/29/13
to maven-a...@googlegroups.com
Let me know how you get on. I know that 4.1.4 just came out and fixed this, but if you are working with community it's still pretty helpful :) Since IntelliJ often reloads dependencies (if you change your poms) you have to re-setup the source mapping... Have been using this a lot today as I've been fooling with the poms. :)
Reply all
Reply to author
Forward
0 new messages