Thursday, February 20, 2014

After learning some Python and Django, including how to do some animation, to the point I thought I could work a job (though not an expert), I decided to return to Errai. I thought maybe I could look at Errai with fresh eyes. I still had the three errors in my dependencies that I had left.

<!-- Errai Core -->
ArtifactTransferException: Failure to transfer org.jboss.errai:errai-bus:jar:3.0-20131120.224014-312 from https://repository.jboss.org/nexus/content/groups/public/ was cached in a local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced Original Error: Could not transfer artifact org.jboss.errai:errai-bus:3.0-20131120.224014-312 from/to jboss-public-repository-group(https://repository.jboss.org/nexus/content/groups/public/):No response received after 60000
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-bus</artifactId>
      <exclusions>
        <exclusion>
          <groupId>javax.inject</groupId>
          <artifactId>javax.inject</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.annotation</groupId>
          <artifactId>jsr250-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
ArtifactTransferException: Failure to transfer org.jboss.errai:errai-bus:jar:3.0-20131120.224838-305 from https://repository.jboss.org/nexus/content/groups/public/ was cached in a local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced Original Error: Could not transfer artifact org.jboss.errai:errai-bus:3.0-20131120.2248384-305 from/to jboss-public-repository-group(https://repository.jboss.org/nexus/content/groups/public/):No response received after 60000
    <dependency>
      <groupId>org.jboss.errai</groupId>
      <artifactId>errai-ioc</artifactId>
      <exclusions>
        <exclusion>
          <groupId>javax.inject</groupId>
          <artifactId>javax.inject</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.annotation</groupId>
          <artifactId>jsr250-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

 <!-- GWT and GWT Extensions -->
Multiple annotations found at this line
-Missing artifact com.google.gwt:gwt-user:2.5.1

-ArtifactTransferExceptionfrom:failure to transfer com.google.gwt:gwt-user:2.5.1 from
http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Orginal Error: Could not transfer artifact com.google.gwt:gwt-user:2.5.1 from/to central(http://repo.maven.apache.org/maven2): No response after 60000
 
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <scope>provided</scope>
    </dependency>



I was still using juno Eclipse so I upgraded to kepler Eclipse like my mentor was using and was the most current Eclipse. In the act of updating I created a fourth error.

<plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>${gwt.maven.version}</version>
        <configuration>
          <logLevel>INFO</logLevel>
          <strict>true</strict>
          <runTarget>App.html</runTarget>
          <extraJvmArgs>-Xmx1000m -XX:MaxPermSize=500m</extraJvmArgs>
          <soyc>false</soyc>
          <hostedWebapp>src/main/webapp/</hostedWebapp>
          <server>org.jboss.errai.cdi.server.gwt.JettyLauncher</server>
        </configuration>
        <executions>
          <execution>
            <id>gwt-clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
Execution gwt compile of goal org.codehaus.mojo:gwt-maven plugin 2.5.1:resources failed Plugin org.codehaus.mojo:gwt-maven plugin 2.5.1 or one of its dependencies could not be resolved. Failure to transfer com.google.gwt:gwt-user jar 2.5.1 from http:/repo.maven.apache.org/maven2was cached in the local repository. Resolution will not be reattemped until the update interval of central has elapse or updates are forced. Original error Could not transfer artifact com.google.gwtgwt-user jar 2.5.1 from to central (http:/repo.maven.apache.org/maven2) No response received after 60000(org.codehaus.mojo:gwt-maven plugin 2.5.1: resources:gwt:compile process-resources)
          <execution>
            <id>gwt-compile</id>
            <goals>
              <goal>resources</goal>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
 The rest of the code is still at https://github.com/pmoessner/rpc-app1. 

This last error message appeared to indicate that I had some partially-downloaded dependencies stuck in my local Maven cache. To fix this I needed to try a build with Maven’s "-U” option, which forces updates:

C:\myapp> mvn -U clean install

(Note the U is a capital U, not lowercase.)
Before I did this I had updated Java. I changed JAVA_HOME to reflect the update :  C:\Program Files\Java\jdk1.7.0_51. I thought I was done with the update because when I ran C:\> java --version I got the correct version. I went to run the mvn -U clean install and got an error message that JAVA_HOME was not pointing to the right directory. It said JAVA_HOME = C:\Program Files\Java\jdk1.7.0_17 and to adjust environmental variable to the location of the Java installation. This JAVA_HOME had the value I had before I updated. I had since deleted the old jdk, installed the updated jdk and updated JAVA_HOME.  I tried just running C:\mvn --version and got the same error message. I went back and rechecked my environmental variables including JAVA_HOME and they were pointing to the update. I tried reinstalling both Java and Maven and still got the same error. I doubled checked all of my Java and Maven environmental variables. Nothing would work. I then remembered I had similar problems when I updated Java and Maven months earlier. What finally worked was to reboot my computer.
NOTE TO MYSELF: ALWAYS REBOOT AFTER UPDATING JAVA OR MAVEN BECAUSE MAVEN WON'T WORK IF YOU DON'T. YOU WILL GET A JAVA_HOME ERROR WHEN YOU RUN MAVEN IF YOU DON'T REBOOT. 

I'll be embarrassed if I forget this in the future. I had this in my December 18, 2013 post.
When I ran at the command line C:\myapp> mvn -U clean install that got rid of the fourth error. The first 3 errors were still there. To get rid of the first 3 errors I deleted the entire local Maven cache which I found under YOUR_HOME_DIR\.m2\repository. I deleted the whole repository folder. I ran C:\myapp> mvn -U clean install again. I then returned to Eclipse and went to Maven => Update Project. The 3 errors disappeared.

No comments:

Post a Comment