사용자 도구

사이트 도구


gradle:from_maven

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
마지막 판 양쪽 다음 판
gradle:from_maven [2012/10/19 15:31]
kwon37xi [현재(1.2) Gradle의 문제점]
gradle:from_maven [2013/05/10 14:49]
kwon37xi [Profile 흉내내기]
줄 46: 줄 46:
  
 [[gradle:dependencies|Gradle Dependencies]]를 참고하여 의존성 버전 관리 전략에 ''failOnVersionConflict()''을 넣어 주고 항상 명시하는 것이 좋아보인다. [[gradle:dependencies|Gradle Dependencies]]를 참고하여 의존성 버전 관리 전략에 ''failOnVersionConflict()''을 넣어 주고 항상 명시하는 것이 좋아보인다.
 +
 +===== Profile 흉내내기 =====
 +  * ''-Pprofile=값'' 형태의 옵션으로 Maven의 Profile을 흉내낼 수 있다.<code groovy>
 +final String DEFAULT_PROFILE = 'development'
 +allprojects {
 +    if (!project.hasProperty('profile') || !profile) {
 +        ext.profile = DEFAULT_PROFILE
 +    }
 +
 +    // 리소스에 각 프로필별 리소스 디렉토리 추가
 +    sourceSets {
 +        main {
 +            resources {
 +                srcDir "src/main/resources-${profile}"
 +            }
 +        }
 +    }
 +}
 +</code>
 +  * 이제 ''gradle -Pprofile=production''형태로 호출하면 모든 프로젝트에서 ''profile'' 속성에 ''production''이라는 값이 지정된 상태가 된다. 이에 따라 가변적인 행동을 정의해 준다.
 +  * ''-Pprofile''을 생략하면 기본인 ''DEFAULT_PROFILE'' 상수의 값 ''development''로 작동하게 된다.
 +
 ===== Apache CXF ===== ===== Apache CXF =====
 Apache CXF로 SOAP Client Class 생성하는 것은 JavaExec 태스크로 하면 된다. [[java:webservices:cxf|CXF]] 참조 Apache CXF로 SOAP Client Class 생성하는 것은 JavaExec 태스크로 하면 된다. [[java:webservices:cxf|CXF]] 참조
gradle/from_maven.txt · 마지막으로 수정됨: 2014/06/20 01:18 저자 kwon37xi