'Eclipse'에 해당되는 글 2건

  1. 2009.02.19 Maven
  2. 2009.02.16 Subversion 설치

Maven

|
Mavne 설치

1. Maven을 설치한다.
$>sudo apt-get install maven2

꾸러미 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다      
상태 정보를 읽는 중입니다... 완료
다음 꾸러미를 더 설치할 것입니다:
  ant ant-gcj ant-optional ant-optional-gcj antlr libantlr-java libantlr-java-gcj libbcel-java libclassworlds-java
  libcommons-cli-java libcommons-collections-java libcommons-httpclient-java libcommons-logging-java libcommons-net-java
  libcommons-openpgp-java libdoxia-java libganymed-ssh2-java libjdom0-java libjsch-java libjtidy-java liblogkit-java
  liboro-java libplexus-classworlds-java libplexus-component-api-java libplexus-container-default-java
  libplexus-interactivity-api-java libplexus-utils-java libplexus-velocity-java libregexp-java libservlet2.3-java
  libslide-webdavclient-java libwagon-java libwerken.xpath-java libxalan2-java libxalan2-java-gcj libxerces2-java
  libxerces2-java-gcj velocity
제안하는 꾸러미:
  ant-doc libbsf-java junit liblog4j1.2-java jython libjdepend-java libgnumail-java libxml-commons-resolver1.1-java javacc
  libbcel-java-doc libclassworlds-java-doc libcommons-httpclient-java-doc libavalon-framework-java
  libcommons-openpgp-java-doc libdoxia-java-doc libjtidy-java-doc libplexus-classworlds-java-doc
  libplexus-component-api-java-doc libplexus-container-default-java-doc libplexus-interactivity-api-java-doc
  libplexus-utils-java-doc libplexus-velocity-java-doc libwagon-java-doc libxalan2-java-doc libxsltc-java
  libxerces2-java-doc velocity-doc
다음 새 꾸러미를 설치할 것입니다:
  ant ant-gcj ant-optional ant-optional-gcj antlr libantlr-java libantlr-java-gcj libbcel-java libclassworlds-java
  libcommons-cli-java libcommons-collections-java libcommons-httpclient-java libcommons-logging-java libcommons-net-java
  libcommons-openpgp-java libdoxia-java libganymed-ssh2-java libjdom0-java libjsch-java libjtidy-java liblogkit-java
  liboro-java libplexus-classworlds-java libplexus-component-api-java libplexus-container-default-java
  libplexus-interactivity-api-java libplexus-utils-java libplexus-velocity-java libregexp-java libservlet2.3-java
  libslide-webdavclient-java libwagon-java libwerken.xpath-java libxalan2-java libxalan2-java-gcj libxerces2-java
  libxerces2-java-gcj maven2 velocity
0개 업그레이드, 39개 새로 설치, 0개 지우기 및 0개 업그레이드 안 함.
20.5M바이트 아카이브를 받아야 합니다.
이 작업 후 64.8M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까 [Y/n]?
'Yes'로 계속 진행하면, 관련 꾸러미까지 한꺼번에 설치된다.

설치 여부 확인
$> mvn -v

Maven version: 2.0.9
Java version: 1.6.0_0
OS name: "linux" version: "2.6.27-11-generic" arch: "i386" Family: "unix"

2. Maven Repository 설정
2.1 개인 설정
$>cd ~
$>ls -la '.m2'

만약 .m2 Directory가 없다면
$>mkdir '.m2'

settings.xml 화일 생성 (/etc/maven2 밑의 settings.xml을 복사하여 수정) : 붉은 부분을 추가
$>cp /etc/maven2/settings.xml ~/.m2/
$>vi ~/.m2/settings.xml

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user,
 |                 and is normally provided in $HOME/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the system property:
 |
 |                 -Dorg.apache.maven.user-settings=/path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all maven
 |                 users on a machine (assuming they're all using the same maven
 |                 installation). It's normally provided in
 |                 ${maven.home}/conf/settings.xml.
 |
 |                 NOTE: This location can be overridden with the system property:
 |
 |                 -Dorg.apache.maven.global-settings=/path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |-->
<settings>
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  <localRepository>위치시킬 Reposiory</localRepository>

  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->

  <!-- offline
   | Determines whether maven should attempt to connect to the network when executing a build.
   | This will have an effect on artifact downloads, artifact deployment, and others.
   |
   | Default: false
  <offline>false</offline>
  -->

  <!-- proxies
   | This is a list of proxies which can be used on this machine to connect to the network.
   | Unless otherwise specified (by system property or command-line switch), the first proxy
   | specification in this list marked as active will be used.
   |-->
  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxy.host.net</host>
      <port>80</port>
      <nonProxyHosts>local.net,some.host.com</nonProxyHosts>
    </proxy>
    -->
  </proxies>

  <!-- servers
   | This is a list of authentication profiles, keyed by the server-id used within the system.
   | Authentication profiles can be used whenever maven must make a connection to a remote server.
   |-->
  <servers>
    <!-- server
     | Specifies the authentication information to use when connecting to a particular server, identified by
     | a unique name within the system (referred to by the 'id' attribute below).
     |
     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
     |       used together.
     |
    <server>
      <id>deploymentRepo</id>
      <username>repouser</username>
      <password>repopwd</password>
    </server>
    -->
   
    <!-- Another sample, using keys to authenticate.
    <server>
      <id>siteServer</id>
      <privateKey>/path/to/private/key</privateKey>
      <passphrase>optional; leave empty if not used.</passphrase>
    </server>
    -->
  </servers>

  <!-- mirrors
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
   |
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
   | However, this repository may have problems with heavy traffic at times, so people have mirrored
   | it to several places.
   |
   | That repository definition will have a unique id, so we can create a mirror reference for that
   | repository, to be used as an alternate download site. The mirror site will be the preferred
   | server for that repository.
   |-->
  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
  </mirrors>
 
  <!-- profiles
   | This is a list of profiles which can be activated in a variety of ways, and which can modify
   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
   | specific paths and repository locations which allow the build to work in the local environment.
   |
   | For example, if you have an integration testing plugin - like cactus - that needs to know where
   | your Tomcat instance is installed, you can provide a variable here such that the variable is
   | dereferenced during the build process to configure the cactus plugin.
   |
   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
   | section of this document (settings.xml) - will be discussed later. Another way essentially
   | relies on the detection of a system property, either matching a particular value for the property,
   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
   | Finally, the list of active profiles can be specified directly from the command line.
   |
   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
   |       repositories, plugin repositories, and free-form properties to be used as configuration
   |       variables for plugins in the POM.
   |
   |-->
  <profiles>
    <!-- profile
     | Specifies a set of introductions to the build process, to be activated using one or more of the
     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
     | or the command line, profiles have to have an ID that is unique.
     |
     | An encouraged best practice for profile identification is to use a consistent naming convention
     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
     | This will make it more intuitive to understand what the set of introduced profiles is attempting
     | to accomplish, particularly when you only have a list of profile id's for debug.
     |
     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
    <profile>
      <id>jdk-1.4</id>

      <activation>
        <jdk>1.4</jdk>
      </activation>

      <repositories>
        <repository>
      <id>jdk14</id>
      <name>Repository for JDK 1.4 builds</name>
      <url>http://www.myhost.com/maven/jdk14</url>
      <layout>default</layout>
      <snapshotPolicy>always</snapshotPolicy>
    </repository>
      </repositories>
    </profile>
    -->

    <!--
     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
     | might hypothetically look like:
     |
     | ...
     | <plugin>
     |   <groupId>org.myco.myplugins</groupId>
     |   <artifactId>myplugin</artifactId>
     |  
     |   <configuration>
     |     <tomcatLocation>${tomcatPath}</tomcatLocation>
     |   </configuration>
     | </plugin>
     | ...
     |
     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
     |       anything, you could just leave off the <value/> inside the activation-property.
     |
    <profile>
      <id>env-dev</id>

      <activation>
        <property>
      <name>target-env</name>
      <value>dev</value>
    </property>
      </activation>

      <properties>
        <tomcatPath>/path/to/tomcat/instance</tomcatPath>
      </properties>
    </profile>
    -->
  </profiles>

  <!-- activeProfiles
   | List of profiles that are active for all builds.
   |
  <activeProfiles>
    <activeProfile>alwaysActiveProfile</activeProfile>
    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
  </activeProfiles>
  -->
</settings>

설치 완료



Eclipse Plug In 설치 ( http://m2eclipse.codehaus.org/ )

인스톨을 실행

이상과 같이 진행 후 Maven을 이용하여 프로젝트를 진행한다.

Maven Repository 추가
http://docs.codehaus.org/display/M2ECLIPSE/Maven+Indexes+view


Trackback 0 And Comment 0

Subversion 설치

|
Ubuntu에서 Subversion 설치 및 svn protocol 이용

1. Subversion을 설치한다.
$>sudo apt-get install subversion

2. svn 그룹 생성
$>sudo addgroup svn

3. svn 그룹에 사용할 계정 연결
$>sudo adduser 계정명 svn

4. 저장소 생성
$>sudo mkdir /home/svn

5. 관리할 repository 생성 및 권한 설정
$>sudo svnadmin create --fs-type fsfs 레파지토리명

$>sudo chown -R 계정명:svn /home/svn/레파지토리명
$>sudo chmod -R g+ws /home/svn/레파지토리명

6. configure 화일 수정
$>vim /home/svn/레파지토리명/conf/svnserve.conf

### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)

### Visit http://subversion.tigris.org/ for more information.

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file.  If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
realm = 레파지토리명's Repository

[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256

7. 패스워드 설정
$>vim /home/svn/프로젝트명/conf/passwd

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
# harry = harryssecret
# sally = sallyssecret
사용자명 = 패스워드

8. 실행
$>sudo svnserve -d -r /home/svn

9. Service로 등록하기

9.1 Script 화일 생성
$>cd /etc/init.d/
$>sudo touch svnserve
$>sudo vi svnserve

# Start SVN
svnserve -d -r /home/svn

9.2 Script 화일 속성 변경
$>sudo chmod +x svnserve

9.3 Boot Sequence에 Script 추가
$>sudo update-rc.d svnserve defaults
결과
Adding system startup for /etc/init.d/svnserve ...
/etc/rc0.d/K20svnserve -> ../init.d/svnserve
/etc/rc1.d/K20svnserve -> ../init.d/svnserve
/etc/rc6.d/K20svnserve -> ../init.d/svnserve
/etc/rc2.d/S20svnserve -> ../init.d/svnserve
/etc/rc3.d/S20svnserve -> ../init.d/svnserve
/etc/rc4.d/S20svnserve -> ../init.d/svnserve
/etc/rc5.d/S20svnserve -> ../init.d/svnserve

참고 사이트 : http://www.pyrasis.com/main/Subversion-HOWTO

etc. Eclise Subversion Plug-in 추가 ('가' 혹은 '나'를 선택)
가. Subclipse
나. Subversive

※ 참고. 윈도우 환경이라면 '나'를 선택, Linux 환경이라면 '가'를 선택하여 사용 중입니다.

Trackback 0 And Comment 0
prev | 1 | next