Snapshot of commit 329607d9ebcedf2bb0ad81265354366db7dc3f9c

from branch master of git://git.jetbrains.org/idea/community.git

Change-Id: I3b27d82897504da1b66169b67c7771e0f551c973
diff --git a/build/scripts/dist.gant b/build/scripts/dist.gant
index fed966d..4abf7ef 100644
--- a/build/scripts/dist.gant
+++ b/build/scripts/dist.gant
@@ -106,7 +106,7 @@
   layouts.layout_core_upsource(home, paths.artifacts_core_upsource)
   notifyArtifactBuilt(paths.artifacts_core_upsource)
   if (buildJps) {
-    layouts.layout_jps(home, paths.artifacts_jps)
+    layouts.layoutCommunityJps(home, paths.artifacts_jps)
     notifyArtifactBuilt(paths.artifacts_jps)
   }
 
diff --git a/build/scripts/layouts.gant b/build/scripts/layouts.gant
index f2eb5ba..611a302 100644
--- a/build/scripts/layouts.gant
+++ b/build/scripts/layouts.gant
@@ -23,11 +23,6 @@
   ant.delete(dir: patchedDescriptorDir)
 }
 
-target('build-jps': 'Build JPS standalone distribution') {
-  println("Building jps standalone distribution")
-  layout_jps("$home/build/lib/jps")
-}
-
 String appInfoFileName() {
   return "idea/IdeaApplicationInfo.xml"
 }
@@ -184,6 +179,17 @@
     layoutCommunityPlugins(home)
 
     dir("plugins") {
+      dir("javaFX") {
+        dir("lib") {
+          jar("javaFX.jar") {
+            module("javaFX")
+            module("javaFX-CE")
+          }
+        }
+      }
+    }
+
+    dir("plugins") {
       dir("IntelliLang") {
         dir("lib") {
           jar("IntelliLang.jar") {
@@ -207,7 +213,7 @@
 
 public def layoutCommunityPlugins(String home) {
   dir("plugins") {
-    def simplePlugins = ["commander", "copyright", "properties", "javaFX", "java-i18n", "hg4idea", "github", "ui-designer-core", "tasks-time-tracking"]
+    def simplePlugins = ["commander", "copyright", "properties", "java-i18n", "hg4idea", "github", "ui-designer-core", "tasks-time-tracking"]
 
     simplePlugins.each {
       layoutPlugin it
@@ -243,6 +249,17 @@
         module("maven3-server-impl")
       }
 
+      jar("artifact-resolver-m2.jar") {
+        module("maven-artifact-resolver-m2")
+      }
+
+      jar("artifact-resolver-m3.jar") {
+        module("maven-artifact-resolver-m3")
+        module("maven-artifact-resolver-m2") {
+          include(name: 'org/jetbrains/idea/maven/artifactResolver/common/*')
+        }
+      }
+
       dir("maven3") {
         fileset(dir: "$home/plugins/maven/maven3-server-impl/lib") {include(name: "*.jar")}
         fileset(dir: "$home/plugins/maven/maven3-server-impl/lib/maven3/lib") {include(name: "*.jar")}
@@ -549,7 +566,7 @@
   }
 }
 
-def layout_jps(String home, String target) {
+def layoutCommunityJps(String home, String target) {
   layout(target) {
     jar("util.jar") {
       module("annotations")
@@ -576,9 +593,27 @@
     jar("groovy_rt.jar") {
       module("groovy_rt")
     }
-    jar("ui-designer-jps-plugin.jar") {
-      module("ui-designer-jps-plugin")
+    jar("ui-designer-jps-plugin.jar") { module("ui-designer-jps-plugin") }
+
+    jar("android-jps-plugin.jar") {
+      module("android-jps-plugin")
+      module("android-common")
+      module("android-rt")
     }
+    fileset(dir: "${home}/plugins/android/lib") {
+      include(name: "**/*.jar")
+      exclude(name: "**/ddmlib_1.jar")
+    }
+
+    jar("maven-jps-plugin.jar") { module("maven-jps-plugin") }
+    fileset(dir: "$home/plugins/maven/maven3-server-impl/lib/maven3/lib") {include(name: "plexus-utils-*.jar")}
+
+    jar("eclipse-jps-plugin.jar") {
+      module("common-eclipse-util")
+      module("eclipse-jps-plugin")
+    }
+    jar("devkit-jps-plugin.jar") { module("devkit-jps-plugin") }
+    jar("intellilang-jps-plugin.jar") { module("intellilang-jps-plugin") }
     fileset(dir: "$home/lib") {
       include(name: "jdom.jar")
       include(name: "jna.jar")
@@ -586,6 +621,7 @@
       include(name: "asm4-all.jar")
       include(name: "nanoxml-*.jar")
       include(name: "protobuf-*.jar")
+      include(name: "cli-parser-*.jar")
       include(name: "optimizedFileManager.jar")
       include(name: "log4j.jar")
       include(name: "jgoodies-forms.jar")
diff --git a/build/scripts/libLicenses.gant b/build/scripts/libLicenses.gant
index 7ca5383..853e8e7 100644
--- a/build/scripts/libLicenses.gant
+++ b/build/scripts/libLicenses.gant
@@ -201,6 +201,11 @@
 libraryLicense(name: "Log4j", libraryName: "Log4J", version: "1.2", license: "Apache 2.0", url: "http://logging.apache.org/log4j/1.2/index.html", licenseUrl: "http://logging.apache.org/license.html")
 libraryLicense(name: "Maven", version: "2.2.1", license: "Apache 2.0", url: "http://maven.apache.org/", licenseUrl: "http://maven.apache.org/license.html")
 libraryLicense(name: "plexus-util", version: "2.0.6", license: "Apache 2.0", url: "http://maven.apache.org/", libraryNames:['plexus-utils-2.0.6.jar'], licenseUrl: "http://apache.org/licenses/LICENSE-2.0")
+libraryLicense(name: "aether-api", version: "1.11", libraryNames: ["aether-api-1.11.jar"], license: "Apache 2.0", url: "http://maven.apache.org/", licenseUrl: "http://maven.apache.org/license.html")
+libraryLicense(name: "maven-2.2.1-uber", version: "2.2.1", libraryNames: ["maven-2.2.1-uber.jar"], license: "Apache 2.0", url: "http://maven.apache.org/", licenseUrl: "http://maven.apache.org/license.html")
+libraryLicense(name: "maven-artifact", version: "3.0.3", libraryNames: ["maven-artifact-3.0.3.jar"], license: "Apache 2.0", url: "http://maven.apache.org/", licenseUrl: "http://maven.apache.org/license.html")
+libraryLicense(name: "maven-core", version: "3.0.3", libraryNames: ["maven-core-3.0.3.jar"], license: "Apache 2.0", url: "http://maven.apache.org/", licenseUrl: "http://maven.apache.org/license.html")
+libraryLicense(name: "plexus-component-annotations", version: "1.5.5", libraryNames: ["plexus-component-annotations-1.5.5.jar"], license: "Apache 2.0", url: "http://maven.apache.org/", licenseUrl: "http://maven.apache.org/license.html")
 libraryLicense(name: "Maven3", libraryNames: ["Maven3", "maven-dependency-tree-1.2.jar", "archetype-catalog-2.2.jar", "archetype-common-2.2.jar"], version: "3.0.3", license: "Apache 2.0", url: "http://maven.apache.org/", licenseUrl: "http://maven.apache.org/license.html")
 libraryLicense(name: "Gradle", version: "1.4", license: "Apache 2.0", url: "http://gradle.org/", licenseUrl: "http://gradle.org/license")
 libraryLicense(name: "Slf4j", version: "1.7.2", license: "MIT License", url: "http://slf4j.org/", licenseUrl: "http://slf4j.org/license.html")
@@ -230,7 +235,7 @@
 libraryLicense(name: "Trilead SSH", libraryName: "trilead-ssh2", version: "build 213", license: "BSD style (see LICENSE.txt in trilead.jar)", url: "http://www.trilead.com/SSH_Library/")
 libraryLicense(name: "Trove4j", version: "1.1 (with patches by JetBrains)", license: "LGPL", url: "http://trove4j.sourceforge.net/", licenseUrl: "http://trove4j.sourceforge.net/html/license.html")
 libraryLicense(name: "Velocity", version: "1.7", license: "Apache 2.0", url: "http://velocity.apache.org/", licenseUrl: "http://velocity.apache.org/index.html")
-libraryLicense(name: "winp", version: "1.16 (patched)", license: "MIT", url: "http://winp.dev.java.net/", licenseUrl: "https://winp.dev.java.net/license.html")
+libraryLicense(name: "winp", version: "1.17 (patched)", license: "MIT", url: "http://java.net/projects/winp", licenseUrl: "http://opensource.org/licenses/mit-license.php")
 libraryLicense(name: "Xalan", libraryName:"Xalan-2.7.1", version: "2.7.1", license: "Apache 2.0", url: "http://xml.apache.org/xalan-j/", licenseUrl: "http://xml.apache.org/xalan-j/")
 libraryLicense(name: "Xerces", version: "2.9.1", license: "Apache 2.0", url: "http://xerces.apache.org/xerces2-j/", licenseUrl: "http://xerces.apache.org/xerces2-j/")
 libraryLicense(name: "XML Commons (xml-apis.jar, resolver.jar)", version: "", license: "Apache 2.0, W3C Software License , public domain", url: "http://xml.apache.org/commons/", licenseUrl: "http://xml.apache.org/commons/licenses.html")
@@ -239,7 +244,7 @@
 libraryLicense(name: "XStream", version: "1.4.3", license: "BSD", url: "http://xstream.codehaus.org/", licenseUrl: "http://xstream.codehaus.org/license.html")
 libraryLicense(name: "YourKit Java Profiler", libraryName: "yjp-controller-api-redist.jar", version: "8.0.x", license: "link (commercial license)", url: "http://yourkit.com/", licenseUrl: "http://www.yourkit.com/purchase/license.html")
 libraryLicense(name: "protobuf", version: "2.3.0", license: "New BSD", url: "http://code.google.com/p/protobuf/", licenseUrl: "http://code.google.com/p/protobuf/source/browse/trunk/COPYING.txt?r=367")
-libraryLicense(name: "Netty", libraryName: "Netty", version: "3.5.10", license: "Apache 2.0", url: "http://netty.io", licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0")
+libraryLicense(name: "Netty", libraryName: "Netty", version: "3.6.2", license: "Apache 2.0", url: "http://netty.io", licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0")
 libraryLicense(name: "Kryo", libraryName: "Kryo", version: "1.04", license: "New BSD License", url: "http://code.google.com/p/kryo/", licenseUrl: "http://www.opensource.org/licenses/bsd-license.php")
 libraryLicense(name: "Snappy-Java", libraryName: "Snappy-Java", version: "1.0.5-M2", license: "Apache 2.0", url: "http://code.google.com/p/snappy-java/", licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0")
 libraryLicense(name: "Cucumber-Java", libraryName: "cucumber-java", version: "1.0.14", license: "MIT License", url: "https://github.com/cucumber/cucumber-jvm/", licenseUrl: "http://www.opensource.org/licenses/mit-license.html")
@@ -248,6 +253,7 @@
 libraryLicense(name: "proxy-vole", libraryName: "proxy-vole", version: "20120920", license: "New BSD License", url: "http://code.google.com/p/proxy-vole/", licenseUrl: "http://opensource.org/licenses/BSD-3-Clause")
 libraryLicense(name: "Rhino JavaScript Engine", libraryName: "rhino-js-1_7R4", version: "1.7R4", license: "MPL 1.1", url: "http://www.mozilla.org/rhino/", licenseUrl: "http://www.mozilla.org/MPL/MPL-1.1.html")
 libraryLicense(name: "asm-4.0-all", libraryName: "asm-4.0-all", version: "4.0", attachedTo: "ByteCodeViewer", license: "BSD", url: "http://asm.objectweb.org/", licenseUrl: "http://asm.objectweb.org/license.html")
+libraryLicense(name: "jsr305", libraryName: "jsr305", version: "snapshot", license: "BSD", url: "http://code.google.com/p/jsr-305/", licenseUrl: "http://code.google.com/p/jsr-305/source/browse/trunk/ri/LICENSE")
 jetbrainsLibrary("JPS")
 jetbrainsLibrary("Maven Embedder")
 jetbrainsLibrary("tcServiceMessages")
diff --git a/build/scripts/utils.gant b/build/scripts/utils.gant
index cc8bb29..7789982 100644
--- a/build/scripts/utils.gant
+++ b/build/scripts/utils.gant
@@ -327,6 +327,29 @@
 
   String classPath = classPathLibs.collect {"\$APP_PACKAGE/lib/${it}" }.join(":")
 
+  String urlSchemes = ""
+  if (args.urlSchemes != null) {
+    urlSchemes += """
+      <key>CFBundleURLTypes</key>
+      <array>
+        <dict>
+          <key>CFBundleTypeRole</key>
+          <string>Editor</string>
+          <key>CFBundleURLName</key>
+          <string>Stacktrace</string>
+          <key>CFBundleURLSchemes</key>
+          <array>
+"""
+    args.urlSchemes.each { scheme ->
+      urlSchemes += "            <string>${scheme}</string>"
+    }
+    urlSchemes += """
+          </array>
+        </dict>
+      </array>
+"""
+  }
+
   ant.replace(file: "$path/Contents/Info.plist") {
     replacefilter(token: "@@build@@", value: args.buildNumber)
     replacefilter(token: "@@doc_types@@", value: ifNull(args.doc_types, ""))
@@ -340,6 +363,7 @@
     replacefilter(token: "@@idea_properties@@", value: coreProperties)
     replacefilter(token: "@@class_path@@", value: classPath)
     replacefilter(token: "@@help_id@@", value: helpId)
+    replacefilter(token: "@@url_schemes@@", value: urlSchemes)
   }
 
   if (executable != "idea") {