Uploaded image for project: 'Errai'
  1. Errai
  2. ERRAI-1060

errai-setup messes up with pom.xml for Errai 4.0.0.Final

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0.0.Final
    • Fix Version/s: None
    • Component/s: Errai Forge Addon
    • Labels:
      None
    • Environment:

      Ubuntu 17.04, Java 1.8.0_131 (Oracle JDK), Forge 3.7.1.Final

    • Steps to Reproduce:
      Hide

      project-new --named errai-forge-demo2 --top-level-package org.jboss.errai.demo2 --version 1.0.0-SNAPSHOT --final-name "Errai Forge Demo 2" --type war --build-system Maven
       
      errai-setup --version-select 4.0.0.Final --logical-module-name org.jboss.errai.demo2.App
      

      Show
      project-new --named errai-forge-demo2 --top-level-package org.jboss.errai.demo2 --version 1.0.0-SNAPSHOT --final-name "Errai Forge Demo 2" --type war --build-system Maven   errai-setup --version-select 4.0.0.Final --logical-module-name org.jboss.errai.demo2.App

      Description

      errai-setup messes up with the pom.xml in a new project:

      1. A configuration for the maven-compiler-plugin is added which uses the hard coded value 1.6 both for source and target configuration. It should at least use the properties maven.compiler.source and maven.compiler.target that are created by project-new. The whole configuration block for the maven-compiler-plugin seems to be unnessecary, because the plugin will use the properties provided, see http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source and http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#target

      <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
              <source>1.6</source>
              <target>1.6</target>
          </configuration>
      </plugin>
      

        <properties>
          <!-- more properties -->
          <maven.compiler.source>1.8</maven.compiler.source>
          <maven.compiler.target>1.8</maven.compiler.target>
          <!-- more properties -->
        </properties>
      

      2. errai-setup adds the org.codehaus.mojo:gwt-maven-plugin version 2.7.0. It should be 2.8.0 for Errai 4.0.0.Final.

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>gwt-maven-plugin</artifactId>
              <!-- GWT Version should be 2.8.0 -->
              <version>2.7.0</version>
              <executions>
                <execution>
                  <id>compile</id>
                  <phase>prepare-package</phase>
                  <goals>
                    <goal>compile</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <logLevel>INFO</logLevel>
                <noServer>false</noServer>
                <server>org.jboss.errai.cdi.server.gwt.JBossLauncher</server>
                <disableCastChecking>true</disableCastChecking>
                <runTarget>${errai.dev.context}/index.html</runTarget>
                <soyc>false</soyc>
                <hostedWebapp>src/main/webapp</hostedWebapp>
                <extraJvmArgs>-Xmx712m -XX:CompileThreshold=7000 -XX:MaxPermSize=128M -Derrai.jboss.home=${errai.jboss.home} -Derrai.dev.context=${errai.dev.context} -Derrai.jboss.javaagent.path=${settings.localRepository}/org/jboss/errai/errai-client-local-class-hider/${errai.version}/errai-client-local-class-hider-${errai.version}.jar</extraJvmArgs>
              </configuration>
            </plugin>
      

      3. errai-setup added the wrong WildFly version 8.1.0.Final, it should be at least 10.0.0.Final or better 10.1.0.Final. It uses the hard coded version at several locations in the pom.xml, it should use a property instead (org.wildfly.plugins:wildfly-maven-plugin uses property wildfly.version, see https://docs.jboss.org/wildfly/plugins/maven/latest/run-mojo.html#version).

            <plugin>
              <artifactId>maven-dependency-plugin</artifactId>
              <version>2.8</version>
              <executions>
                <execution>
                  <id>unpack</id>
                  <phase>process-resources</phase>
                  <goals>
                    <goal>unpack</goal>
                  </goals>
                  <configuration>
                    <artifactItems>
                      <artifactItem>
                        <groupId>org.wildfly</groupId>
                        <artifactId>wildfly-dist</artifactId>
                        <type>zip</type>
                        <overWrite>false</overWrite>
                        <outputDirectory>${project.build.directory}</outputDirectory>
                        <!-- Wrong version, use property -->
                        <version>8.1.0.Final</version>
                      </artifactItem>
                    </artifactItems>
                  </configuration>
                </execution>
              </executions>
            </plugin>
      

        <properties>
          <failOnMissingWebXml>false</failOnMissingWebXml>
          <errai.dev.context>${project.artifactId}</errai.dev.context>
          <!-- Wrong version, use property for WildFly version -->
          <errai.jboss.home>${project.build.directory}/wildfly-8.1.0.Final</errai.jboss.home>
          <errai.version>4.0.0.Final</errai.version>
          <maven.compiler.source>1.8</maven.compiler.source>
          <maven.compiler.target>1.8</maven.compiler.target>
          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mbarkley Max Barkley
                Reporter:
                brianpreuss Brian Preuß
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: