<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Juggling Eggs &#187; IDEA</title>
	<atom:link href="http://sonnygill.net/tag/idea/feed/" rel="self" type="application/rss+xml" />
	<link>http://sonnygill.net</link>
	<description>Priceless eggs, variable gravity</description>
	<lastBuildDate>Tue, 15 Feb 2011 10:54:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Maven on Intellij IDEA on Mac</title>
		<link>http://sonnygill.net/tech/maven-intellij-idea-mac-osx/</link>
		<comments>http://sonnygill.net/tech/maven-intellij-idea-mac-osx/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 19:05:05 +0000</pubDate>
		<dc:creator>Sonny Gill</dc:creator>
				<category><![CDATA[Note To Self]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[IDEA]]></category>
		<category><![CDATA[IntelliJ]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://sonnygill.net/?p=270</guid>
		<description><![CDATA[To easily use Maven from Intellij IDEA on a Mac, create or modify the file ~/.MacOSX/environment.plist, and add an entry for M2_HOME]]></description>
			<content:encoded><![CDATA[<p>Running/Debugging a maven target on Intellij IDEA results in a big scary error message: -</p>
<p>﻿Error running [...]: No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system.</p>
<p>To fix, you have to add M2_HOME variable in the Mac specific way.</p>
<p>Create or modify the file ~/.MacOSX/environment.plist, and add an entry for M2_HOME</p>
<p>If that file is already there, you may find that you can&#8217;t edit in a text editor because it is a binary file. First you will have to convert it to plain text (xml), edit it, and then you can convert it back to the binary format.</p>
<p>$ plutil -convert xml1 environment.plist</p>
<p>$ vim environment.plist</p>
<p>$ plutil -convert binary1 environment.plist</p>
<p>Ref: ﻿<a href="http://youtrack.jetbrains.net/issue/IDEA-21225">http://youtrack.jetbrains.net/issue/IDEA-21225</a> and ﻿<a href="http://devnet.jetbrains.net/thread/278634">http://devnet.jetbrains.net/thread/278634</a></p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://sonnygill.net/tech/maven-intellij-idea-mac-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android on Intellij Idea &#8211; run activity on emulator</title>
		<link>http://sonnygill.net/android/android-intellij-idea/</link>
		<comments>http://sonnygill.net/android/android-intellij-idea/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 22:11:58 +0000</pubDate>
		<dc:creator>Sonny Gill</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[IDEA]]></category>
		<category><![CDATA[IntelliJ]]></category>

		<guid isPermaLink="false">http://sonnygill.wordpress.com/?p=111</guid>
		<description><![CDATA[The official Android plugin is only for Eclipse, but thankfully Android provides Ant support for those of us who prefer other IDEs (http://developer.android.com/guide/developing/other-ide.html).
I use Intellij IDEA, and the main problem for me was that, after building the application using the Ant build script created by activitycreator tool, you have to manually reload the application in [...]]]></description>
			<content:encoded><![CDATA[<p>The official Android plugin is only for Eclipse, but thankfully Android provides Ant support for those of us who prefer other IDEs (http://developer.android.com/guide/developing/other-ide.html).</p>
<p>I use Intellij IDEA, and the main problem for me was that, after building the application using the Ant build script created by activitycreator tool, you have to manually reload the application in the emulator.</p>
<p>This is easily fixed by tweaking the generated Ant build file.<br />
Add the following target to the build.xml -</p>
<pre class="brush: xml;">
 &lt;!-- Main activity --&gt;
&lt;property name=&quot;main-activity&quot; value=&quot;MyMainActivity&quot; /&gt;

 &lt;!-- Run the main Activity after reinstall --&gt;
 &lt;target name=&quot;run&quot; depends=&quot;reinstall&quot;&gt;
 &lt;echo&gt;Running ${application-package}.${main-activity} on default emulator...&lt;/echo&gt;
 &lt;exec executable=&quot;${adb}&quot; failonerror=&quot;true&quot;&gt;
 &lt;arg value=&quot;shell&quot; /&gt;
 &lt;arg value=&quot;am&quot; /&gt;
 &lt;arg value=&quot;start&quot; /&gt;
 &lt;arg value=&quot;-a&quot; /&gt;
 &lt;arg value=&quot;android.intent.action.MAIN&quot; /&gt;
 &lt;arg value=&quot;-n&quot; /&gt;
 &lt;arg value=&quot;${application-package}/${application-package}.${main-activity}&quot; /&gt;
 &lt;/exec&gt;
 &lt;/target&gt;
</pre>
<p>MyMainActivity is, of course, your main activity. Remember to change the build file if you rename or change the main activity.</p>
<p>I also changed the default target to run, and after loading build.xml as an Ant build file in IDEA, I assigned it a shortcut key.<br />
I also made these changes to ANDROID_SDK/tools/lib/build.template, so from now on, when I create a new Android project, it is already set up this way. If you are editing the template file, use -</p>
<pre class="brush: xml;">
 &lt;!-- Main activity --&gt;
&lt;property name=&quot;main-activity&quot; value=&quot;ACTIVITY_NAME&quot; /&gt;
</pre>
<p>This will automatically pick up the class name you specify on the command line when running activitycreator.</p>
]]></content:encoded>
			<wfw:commentRss>http://sonnygill.net/android/android-intellij-idea/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

