Lambda expressions and Java 1.8 in IdeaUIDesigner

I'm trying to use Java 1.8 with lambda expressions with Idea UI Designer , I have in maven:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>ideauidesigner-maven-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>javac2</goal>
            </goals>
        </execution>
    </executions>

    <configuration>
        <fork>true</fork>
        <debug>true</debug>
        <failOnError>true</failOnError>
    </configuration>
</plugin>

and dependency

<dependency>
    <groupId>com.intellij</groupId>
    <artifactId>forms_rt</artifactId>
    <version>7.0.3</version>
</dependency>

When I try to use lambdas it returns compile error:

Failed to execute goal org.codehaus.mojo:ideauidesigner-maven-plugin:1.0-beta-1:javac2 (default) on project stockbox-chart: Execution default of goal org.codehaus.mojo:ideauidesigner-maven-plugin:1.0-beta-1:javac2 failed: 52264 -> [Help 1]

Do you have any ideas how to use lambdas with Idea UI Designer ?


One workaround, until such time as someone is able to fix the plugin, is to configure your IntelliJ settings to generate the GUI as source rather than as binaries, then manually re-generate the GUI sources prior to running Maven any time you make a change in GUI designer:

  • Go to File > Settings and change the selection for Editor > GUI Designer > Generate GUI into: to Java source code .
  • Whenever you make a GUI change, build the project from IntelliJ to (re-)generate the GUI Java source code ( Build >> Build Project ).
  • Optionally, check the generated source into whatever source-control mechanism you're using; this step saves anyone else building your project via Maven from having to do the manual build from IntelliJ later (ie so they can build solely via Maven).
  • If you're using an IntelliJ layout manager (like GridLayoutManager ), add com.intellij:forms_rt:7.0.3 as a compile dependency in your pom.xml , if it isn't already there.
  • Run Maven as usual to build your project.
  • 链接地址: http://www.djcxy.com/p/87596.html

    上一篇: 在S3中仅检索根对象(文件夹)的列表

    下一篇: Lambda表达式和IdeaUIDesigner中的Java 1.8