2013-06-18 1 views
2

SCons 신생아는 여기에 있습니다. 내가 문제를보고하고병을 만들 때 SCons는 모든 클래스 파일을 선택하지 않습니다.

compiled_classes = env.Java \ 
        (target = compiled_classes_dir, 
        source = source_tld, 
        JAVAVERSION='1.6', 
        JAVACLASSPATH=['source_tld/libs/' + 
            file.name 
            for file in 
            Glob('source_tld/' + 
            'libs/*.jar')]) 

new_jar = env.Jar(target = jar_name, 
        source = compiled_classes_dir) 

를 클래스 파일로 컴파일 내부 클래스 (이 클래스에 속하는 클래스 파일 이름에 $이있어서, 나는 다음과 같은 항아리를 만들 그것을 (버전 2.0)를 사용하고 있습니다)가 제대로 처리되지 않고 있습니다. 즉 생성 된 JAR에 포함되지 않습니다. 이 문제를 해결하기위한 제안 사항은 크게 감사하겠습니다. TIA.

추 신 : This 제안을 추가하면 JAVAVERSION이 도움이되지 않았습니다.

답변

0

SCons가 출력 클래스를 잘못 계산하고 있으므로이 해결 방법을 제안합니다.

compiled_classes = env.Java \ 
        (target = compiled_classes_dir, 
        source = source_tld, 
        JAVAVERSION='1.6', 
        JAVACLASSPATH=['source_tld/libs/' + 
            file.name 
            for file in 
            Glob('source_tld/' + 
            'libs/*.jar')]) 
#workaround to make sure classes are cleaned 
env.Clean(compiled_classes, env.Dir(compiled_classes_dir)) 

# its important to set the JARCHDIR or the Jar command will not be run 
# from the correct location if you want an executable Jar add the manifest here 
new_jar = env.Jar(target = jar_name, 
        source = [compiled_classes_dir], JARCHDIR='$SOURCE') 
관련 문제