4 Replies Latest reply on Apr 29, 2013 9:26 AM by zhouyaguo

    JBoss AS 7(7.2.0.Final-testsuite-fix) build error when running testcase (behind a nexus mirror)

    zhouyaguo

      Hi, all:

         Due to the hard code in org.jboss.as.model.test.MavenUtil #newCentralRepository (https://github.com/wildfly/wildfly/blob/master/model-test/src/main/java/org/jboss/as/model/test/MavenUtil.java), i meet a build error of running testcase using "./build.sh clean install" , because i build it in a machine which can not connect internet and can only connect my nexus internel mirror. My situation is like https://community.jboss.org/message/789987#789987

       

        I have a work-around as follows:

       

      step1. a little hack on source code

       

          private static RemoteRepository newCentralRepository() {
              String jbossDevRepoUrl = "http://repository.jboss.org/nexus/content/groups/developer/";
              String configuredUrl = System.getProperty("jbossDevRepoUrl");
              if(configuredUrl != null){
                  jbossDevRepoUrl = configuredUrl;
              }
              return new RemoteRepository("jboss-developer", "default", jbossDevRepoUrl);
          }
      

       

      step2. run

      ./build.sh -DargLine="-DjbossDevRepoUrl=http://myip:myport/nexus/content/groups/public/" clean install 

       

      That's it and it works for me.

       

      Is it ok to merge to upstream? if yes, i'll make a pull request.

       

      Thanks in advance.

       

      Regards

      Yaguo