번째 기초로 엑셀 시트의 내용을 기본적으로는 가져오고 쓰는 방법에 대해 알아보고자 합니다.

 

가장 기초적이면서 기본적으로 알아야된다고 생각합니다.

 

 

▶ 매크로에서 엑셀데이터 불러오기 예시

    엑셀시트에 해당 내용이 작성됬다고 가정합니다.

엑셀 시트에 데이터 작성

 

이자료의 C3에 있는 엑셀내용을 매크로에서 가져와 메시지로 출력하는 방법

public sub test()                  '사용자 프로시저명(실행하고 끝남)

    MsgBox Range("C3")         'C3열 메시지 출력 
   
End Sub 


해당 커서 위치를 사용자처리함수(프로시저)에 넣고 F5또는 위에 플레이 버튼을 실행시켜 봅시다

아래와 같이 메시지 박스에 C4에 있는 내용이 출력됩니다.

사용자 프로시저를 가지고 메크로 실행예

 

번째 기초로 엑셀 시트의 내용을 기본적으로는 가져오고 쓰는 방법에 대해 알아보고자 합니다.

 

가장 기초적이면서 기본적으로 알아야된다고 생각합니다.

 

 

▶ 매크로에서 엑셀데이터 불러오기 예시

    엑셀시트에 해당 내용이 작성됬다고 가정합니다.

엑셀 시트에 데이터 작성

 

이자료의 C3에 있는 엑셀내용을 매크로에서 가져와 메시지로 출력하는 방법

public sub test()                  '사용자 프로시저명(실행하고 끝남)

    MsgBox Range("C3")         'C3열 메시지 출력 
   
End Sub 


해당 커서 위치를 사용자처리함수(프로시저)에 넣고 F5또는 위에 플레이 버튼을 실행시켜 봅시다

아래와 같이 메시지 박스에 C4에 있는 내용이 출력됩니다.

사용자 프로시저를 가지고 메크로 실행예

 

1997년부터 엑셀을 사용해왔는데 엑셀만한 도구가 없다고 생각되어 집니다.

정식적인 개발은 2000년도부터 시작했고 사용하면서 엑셀이 정말 필요로 하고나 하는 생각이 듭니다.

첫번째 VBA(Visual Basic Application)에 대해 환경설정에 대해 이야기 하고자 합니다.

 

먼저 엑셀 상단에 개발자 도구 텝을 보이게 하기 위하여 설정해봅시다.

▶ 파일-> 옵션 선택

 

 리본사용자 지정-> 우측에 개발도구 선택

개발자 도구 탭 보기

 

▶ 상단에 개발도구 탭이 나옴

 

 Visual Basic 을 선택하면 하단 VBA 매크로를 관리하는 화면이 별도 보임

엑셀 매크로는 .bas 라는 확장자에 모듈을 생성하여 거기에 매크로를 기록하게 되있는데

.bas를 생성을 아래와 같이 하시면 됩니다.

 

▶ (코딩할수있는 모듈 생성)프로젝트 창에서 마우스 오른쪽 -> 삽입->모듈

사용자 모듈 추가방법

 

▶ 작성방법

Sub는 특정처리만 하고 끝, Function 엑셀에 사용자 함수를 만드는거

 

일반 Java와 같이 프로시저단위로 만들게 되어 있습니다. 크게 두가지로

 Sub 프로시저, Function 두개로 나누어 지는데

 

Sub 프로시저는 단지 수행하고 종료

Function는 몇가지 인자를 입력을 받아 Return으로 돌려주게 되어 있습니다.

 

여기서 엑셀에 매크로 기능을 VBA라고 했냐면 기존에 VB개발화면과 동일하고

다만 엑셀에서 사용하는 Mid, Left, Right등의 엑셀에서 사용하는 함수를 추가적으로 사용할수 있습니다.

 

위 사용자 함수를 엑셀시트에서 사용해보겠습니다.

 위에서 만든 함수명에 사용자함수에 인자 두개를 넣고 결과를 함수명으로 주면 엑셀시트에서도

  사용하시는것을 보실수 있습니다.

 

▶ 사용자 함수 사용예

 

Function으로 사용자 함수를 엑셀시트에서 아용하는 예시

 사용결과

사용자 함수 처리결과

 

※ 팁

모든 명령어 뒤에 --help를 넣으면 옵션이 나옴
컨터에너ID에 앞 3자리만 써도 해당ID를 찾음
컨테이너ID외 NAME을 써도 됨

- CONTAINER ID : 140ab366f2db,  NAMES :  db2 인경우
ex) docker start 140ab366f2db 
    docker start 140
    docker start db2

    컨터에너 ID에 앞 3자리만 써도 해당ID를 찾음

    ex) docker start 140ab366f2db  와 docker start 140 는 동일함

ㅁ 도커내 컨테이너의 상태확인, 실행 종료 , 삭제

▶ ps : 컨테이너의 상태 
   $docker ps (옵션): 실행중인 컨테이너의 목록을 확인한다
   -a  : 종료까지 표시 
   -q  : 컨테이너 ID만 표시 

▶ start/stop : 컨테이너의 실행 종료
   $docker start 컨테이너ID
   $docker stop 컨테이너ID
   
▶ rm : 컨테이너 삭제  
   $docker rm 컨테이너ID
   ※ 컨테이너가 종료되더라도 다시 실행하면 이전 상태가 유지된다 따라서 사용하지 않는 컨테이너는 
      rm 명령어를 통해 완전히 제거를 해야한다

ㅁ 컨테이너 내부 실행

▶ doker exec [옵션] conteainer command
Options:
  -d, --detach               Detached mode: run command in the background
      --detach-keys string   Override the key sequence for detaching a container
  -e, --env list             Set environment variables
  -i, --interactive          Keep STDIN open even if not attached
      --privileged           Give extended privileges to the command
  -t, --tty                  Allocate a pseudo-TTY
  -u, --user string          Username or UID (format: <name|uid>[:<group|gid>])
  -w, --workdir string       Working directory inside the container
 
 예시)
   $docker exec -i -t db2 /bin/bash  => db2(이미지name 및 컨테이너id)에 쉘을 실행
   $docker exec -i -t db2 ls         => db2(이미지name 및 컨테이너id)에 ls 명령어 실행 
   $docker exec db2 sh -c "cd ~ ; mkdir test ; ls" 
               =>sh -c 명령어를 사용하면 위에 보이는 것 처럼,연결되거나큰 따옴표로 쓰인(chained or quoted)
                  명령어들을 실행시킬 수 있다.
    

ㅁ 이미지 목록조회 및 삭제

$dokcer images        : 목록조회
docker rmi 이미지명    : 삭제
docker rmi -f 이미지명 : 삭제(컨테이너 동시 삭제)

ㅁ 컨테이너 검색, 다운로드, 다운로드 설치

▶ docker search image(검색어) : 컨테이너 검색
   ex) $docker search db2 
  - Docker Hub로부터 사용가능한 image를 찾는 명령어
  - Docker는 Dokcer HUB 를 통해 Git Hub 처럼 사용자들간의 이미지 공유를 할 수 있는 환경이 구축되어 있다
  - 공식이미지는 galid/centos 처럼 / 앞에 사용자의 이름이 붙지 않는 것

▶ docker pull <이미지이름 or 이미지iD> : 이미지 다운로드 
   $docker pull ibmcom/db2:lastest : 

▶ docker run [옵션] <이미지이름 or 이미지iD> <실행할 파일> : 컨테이너 다운로드 설치 및 실행
  - 단순히 image안의 파일을 실행할 목적으로 생성된 것 때문에 메인으로 실행되는 파일이 종료되면 
    컨테이너도 같이 종료된다 따라서 계속해서 컨테이너를 유지하고 싶다면 -d  옵션을 이용해야 한다.
  - 다운받은 image를 실행한 형태인 컨테이너로 만드는 명령어이다
  주요옵션
   -i 
      --interactive=false 옵션과 동일
      표준 입출력 stdin을 활성화하며 컨테이너와 연결되어있지 않더라도 표준 입력을 유지함   
   -t 
      --tty=false 옵션과 동일
      TTY 모드를 사용 bash를 사용하려면 이 옵션을 설정해야 함
      이 옵션을 설정하지 않으면 명령어는 입력할 수 있지만 결과가 표시되지 않음   
   -d 
      백그라운드에서 실행 즉 데몬형태  
   -p : 포트포워딩 HOST PORT:Docker PORT 
   -e : 환경변수 설정
   -v : docker외부 마운트 외부:내부
   -name 
      컨테이너 이름 설정
   
 ex) db2 설치 
    docker run -itd --name db2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=db2inst1 -e DBNAME=test -v /home/dicws/DB2:/database ibmcom/db2   
    docker run -itd bmcom/db2:korean --name db2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=db2inst1 -e DBNAME=test -v /home/dicws/DB2:/database ibmcom/db2:korean
 ex) Oracle 설치
     docker run --name oracle11g -d -p 1521:1521 jaspeen/oracle-xe-11g
 ex) Tomcat 설치
     docker run -d --name=tomcat -p 8080:8080 tomcat:latest   

부연) run 옵션

Options:
      --add-host list                  Add a custom host-to-IP mapping (host:ip)
  -a, --attach list                    Attach to STDIN, STDOUT or STDERR
      --blkio-weight uint16            Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
      --blkio-weight-device list       Block IO weight (relative device weight) (default [])
      --cap-add list                   Add Linux capabilities
      --cap-drop list                  Drop Linux capabilities
      --cgroup-parent string           Optional parent cgroup for the container
      --cidfile string                 Write the container ID to the file
      --cpu-period int                 Limit CPU CFS (Completely Fair Scheduler) period
      --cpu-quota int                  Limit CPU CFS (Completely Fair Scheduler) quota
      --cpu-rt-period int              Limit CPU real-time period in microseconds
      --cpu-rt-runtime int             Limit CPU real-time runtime in microseconds
  -c, --cpu-shares int                 CPU shares (relative weight)
      --cpus decimal                   Number of CPUs
      --cpuset-cpus string             CPUs in which to allow execution (0-3, 0,1)
      --cpuset-mems string             MEMs in which to allow execution (0-3, 0,1)
  -d, --detach                         Run container in background and print container ID
      --detach-keys string             Override the key sequence for detaching a container
      --device list                    Add a host device to the container
      --device-cgroup-rule list        Add a rule to the cgroup allowed devices list
      --device-read-bps list           Limit read rate (bytes per second) from a device (default [])
      --device-read-iops list          Limit read rate (IO per second) from a device (default [])
      --device-write-bps list          Limit write rate (bytes per second) to a device (default [])
      --device-write-iops list         Limit write rate (IO per second) to a device (default [])
      --disable-content-trust          Skip image verification (default true)
      --dns list                       Set custom DNS servers
      --dns-option list                Set DNS options
      --dns-search list                Set custom DNS search domains
      --entrypoint string              Overwrite the default ENTRYPOINT of the image
  -e, --env list                       Set environment variables
      --env-file list                  Read in a file of environment variables
      --expose list                    Expose a port or a range of ports
      --group-add list                 Add additional groups to join
      --health-cmd string              Command to run to check health
      --health-interval duration       Time between running the check (ms|s|m|h) (default 0s)
      --health-retries int             Consecutive failures needed to report unhealthy
      --health-start-period duration   Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
      --health-timeout duration        Maximum time to allow one check to run (ms|s|m|h) (default 0s)
      --help                           Print usage
  -h, --hostname string                Container host name
      --init                           Run an init inside the container that forwards signals and reaps processes
  -i, --interactive                    Keep STDIN open even if not attached
      --ip string                      IPv4 address (e.g., 172.30.100.104)
      --ip6 string                     IPv6 address (e.g., 2001:db8::33)
      --ipc string                     IPC mode to use
      --isolation string               Container isolation technology
      --kernel-memory bytes            Kernel memory limit
  -l, --label list                     Set meta data on a container
      --label-file list                Read in a line delimited file of labels
      --link list                      Add link to another container
      --link-local-ip list             Container IPv4/IPv6 link-local addresses
      --log-driver string              Logging driver for the container
      --log-opt list                   Log driver options
      --mac-address string             Container MAC address (e.g., 92:d0:c6:0a:29:33)
  -m, --memory bytes                   Memory limit
      --memory-reservation bytes       Memory soft limit
      --memory-swap bytes              Swap limit equal to memory plus swap: '-1' to enable unlimited swap
      --memory-swappiness int          Tune container memory swappiness (0 to 100) (default -1)
      --mount mount                    Attach a filesystem mount to the container
      --name string                    Assign a name to the container
      --network string                 Connect a container to a network (default "default")
      --network-alias list             Add network-scoped alias for the container
      --no-healthcheck                 Disable any container-specified HEALTHCHECK
      --oom-kill-disable               Disable OOM Killer
      --oom-score-adj int              Tune host's OOM preferences (-1000 to 1000)
      --pid string                     PID namespace to use
      --pids-limit int                 Tune container pids limit (set -1 for unlimited)
      --privileged                     Give extended privileges to this container
  -p, --publish list                   Publish a container's port(s) to the host
  -P, --publish-all                    Publish all exposed ports to random ports
      --read-only                      Mount the container's root filesystem as read only
      --restart string                 Restart policy to apply when a container exits (default "no")
      --rm                             Automatically remove the container when it exits
      --runtime string                 Runtime to use for this container
      --security-opt list              Security Options
      --shm-size bytes                 Size of /dev/shm
      --sig-proxy                      Proxy received signals to the process (default true)
      --stop-signal string             Signal to stop a container (default "SIGTERM")
      --stop-timeout int               Timeout (in seconds) to stop a container
      --storage-opt list               Storage driver options for the container
      --sysctl map                     Sysctl options (default map[])
      --tmpfs list                     Mount a tmpfs directory
  -t, --tty                            Allocate a pseudo-TTY
      --ulimit ulimit                  Ulimit options (default [])
  -u, --user string                    Username or UID (format: <name|uid>[:<group|gid>])
      --userns string                  User namespace to use
      --uts string                     UTS namespace to use
  -v, --volume list                    Bind mount a volume
      --volume-driver string           Optional volume driver for the container
      --volumes-from list              Mount volumes from the specified container(s)
  -w, --workdir string                 Working directory inside the container

ㅁ docker image만들기

▶ 이미지 생성
   1. 반드시 "Dockerfile" 이라는 이름으로 docker file 생성
      FROM "기본이미지"
      ADD "이미지에 추가할 파일"
      RUN "실행할 명령어"

      ex) $vi Dockerfile
          FROM ibmcom/db2
          RUN localedef -f UTF-8 -i ko_KR ko_KR.UTF-8
          ENV LANG ko_KR.UTF-8
          ENV LANGUAGE ko_KR:en
          ENV LC_ALL ko_KR.UTF-8
          CMD ["/bin/bash"]
          
   2. 이미지 생성
      $docker build -t ibmcom/db2:korean .

      -->$docker images 로 생성을 알수 있음
   

도커 이미지 개념

ㅁ pull

▶ 이미지만 가져옴
   docker pull [이미지 이름]:[태그]

▶ 이미지로부터 실행
  docker run -it 이미지명  
  ex) docker run -it ibmcom/db2:latest --name db2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=db2inst1 -e DBNAME=test -v /home/dicws/DB2:/database

ㅁ 컨테이너 환경변수 변경

1) container id 알아내기
   docker inspect my_container or docker ps or docker ps -a
   
2) config 파일 변경
   vi /var/lib/docker/containers/{container-id}/config.v2.json
      해당파일은 json형식으로 되어 있으므로 수정

3) docker 컨테이너 재시작
   $docker restart my_container

ㅁ 기타 명령어

docker rename [old] [new]  : name변경

'IT > 서버' 카테고리의 다른 글

[시놀로지 Nas] 도커 외부접속  (3) 2020.12.14
리눅스 추가 설치 및 명령어, 주요경로  (0) 2020.11.16

$표시는 command이고 없으면 경로표시, 리눅스 명령에 --help시 도움말 나옴.

ㅁ OS관련

▶ 리눅스 OS 및 버전확인 : 버전따라 종류따라 많음, centos에서 일반적
  grep . /etc/*-release
  cat /etc/*-release | uniq 

ㅁ 네트워크관련

▶ ifconfig 명령어 없는경우 추가 설치
   $yum install net-tools  
   /etc/sysconfig/network-scripts/ifcfg-ethXX : 네트워크 설정 경로
    
▶ 포트 확인 
   $netstat -nap | grep 3389 
   
▶ telnet 접속
   telnet명령에서 빠져나오려면 Ctrl + ] 눌린다음에 quit 치면 된다
   
▶ netstat
   netstat -an : Active Internet connections (servers and established)
   
▶ 방화벽
   $systemctl status firewalld

ㅁ 언어관련

▶ 기본
   locale -a 목록
   locale : 현재 설정

▶ 설치된 언어팩 확인
  $localectl list-locales  : 설치가능 언어 리스트
  $localectl list-locales | grep kr : 한국어 설치 확인

▶ 설정된 언어 확인
   $locale | grep LANG     : 언어설정확인
   $vi /etc/locale.conf    : 언어설정 경로
   $localectl set-locale LANG=ko_KR.utf8 : 언어 한글 설정 명령어
    
   [서버 문자셋 UTF-8로 변경]
   1) localedef -c -i ko_KR -f UTF-8 ko_KR.UTF-8
   2) localectl set-locale LANG=ko_KR.UTF-8      
   
▶ 컴파일시 옵션   
   locale-gen ko_KR.UTF-8                    : centos는 없음
   localedef -f UTF-8 -i ko_KR ko_KR.UTF-8   : centos는 있음

▶ 한글패키지 설치   ??
  dnf install glibc-langpack-ko -y

ㅁ 환경 설정관련

▶ /etc/profile : 기본프로파일 경로
   alias inst='cd /usr/local/src'          : alias 예시
   export PS1="[\$USER@\$HOSTNAME:\$PWD]"  : 프롬프트 예시
   export JAVA_HOME=/usr/local/java/jdk    : path 설정 예시
   export PATH=$PATH:$JAVA_HOME/bin        : path 설정 예시

▶ 한글설정 
   사용자가 로그인하면 /etc/profile -> /home/userid/.profile 의 순서로 실행.
  /etc/profile 말고도 각 사용자 디렉토리의 .bash_profile 이나 .bashrc 에 등록하여도 무관.
  
▶프로파일 제설정
  리눅스 $source /etc/profile
  유닉스 $. /etc/profile

▶ tiem zone 관련
  설정파일 /etc/localtime
       Asia/Seoul
       
   yum install tzdata 설치하고    
   일단 profile
   
   export TZ=Asia/Seoul

ㅁ X-Window 설치 : 최소사양인경우

yum group list                             : 설치그룹목록 조회
    ==>설치그룹중 Server with GUI 가 없으면 미설치
yum groupinstall "Server with GUI"         : gui관련 설치 
systemctl set-default graphical            : 기본접속 guid설정

ㅁ 원격데스크탑 설치 및 설정

원격데스크탑 설치
yum install epel-release 
yum install xrdp tigervnc-server
     
 방화벽 설정
   firewall-cmd --permanent --zone=public --add-port=3389/tcp : 3389포트 추가
   firewall-cmd --reload  : 방화벽 재설정
   firewall-cmd --list-ports : 방화벽 포트리스트 조회
 서비스 등록
   systemctl enable xrdp.service : 서비스 등록
   systemctl start xrdp.service
   systemctl status xrdp.service

 참고 경로
   vi /etc/xrdp/xrdp.ini                      : xrdp 설정경로 

ㅁ RPM설치

설치패키지 확인
  rpm –qa | grep 설치파일명
  
패키지명 삭제 
  rpm -e 패키지명 옵션중 --nodeps 는 의존성까지 삭제 ex) rpm --nodeps -e 패키지명

ㅁ 압축관련 

▶ tar
  묶을 때 : tar cvf 파일명.tar 대상파일 or 대상디렉토리
  볼때: tar tvf 파일명.tar
  풀때: tar xvf 파일명.tar

ㅁ 기타명령어

▶ time설정
   rdate -s time.bora.net
▶ 64bit확인
   uname –a : 64bit인지 32bit인지 확인
▶ 라인번호
  :set number     set nonnumber
▶ 매뉴얼보기: 
   $man named.conf

▶ DNS설정확인 명령어
   $nslookup  [Enter] server 서버주소  [Enter] 검색주소
▶ 심볼릭
  $ln -s /var/named/chroot/var/named/named.rev /var/named/named.rev
  
▶ 부팅관련 명령어
   $reboot : rebooting
   $halt   : 종료
   
▶ root 권한으로 들어가기
   $sudo -i
   
▶ ls : 목록조회(가장많이 쓰는데 옵션이..)   

▶ echo $LANG : 변수LANG 출력
▶ cat 경로/파일 : 출력해줌

ㅁ기타설치

$yum install –y wget
$yum install telnet-server : 텔렛설치

ㅁ rpm 관련

$rpm -qa | grep xxxx : xxx설치확인

ㅁ yum 환경설정

$yum repolist : 
  /etc/yum.repos.d/ : yum update 경로
  
yum update [패키지명] : 패키지명 안쓰면 전체라는데..  
yum check-update     : 업데이트 패키지명조회
yum upgrade : 패키지정보 갱신

 

ㅁ 방화벽 관련

 

ㅁ 사용자관리

▶ 사용자관리
   $cat /etc/passwd : 사용자 list
   $cat /etc/group : 그룹 list
   
   

 

ㅁ 환경관리 예제

profile 설정

alias db2shell='docker exec -i -t db2 /bin/bash'
alias oracleshell='docker exec -i -t oracle-xe-11g /bin/bash'

 

 

'IT > 서버' 카테고리의 다른 글

[시놀로지 Nas] 도커 외부접속  (3) 2020.12.14
Docker 명령어 정리  (0) 2020.11.21

URL : http://eclipse.org/windowbuilder/  

도움말 -> Install New SoftWare 

    Name : m2e

    Location: http://download.eclipse.org/windowbuilder/WB/release/4.6/  

추가 화면 

 

설치화면

파일 -> 새로만들기 -> 기타 :: WindowBuilder 프로젝트 추가됨

빌드 도구(Build tool)

 - 빌드 도구란 프로젝트 생성, 테스트 빌드, 배포 등의 작업을 위한 전용 프로그램.
 - 빠른기간동안 계속해서 늘어나는 라이브러리 추가, 프로젝트를 진행하며 라이브러리의 버전 동기화의 어려움을 해소하고자 등장.
 - 초기의 java 빌드도구로 Ant를 많이 사용하였으나 최근 많은 빌드도구들이 생겨나 Maven이 많이 쓰였고, 현재는 Gradle이 많이 쓰인다.
(Ant는 스크립트 작성도 많고, 라이브러리 의존관리가 되지 않아 불편함)

2 Ant vs Maven

1. Ant는 비교적 자유도가 높은 편
    (Ant : 전처리 / 컴파일 / 패키징 / 테스팅 / 배포 가능)

2. Maven은 정해진 라이프사이클에 의하여 작업 수행하며, 전반적인 프로젝트 관리 기능까지 포함.
    (Build Tool + Project Management)

 

1) Maven 설치

   ㅁ Download : http://maven.apache.org/download.cgi

하단에 Files 에 해당 버전 Zip파일을 로칼 저장

   특정경로에 압축을 풀고  D:/DevPrograms/apache-maven.3.3.3

  ㅁ 윈도우 환경설정 하단 4가지 설정

      JAVA_HOME=C:\DevPrograms\Java\jdk1.8.0_40

      M2_HOME=D:\DevPrograms\apache-maven-3.3.3

      M2=%M2_HOME%\bin

      Path=;%M2%;%JAVA_HOME%\bin

고급 시스템설정 -> 환경설정

    ㅁ 설치확인 : 윈도우 커멘드에서 

          mvn --version

Maven 설치 확인

    ㅁ Repository 설정

        repository 폴더를 만들고 해당 폴더를 Maven설치에 conf dp settings.xml 에 추가 함

Settings.xml

       <localRepository>D:\DevPrograms\apache-maven-3.3.3\repository</localRepository>

 

2) 이클립스 설치

    ㅁ 이클립스 설치

    도움말->Install New SoftWare

       Name: m2e

       Location: http://download.eclipse.org/technology/m2e/releases  

설치경로 추가
설치파일 선택 및 설치

    ㅁ 이클립스 설정

        Window->Reference

Maven 설정

Add 

해당설치 경로 추가
추가된 환경설정 지정
Settings.xml 환경설정 파일 위치 지정

3) Maven 프로젝트 추가

    Maven 에서 가져오기 설정

   

신규프로젝트 선택
Group id 및 Artifact id 추가

추가후 pom.xml 편집하면 됨

repostitories : 저장소 위치

dependency : 모듈 명 및 버전

<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.dicws</groupId>
	<artifactId>maven</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>maven</name>
	<url>http://maven.apache.org</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<repositories>
		<repository>
			<id>oracle</id>
			<name>ORACLE JDBC Repository</name>
			<url>http://maven.jahia.org/maven2</url>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
			<scope>test</scope>
		</dependency>

		<!-- Oracle database driver -->
		<dependency>
			<groupId>com.oracle</groupId>
			<artifactId>ojdbc7</artifactId>
			<version>12.1.0.2</version>
		</dependency>

		<dependency>
			<groupId>com.oracle.database.jdbc</groupId>
			<artifactId>ojdbc6</artifactId>
			<version>11.2.0.4</version>
		</dependency>

		<!-- Mongo database driver -->
		<dependency>
			<groupId>org.mongodb</groupId>
			<artifactId>mongo-java-driver</artifactId>
			<version>3.12.7</version>
		</dependency>

		<!-- Mysql database driver -->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>8.0.22</version>
		</dependency>

		<!-- SQLLite database driver -->
		<dependency>
			<groupId>io.github.willena</groupId>
			<artifactId>sqlite-jdbc</artifactId>
			<version>3.33.0.1</version>
		</dependency>

	</dependencies>
</project>

+ Recent posts