6

Is there way to tell IntelliJ IDEA which output folder to use for GWT compiler ? I know it copies artifacts to project folder but it doesn't copy extras which I set using "-extra" command line parameter of gwt compiler.

IntelliJ IDEA leaves it in USER_HOME/.IntelliJIdea10/system/gwt/project_name_with_hash/module_name_with_hash/compile/www

UPDATE: Strangely I didn't find list of possible path macroses on IntelliJ's website. But I found them in idea.jar. Possible macroses are:

APPLICATION_HOME_DIR
PROJECT_DIR
MODULE_DIR
USER_HOME
expert
  • 29,290
  • 30
  • 110
  • 214

3 Answers3

1

Have you tried constructing the path using ${PROJECT_DIR} path variable? That will resolve to the project location and then you can specify the rest of the path. Like ${PROJECT_DIR}/reports/extras. I haven't used IntelliJ for a few years, but I am pretty sure that's the path variable name.

EDIT: sorry built in path macros in IntelliJ are specified using $...$ syntax. So I think it should be $PROJECT_DIR$

Strelok
  • 50,229
  • 9
  • 102
  • 115
  • Ah I prematurely got excited :-( It doesn't work for me. When I specify GWT compiler parameters as `-extra ${PROJECT_DIR}\extra` it gives me error `Argument 0 for @NotNull parameter of com/intellij/openapi/util/text/StringUtil.replace must not be null`. Any ideas, guys ? – expert Nov 11 '11 at 03:39
  • Seems like it's not parsing issue. It works with JAVA_HOME. Looks like PROJECT_DIR is undefined in IDEA. I have version 10.5.2. – expert Nov 11 '11 at 04:27
  • I updated my answer. I think the internal path macro syntax is different. The other syntax is reserved for environment variables, which explains why JAVA_HOME works. – Strelok Nov 11 '11 at 09:56
  • Unfortunately I tried that too. $..$ format is not even get parsed. It comes as it is in my path :) – expert Nov 11 '11 at 17:08
  • I am out of ideas at the moment, especially since I haven't used IntelliJ for a long time and don't even have installed. I think if it's not working, it would be wise to log an issue in JetBrains JIRA (http://jetbrains.net/jira/secure/Dashboard.jspa) and see what they say. I thought the path macros should work everywhere. Also post a question in their support forums. – Strelok Nov 12 '11 at 12:48
0

There is no way to change output folder for GWT compiler in IDEA. However you can specify absolute path to any directory after '-extra' parameter. By the way for what purpose do you use '-extra'?

Nik
  • 1,337
  • 7
  • 4
  • Absolute path is not cool in team environment. I'm using -extra to do localization of GWT app according to [this](http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinderI18n.html) tutorial. – expert Nov 10 '11 at 08:41
0

As of November 18, 2011 it is impossible to use path macroses in settings of project modules. Jetbrain is aware of this and there is feature request in their JIRA.

My work-around for a team with multiple engineers for now is to use system TEMP folder for GWT compiler extra output and move files in post-build event to folder I want it to be at.

expert
  • 29,290
  • 30
  • 110
  • 214