2011-12-02 3 views
1

저희 회사에서는 사용자 이름이 다음과 같은 기업 프록시를 사용합니다 domainName\username. add-proxy 명령을 사용하여 명령 줄에서 프록시를 추가하려고합니다.grails proxy 사용자 이름을 특수 문자로 설정하면 오류가 발생합니다.

내가 얻을 예외입니다 :

Error WARNING: Error configuring proxy settings: startup failed: 
C:\Documents and Settings\username\.grails\ProxySettings.groovy: 1: unexpected cha 
r: '\' @ line 1, column 94. 
    8080", "http.proxyUser":"company\username" 

이에 대한 해결 방법은 무엇입니까? ProxySettings.groovy 파일을 수동으로 편집하려고 시도했지만 시작시 동일한 오류가 발생합니다.

[업데이트] Grails 2.0.0 RC3을 사용해 보았지만 연결할 수 없습니다.

+0

'\\'를 사용하여 백 슬래시를 벗어나려고 했습니까? – Chris

+0

작은 따옴표와 이중 따옴표 내에서 \\, \\\를 시도했습니다. 작동하지 않았습니다. – Abe

답변

5

도메인이 프록시 구성에서 사용될 때 grails 버그가 발생했습니다. http://jira.grails.org/browse/GRAILS-7387. 해결 방법은 BuildConfig.groovy (수동으로 종류) 내에 프록시를 구성하는 것입니다. 하여 기존 company\username에 다음을 추가 :

grails.project.dependency.resolution = { 
    System.setProperty("http.proxyHost", "host"); 
    System.setProperty("http.proxyPort", "port"); 
    Authenticator.setDefault(new Authenticator() { 
     protected PasswordAuthentication getPasswordAuthentication() { 
      return new PasswordAuthentication("company\\username","password".toCharArray()); 
     } 
    }); 

    [rest of code] 
} 

이 방법 백 슬래시에 문제가 안됩니다.

+0

이 변경을 수행하고 proxySettings 파일에서 항목을 제거했습니다. 그러나 나는 아직도 연결할 수 없다 (나는 quartz plugin을 설치하려고 시도하고 있었다). grails와 네트 연결을 확인하는 명령이 있습니까? 또한 "프록시 설정"을 어디에서해야합니까? – Abe

+0

try :'grails install-plugin http://cloud.github.com/downloads/nebolsin/grails-quartz/grails-quartz-0.4.2.zip -global' – Chris

+0

아직 운이 없다 ... D : \ mongo \ bm> grails install-plugin http://cloud.github.com/downloads/nebolsin/gra ils-quartz/grails-quartz-0.4.2.zip -global | zip 다운로드 http://cloud.github.com/downloads/nebolsin/grails-quartz/grail | zip 다운로드 http://cloud.github.com/downloads/nebolsin/grails-quartz/grail s-quartz-0.4.2.zip. 기다려주십시오 .... | 오류 플러그인 다운로드 http://cloud.github.com/downloads/nebolsin/grai ls-quartz/grails-quartz-0.4.2.zip : java.net.SocketException : 네트워크에 연결되지 않았습니다. ble : connect – Abe

관련 문제