계룡대에 가서 전자정부 표준프레임워크 강의 때 인터넷이 안 되서 많이 힘들었습니다.

이런 젠장

메이븐 쓰는데, 인터넷이 연결 안 된다니.

말년에 노 인터넷이라니...


넥서스가 대안이라고 생각했는데,

쉽지 않네요.





7zip으로 압축된 실행파일을 통해서 설치하면 됩니다.




C:\ 에 설치하는 것을 권장합니다.




전자정부 표준프레임워크를 공식 사이트에서 다운로드 받는 것은 쉽지 않습니다.

Q&A 게시판에 다운로드 안 된다는 얘기가 빈번합니다.


보안 네트워크 때문이라고 얼핏 기억하는데요.


이런 속도가 나옵니다. 500M/1시간


2.6부터는 installer를 통해서 설치하게 되어있는데, 이것을 다시 zip으로 다시 묶어놓았습니다. 크게 용량이 줄지는 않았습니다.


풀버전입니다.

혹시 급한 분들에게 도움이 될까해서 아마존 S3에 파일을 올려놓았습니다.

http://bit.ly/okegov260


원사이트는 이곳입니다.


릴리즈 일자: 2013.06.05



허드슨, 지속적인 통합 도구

프로젝트를 진행할 때 업무 단위별로 팀을 나눠서 개발을 하고 난 뒤 오픈 한 달 전부터 코드를 통합하는 작업을 따로 했던 시기가 있었습니다. 이때 팀 간의 인터페이스가 맞지 않아서 이를 수정해서 맞추는 작업에 굉장히 많은 노력과 시간이 들었습니다.
전체 프로젝트 팀의 소스를 매일 매일 합쳐서 큰 문제가 생기기 전에 매일매일 소스를 빌드하는 방법이 가능해졌습니다. CVS, SVN과 같은 버전관리 시스템을 적용하고, 이 장에서 설명할 허드슨과 같은 지속적인 통합(Continuous Integration) 도구를 사용하면 손쉽게 프로젝트를 관리할 수 있습니다.

허드슨은 http://hudson-ci.org 사이트에서 정보를 얻을 수 있습니다. 오픈소스로 태어났지만 썬을 인수한 오라클과의 운영 이슈로 허드슨의 원 개발자가 자바닷넷(http://java.net)을 떠나 깃허브(https://github.com/jenkins)로 자리를 옮겨서 동일한 제품을 만들었습니다. 젠킨스(Jenkins)이며 http://jenkins-ci.org 사이트를 통해서 공개되고 있습니다. 두 제품의 사용법은 동일합니다.

표준프레임워크 개발환경 서버를 설치하면 톰캣이 설치됩니다. 톰캣의 webapps/ 폴더에 hudson.war 파일이 위치합니다. 톰캣이 실행되면 자동으로 압축이 풀리면서 hudson 사이트가 준비됩니다.

<그림> hudson.war 파일 위치


윈도우7에서는 서비스에 등록된 톰캣을 일반 cmd창에서 실행할 수 없습니다. 권한이 없기 때문이죠. cmd창을 관리자 모드로 실행하고, net start tomcat6 명령으로 실행할 수 있습니다. 만약 실행중이라면 "요청한 서비스가 이미 시작되었습니다."라는 메시지를 보게 될 것입니다.

<그림> 관리자 모드 톰캣 서비스 시작



브라우저를 통해서 http://localhost:7070 페이지로 접속하면 자동을 /hudson 컨텍스트로 이동합니다. 허드슨이 준비가 완료된 화면입니다. 왼쪽 메뉴에서 새 작업을 클릭합니다.

<그림> 허드슨 페이지 접속


새 작업 화면에서는 프로젝트명과 스타일을 정합니다. ok.egov 라고 프로젝트명을 입력합니다. 작업 스타일은 메이븐을 사용하기 때문에, 두 번째 항목인 Build a maven2/3 project 를 선택합니다. ok 버튼을 클릭하면 메이븐 기반의 프로젝트를 다루는 작업이 만들어집니다.



[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[HUDSON] Archiving C:\eGovFrameSvr\hudson\jobs\ok.egov\workspace\pom.xml to C:\eGovFrameSvr\hudson\jobs\ok.egov\modules\ok$egov\builds\2013-07-02_07-12-51\archive\ok\egov\1.0.0\pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
---- Debugging information ----
message             : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
class               : org.apache.maven.plugin.war.util.WebappStructure
required-type       : org.apache.maven.plugin.war.util.WebappStructure
path                : /webapp-structure
line number         : 1
-------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Trace
com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
---- Debugging information ----
message             : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
class               : org.apache.maven.plugin.war.util.WebappStructure
required-type       : org.apache.maven.plugin.war.util.WebappStructure
path                : /webapp-structure
line number         : 1
-------------------------------
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:117)
	...
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:59)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:257)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:124)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
	... 43 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Tue Jul 02 07:12:57 KST 2013
[INFO] Final Memory: 20M/49M
[INFO] ------------------------------------------------------------------------
channel stopped
Finished: FAILURE


이 에러 메시지는 maven war plugin 이 Java7을 지원하지 못하기 때문이라고 합니다. jdk1.6으로 내리거나 아래 플러그인을 pom.xml에 추가해야 합니다.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.1.1</version>
</plugin>

from: http://stackoverflow.com/questions/7539970/cannot-construct-org-apache-maven-plugin-war-util-webappstructure-as-it-does-not




전자정부 표준프레임워크를 프로젝트에서 사용했는지 안 했는지 검증하는 방법입니다.


Q표준프레임워크를 적용가이드보면 '표준프레임워크 적용여부를 확인하는 간단한 방법 

'이 있습니다. 

1. 저희가 개발한 프로젝트에서 3가지 항목만 준수하여 적용되면 '표준프레임워크가 적용'되었다고 보면 되는건가요 ? 

2. 표준프레임워크 적용여부를 검증해주는 기관 또는 부서가 있는지요 ? 

3. 개발사 측에서 표준준수확인할 수 있는 가이드가 있는지 궁금합니다. 


A

보신 가이드는 개발자가 아닌 발주자가 참조하는 가이드 부분에 포함되어 있는 내용입니다. 
즉, 표준프레임워크에 대해 잘 모르시는 분이 대략적으로 표준프레임워크가 적용되어 있는지 확인하기 위한 용도입니다. 

보다 자세하게 기준을 말씀드리면 다음과 같습니다. 
- Annotation 기반의 Spring MVC 적용 
- Layered architecture 준수 (@Controller, @Service, @Repository) 
- Data Access Layer의 경우 iBatis 적용 등 입니다. 

보다 자세한 내용은 다음 링크의 문서를 확인하시면 됩니다. 
http://www.egovframe.org/wiki/lib/exe/fetch.php?media=egovframework:rte2:호환성가이드라인.ppt 

또한 표준 프레임워크 센터에서는 표준프레임워크 적용점검 서비스를 제공하고 있습니다. 

감사합니다. 


from: http://open.egovframe.kr/projects/qna/qna/6393



호환성가이드라인.ppt


eGovFrameSvr 서버 2.0.0에는 jdk1.5가 포함되어 있고, hudson의 세팅은 여기에 맞춰져 있습니다. 그래서 jdk1.6이상으로 맞춰진 프로젝트는 컴파일 되지 않는 이슈가 있습니다.


[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 10 source files to C:\eGovFrameSvr\hudson\jobs\ok.egov\workspace\target\classes
[HUDSON] Archiving C:\eGovFrameSvr\hudson\jobs\ok.egov\workspace\pom.xml to C:\eGovFrameSvr\hudson\jobs\ok.egov\modules\ok$egov\builds\2013-07-01_15-22-31\archive\ok\egov\1.0.0\pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid target release: 1.6
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  -classpath <path>          Specify where to find user class files
  -cp <path>                 Specify where to find user class files
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -d <directory>             Specify where to place generated class files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release
  -target <release>          Generate class files for specific VM version
  -version                   Version information
  -help                      Print a synopsis of standard options
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system



[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 31 seconds
[INFO] Finished at: Mon Jul 01 15:24:06 KST 2013
[INFO] Final Memory: 17M/31M
[INFO] ------------------------------------------------------------------------
Waiting for Hudson to finish collecting data
channel stopped
Finished: FAILURE


이를 해결하려면 허드슨 관리에서 JDK의 버전을 1.6 이상으로 맞춰 줘야 합니다. 메인 페이지에서 Hudson 관리 > Configure System > JDK 섹션으로 이동합니다.




수정 후에는 이상없이 빌드될 것입니다.



cmd창을 관리자 모드로 실행하지 않으면 서비스를 실행할 수 없습니다.


C:\Users\kenu>net start tomcat6

시스템 오류 5이(가) 생겼습니다.


액세스가 거부되었습니다.



C:\Users\kenu>net start svnserve

시스템 오류 5이(가) 생겼습니다.


액세스가 거부되었습니다.



C:\Users\kenu>




이런 경우 cmd.exe 를 관리자 모드로 실행합니다.



관리자 권한으로 창이 떠 있는 경우, 상단 주소줄에 관리자:라는 문구가 보입니다. 물론 서비스도 명령어로 제어가 가능합니다.



서브버전 예외 폴더

프로젝트에서 target폴더는 버전관리에서 제외할 폴더입니다. target은 메이븐에서 만드는 폴더이고, 컴파일한 클래스와 jar, war 파일처럼 산출물이 만들어지는 폴더입니다. 이러한 폴더는 소스만 있으면 언제든지 재생할 수 있고, 용량이 크기 때문에 버전관리에서 제외합니다. 제외하는 방법은 다음과 같습니다.

물음표(?)가 붙은 target 폴더를 선택합니다. 컨텍스트 메뉴에서 Team > Add to svn:ignore... 항목을 클릭합니다.
<그림> svn:ignore



target 폴더를 버전관리하지 않도록 svn:ignore에 추가를 확인하는 창이 뜹니다.

<그림> target 폴더 제외


프로젝트 명 앞의 부등호 기호(>)는 해당 프로젝트에 변경이 일어났다는 것을 뜻합니다. 환경적인 변화도 커밋의 대상이 됩니다. 프로젝트를 선택하고 Team > Synchronize with Repository 항목을 클릭합니다.
<그림> 저장소 동기화 퍼스펙티브


마찬가지로 커밋 창에는 ignore target 이라는 코멘트를 답니다. 물론 한글로 코멘트를 달아도 됩니다.
<그림> 커밋 코멘트

C:\eGovFrameSvr\bin\start.bat 를 실행하면 윈도우 서비스 자동 시작입니다.

svnserve 시작되고, tomcat 시작됩니다.

허드슨과 넥서스는 http://localhost:7070/hudson , http://localhost:7070/nexus 으로 접속 가능합니다.



eGovFrameSvr은 http://goo.gl/lDgVK 에서 로그인 후 다운로드 할 수 있습니다.


+ Recent posts