Dedicated Library Folder in IntelliJ IDEA Follow
Is it possible to create a dedicated folder for Libraries in IntelliJ IDEA like we have in NetBeans (creating new project you can enable it so it can automatically store all libraries there and then add them to VCS).
We need to share libraries among other computers via VCS so that others don't have to setup their environment before getting a code or adding a library after updating their code. We also need to make sure that the setup will work on Windows, Mac and Linux machine.
Please sign in to leave a comment.
Hi Maxim,
You can store library binaries as well as config files at the VCS. Any person that checks out the project has a configured setup then.
Denis
Hello Denis,
Thanks for your reply. I'm actually using GWT in my project trying to figure out how to configure it in such a way so that it will be VCS friendly. Right my project .iml file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<descriptors>
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" />
</descriptors>
<webroots>
<root url="file://$MODULE_DIR$/web" relative="/" />
</webroots>
</configuration>
</facet>
<facet type="gwt" name="GWT">
<configuration>
<setting name="compilerMaxHeapSize" value="128" />
<setting name="gwtScriptOutputStyle" value="DETAILED" />
<setting name="gwtSdkUrl" value="file:///javalibs/gwt-2.4.0" />
<setting name="webFacet" value="Web" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="gwt-user" level="project" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/mysql-connector-java-5.1.11-bin.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
as you see that gwt libs on my mac are located in /javalibs/gwt-2.4.0, how do we go about that? And is it safe to add .iml file to VCS?
I'll ask our guy who supports the GWT plugin to have a look here.
Denis
Hello,
if files of a library/SDK are not located under a module directory you can use Path Variables to make the project configuration files shareable. Go to
File | Settings | Path Variables and create a new variable pointing to /javalibs folder. Afer that all paths to files under /javalibs folder will be
stored as relative paths using the created variable. When the project will be opened on another computer IDEA will ask to specify value of this
variable and initialize the project accordingly.
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Awesome! That's what we needed.
this is so awesome, looks like i'm switching to your IDE :D