Eclipse Decompiler Plug-in (JD-Eclipse)

카테고리 없음 2011. 7. 7. 16:29 Posted by coodnoob
개요
소스를 보고싶은데 ATTACH하라고 그럴 때, Maven 설치하고 Download sources 했는데 소스가 없을때
여하간 소스가 보고싶을 때 

환경
Eclipse Version 3.6, JDK 1.6, 윈도우XP

 http://java.decompiler.free.fr/?q=jdeclipse

위 주소로 가서 하라는대로 플러그인을 설치하면 클래스파일을 디컴파일해서 보여준다.



설정은 Line Number와 Metadata를 지정 해 서 볼 수 있다.
 

MySQL 5 - DUMP procedure, function

카테고리 없음 2011. 6. 20. 18:52 Posted by coodnoob
MySQL에서 기본적으로 DUMP를 하기 위해서는 mysqldump를 사용한다.
mysqldump [옵션] dbname > 백업할 파일이름

이렇게 하면 trigger는 백업이 되지만 stored procedure와 function은 백업이 되지 않는다.
  • –routines – FALSE by default
  • –triggers – TRUE by default'

procedure와 function 까지 모두 백업 하려면 다음과 같이 사용한다.

mysqldump --routines -u유저이름 -p패스워드 디비이름 > 백업할 파일이름

procedure function trigger만 백업하려면


mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt 데이터베이스이름 > 백업할 파일이름





사건 개요

새로운 마음으로 GWT플러그인을 업데이트 하고 저번 프로젝트소스를 받은 후에 컴파일을 했더니 

다음과 같이 새로운 오류가 나타났다.

Compiling module com.gxt.Gxt 
[ERROR] Errors in 'jar:file:/sdks/gxt-2.2.1/gxt.jar!/com/extjs/gxt/ui/client/data/BeanModelLookup.java' 
[ERROR] Internal compiler error java.lang.IncompatibleClassChangeError: 
Found interface com.google.gwt.core.ext.typeinfo.JClassType

GWT 2.2.0 으로 업데이트 되면서 BeanModelLookup.java가 추상클래스에서 인터페이스로 변경되었다.
GWT기반의 다른 라이브러리들이 예전 방식대로 사용하고 있으면 문제가 될 수 있다.


해결방안

다운그레이드를 하던가 GXT의 업그레이드를 기다리던가
(다운그레이드도 정확히 해야된다.)

구관이 명관

티스토리 페이스복 연동

카테고리 없음 2011. 2. 18. 10:08 Posted by coodnoob
티스토리에서 제공해주는 플러그인 중

Tistory2Facebook 플러그인을 사용



설정에서 계정을 연결하고

글을 쓰면 Facebook 담벼락에 글을 올릴 수 있다.

단. 글의 상태는 공개 + 발행 상태이여야 한다.

나머지(비공개, 보호, 공개 + 비발행)는 안 됩니다.


Maven POM

카테고리 없음 2011. 1. 19. 14:18 Posted by coodnoob
POM 이란

Project Object Model 로서 메이븐에서 사용하는 프로젝트 관리를 위한 모델이다.
보통 프로젝트의 루트에 pom.xml 파일에서 관리하는데 
여기서 관리하는 내용은 현재 기본적인 프로젝트의 정보, 빌드 세팅, 부가적인 프로젝트 정보, 환경 설정등이 있다.

1. 프로젝트의 기본 정보

<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>org.codehaus.mojo</groupId>  <artifactId>my-project</artifactId>  <version>1.0</version></project>

여기서는 현재 프로젝트에 대한 기본적인 정보들을 기술한다.

엘리먼트 소개
<groupId> : groupId는 일반적으로 유니크한 값을 사용한다. 이것의 이름은 레포지토리의 폴더에 영향을 미치게된다.
<artifactId> : artifactId는 프로젝트의 잘 알려진 이름을 적는다. groupId와 함께 프로젝트를 유니크하게 할 수 있는 값이다.
<version> : version은 현재 버전을 말하는데 groupId, artifactId와 함께 레포지토리의 디렉토리를 구축하는데 같이 쓰인다.
예를들면 로컬레포지터리에 groupId\artifactId\version 이런식으로 폴더가 구성된다. groupId에 . 가 들어가면 그 해당 앞뒤 단어도 각각 다른 폴더로 지정된다.
<packaging> : packaging은 현재 프로젝트의 배포할 타입 포맷을 지정한다. 디폴트는 jar이다.

2. 디펜던시 관리

<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"> ... <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.0</version> <type>jar</type> <scope>test</scope> <optional>true</optional> </dependency> ... </dependencies> ...</project>

groupId와 artifactId와 version은 위에서 설명한 내용과 같다.
<type> artifact의 패키지된 타입을 기술한다.
<scope> scope는 작업상태(compiling and runtime, testing, etc)의 클래스패스와 관련되어 있을 뿐만 아니라 디펜던시의 이행성을 얼마만큼 허용할 것인가를 관리한다.
  • compile - this is the default scope, used if none is specified. Compile dependencies are available in all classpaths. Furthermore, those dependencies are propagated to dependent projects.
  • provided - this is much like compile, but indicates you expect the JDK or a container to provide it at runtime. It is only available on the compilation and test classpath, and is not transitive.
  • runtime - this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath.
  • test - this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases.
  • system - this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository.

  • <exclusions> exclusions 엘리먼트는 해당 모듈을 제외할 때 사용된다.

    <dependencies>
        <dependency>      <groupId>org.apache.maven</groupId>      <artifactId>maven-embedder</artifactId>      <version>2.0</version>      <exclusions>
            <exclusion>          <groupId>org.apache.maven</groupId>          <artifactId>maven-core</artifactId>        </exclusion>
    </exclusions> </dependency>
    <Parent pom.xml>

    Inheritance
    메이븐은 상속기능을 제공한다.
    상속을 사용하기 위해서는 부모프로젝트의 packaging type은 pom이여야 한다.
    이 패키징 타입들은 라이프사이클의 한부분인 goals을 지정할 때 쓰인다. 예를 들어 패키징 타입이 jar면 패키징 단계의 goals은 jar:jar가 된다.
    패키징이 pom 이라면 site:attach-descriptor 가 된다.
    부모의 엘리먼트들은 자식 엘리먼트들이 상속한다.

    <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> <parent> <groupId>org.codehaus.mojo</groupId> <artifactId>my-parent</artifactId> <version>2.0</version> <relativePath>../my-parent</relativePath> </parent> <artifactId>my-project</artifactId></project>
    <child pom.xml>

    위와 같이 <parent> 엘리먼트를 이용하여 상속 할 대상을 정의할 수 있다.
    <relativePath> 엘리먼트는 필요하지는 않지만 현재 프로젝트의 부모 프로젝트의 경로를 처음으로 검색 할 때 이용된다. 그 다음에 로컬레포지토리와 원격 레포지토리를 
    검색한다.

    The Super POM

    OOP의 객체상속과 비슷하게, POM들은 parent의 값들을 상속을 이용하여 확장할 수 있다. 게다가 자바의 모든 오브젝트가 java.lang.Object 를 상속 하듯이, 모든 POM은
    Super POM을 기본적으로 상속한다.

    mvn help:effective-pom

    이렇게 타이핑 하면 SuperPom이 당신이 만든 프로젝트에서 암묵적으로 쓰인 부분을 확인 할 수 있다.
    프로젝트의 pom.xml파일이 있는 곳에서 해야한다.

    Aggregation(or Multi-Module)
    위와 같이 inherit을 이용하는 다른 모듈과의 관계를 aggregation으로 나타 낼 수 도 있다.
    <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>org.codehaus.mojo</groupId> <artifactId>my-parent</artifactId> <version>2.0</version> <packaging>pom</packaging> <modules> <module>my-project</module> <module>another-project</module> </modules></project>
    <최상위 pom.xml>
    이 때 패키징 엘리먼트 역시 pom이고
    <modules> 에서 관련된 하위 모듈을 기술한다.
    하위 모듈들에서는 상속에서와 마찬가지로 <parent> 엘리먼트를 이용하여 최상위 모듈을 지정 할 수 있다.

    3. Build Settings
    위에서 주어진 폼의 기본 뿐만 아니라 알 필요가 있는 엘리먼트 들이 더 있다.
    프로젝트의 디렉토리 구조를 선언하고 플러그인을 관리할 수 있는 build 엘리먼트와 reporting을 하기위한 reporting 엘리먼트이다.

    Build
    POM4.0.0 XSD에 의하면 <build> 엘리먼트는 개념적으로 두가지로 나뉜다. 하나는 <project> 밑에서 사용되는 거고 또 다른 하나는 <profiles> 밑에서 사용 하는 것이다.

    <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"> ... <!-- "Project Build" contains more elements than just the BaseBuild set --> <build>...</build> <profiles> <profile> <!-- "Profile Build" contains a subset of "Project Build"s elements --> <build>...</build> </profile> </profiles></project>

    BaseBuild Element Set
    BaseBuild 는 그 단어 뜻 그대로 <build> 엘리먼트 안에서 사용되는 기본적인 elements들이다.
    <build>  <defaultGoal>install</defaultGoal>  <directory>${basedir}/target</directory>  <finalName>${artifactId}-${version}</finalName>  <filters>    <filter>filters/filter1.properties</filter>  </filters>  ...</build>
    • defaultGoal: the default goal or phase to execute if none is given. If a goal is given, it should be defined as it is in the command line (such as jar:jar). The same goes for if a phase is defined (such as install).
    • directory: This is the directory where the build will dump its files or, in Maven parlance, the build's target. It aptly defaults to ${basedir}/target.
    • finalName: This is the name of the bundled project when it is finally built (sans the file extension, for example: my-project-1.0.jar). It defaults to ${artifactId}-${version}. The term "finalName" is kind of a misnomer, however, as plugins that build the bundled project have every right to ignore/modify this name (but they usually do not). For example, if the maven-jar-plugin is configured to give a jar a classifier of test, then the actual jar defined above will be built as my-project-1.0-test.jar.
    • filter: Defines *.properties files that contain a list of properties that apply to resources which accept their settings (covered below). In other words, the "name=value" pairs defined within the filter files replace ${name}strings within resources on build. The example above defines the filter1.properties file under the filter/ directory. Maven's default filter directory is ${basedir}/src/main/filters/.
    Resources
    build 엘리먼트의 다륵 특징은 프로젝트 내에 존재하는 리소스들을 명시 할 수 있다. 리소스는 소스코드가 아니라 컴파일 되지 않으면 다양한 이유로 프로젝트 내에 추가 되는
    그런 것들을 말한다.

    예를 들면 Plexus 프로젝트는 configuration.xml 파일을 필요로 하는데 META-INF/plexus 디렉토리의

    <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">
     
    <build> ... <resources> <resource> <targetPath>META-INF/plexus</targetPath> <filtering>false</filtering> <directory>${basedir}/src/main/plexus</directory> <includes> <include>configuration.xml</include> </includes> <excludes> <exclude>**/*.properties</exclude> </excludes> </resource> </resources> <testResources> ... </testResources> ... </build> </project>
    • resources: is a list of resource elements that each describe what and where to include files associated with this project.
    • targetPath: Specifies the directory structure to place the set of resources from a build. Target path defaults to the base directory. A commonly specified target path for resources that will be packaged in a JAR is META-INF.
    • filtering: is true or false, denoting if filtering is to be enabled for this resource. Note, that filter *.properties files do not have to be defined for filtering to occur - resources can also use properties that are by default defined in the POM (such as ${project.version}), passed into the command line using the "-D" flag (for example, "-Dname=value") or are explicitly defined by the properties element. Filter files were covered above.
    • directory: This element's value defines where the resources are to be found. The default directory for a build is ${basedir}/src/main/resources.
    • includes: A set of files patterns which specify the files to include as resources under that specified directory, using * as a wildcard.
    • excludes: The same structure as includes, but specifies which files to ignore. In conflicts between include and excludeexclude wins.
    • testResources: The testResources element block contains testResource elements. Their definitions are similar to resource elements, but are naturally used during test phases. The one difference is that the default (Super POM defined) test resource directory for a project is ${basedir}/src/test/resources. Test resources are not deployed.
    Plugins
    <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"> <build> ... <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.0</version> <extensions>false</extensions> <inherited>true</inherited> <configuration> <classifier>test</classifier> </configuration> <dependencies>...</dependencies> <executions>...</executions> </plugin> </plugins> </build> </project>

    Beyond the standard coordinate of groupId:artifactId:version, there are elements which configure the plugin or this builds interaction with it.

    • extensionstrue or false, whether or not to load extensions of this plugin. It is by default false. Extensions are covered later in this document.
    • inheritedtrue or false, whether or not this plugin configuration should apply to POMs which inherit from this one.
    • configuration: This is specific to the individual plugin. Without going too in depth into the mechanics of how plugins work, suffice it to say that whatever properties that the plugin Mojo may expect (these are getters and setters in the Java Mojo bean) can be specified here. In the above example, we are setting the classifier property to test in the maven-jar-plugin's Mojo. It may be good to note that all configuration elements, wherever they are within the POM, are intended to pass values to another underlying system, such as a plugin. In other words: values within a configuration element are never explicitly required by the POM schema, but a plugin goal has every right to require configuration values.
    • dependencies: Dependencies are seen a lot within the POM, and are an element under all plugins element blocks. The dependencies have the same structure and function as under that base build. The major difference in this case is that instead of applying as dependencies of the project, they now apply as dependencies of the plugin that they are under. The power of this is to alter the dependency list of a plugin, perhaps by removing an unused runtime dependency via exclusions, or by altering the version of a required dpendency. See above under Dependencies for more information.
    • executions: It is important to keep in mind that a plugin may have multiple goals. Each goal may have a separate configuration, possibly even binding a plugin's goal to a different phase altogether. executionsconfigure the execution of a plugin's goals.
    For example, suppose you wanted to bind the antrun:run goal to the verify phase. We want the task to echo the build directory, as well as avoid passing on this configuration to its children (assuming it is a parent) by setting inherited to false. You would get an execution like this:


    <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"> ... <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>echodir</id> <goals> <goal>run</goal> </goals> <phase>verify</phase> <inherited>false</inherited> <configuration> <tasks> <echo>Build Dir: ${project.build.directory}</echo> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>

    • id: Self explanatory. It specifies this execution block between all of the others. When the phase is run, it will be shown in the form: [plugin:goal execution: id]. In the case of this example: [antrun:run execution: echodir]
    • goals: Like all pluralized POM elements, this contains a list of singular elements. In this case, a list of plugin goals which are being specified by this execution block.
    • phase: This is the phase that the list of goals will execute in. This is a very powerful option, allowing one to bind any goal to any phase in the build lifecycle, altering the default behavior of Maven.
    • inherited: Like the inherited element above, setting this false will supress Maven from passing this execution onto its children. This element is only meaningful to parent POMs.
    • configuration: Same as above, but confines the configuration to this specific list of goals, rather than all goals under the plugin.

    4. Environment Settings

    결론 : The POM is the large, but bright, center.


    참고 한 사이트





























    메이븐 시작 - (5분 정복)

    카테고리 없음 2011. 1. 18. 13:35 Posted by coodnoob
    1.설치

    설치에 앞서 메이븐은 한마디로 빌드 프로세스 자동화 도구 입니다.

    메이븐은 자바 tool이라서 진행에 앞서 자바(JDK)가 설치되어 있어야합니다.

    일단 메이븐을 다운로드 받고 아래와 같은 절차를 따라 설치를 합니다.

    Windows 2000/XP

    1. Unzip the distribution archive, i.e. apache-maven-3.0.2-bin.zip to the directory you wish to install Maven 3.0.2. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectoryapache-maven-3.0.2 will be created from the archive.
    2. Add the M2_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the M2_HOME variable in the user variables with the value C:\Program Files\Apache Software Foundation\apache-maven-3.0.2. Be sure to omit any quotation marks around the path even if it contains spaces. Note: For Maven < 2.0.9, also be sure that the M2_HOME doesn't have a '\' as last character.
    3. In the same dialog, add the M2 environment variable in the user variables with the value %M2_HOME%\bin.
    4. Optional: In the same dialog, add the MAVEN_OPTS environment variable in the user variables to specify JVM properties, e.g. the value -Xms256m -Xmx512m. This environment variable can be used to supply extra options to Maven.
    5. In the same dialog, update/create the Path environment variable in the user variables and prepend the value %M2% to add Maven available in the command line.
    6. In the same dialog, make sure that JAVA_HOME exists in your user variables or in the system variables and it is set to the location of your JDK, e.g. C:\Program Files\Java\jdk1.5.0_02 and that %JAVA_HOME%\bin is in yourPath environment variable.
    7. Open a new command prompt (Winkey + R then type cmd) and run mvn --version to verify that it is correctly installed.

    Unix-based Operating Systems (Linux, Solaris and Mac OS X)

    1. Extract the distribution archive, i.e. apache-maven-3.0.2-bin.tar.gz to the directory you wish to install Maven 3.0.2. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.0.2will be created from the archive.
    2. In a command terminal, add the M2_HOME environment variable, e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-3.0.2.
    3. Add the M2 environment variable, e.g. export M2=$M2_HOME/bin.
    4. Optional: Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS="-Xms256m -Xmx512m". This environment variable can be used to supply extra options to Maven.
    5. Add M2 environment variable to your path, e.g. export PATH=$M2:$PATH.
    6. Make sure that JAVA_HOME is set to the location of your JDK, e.g. export JAVA_HOME=/usr/java/jdk1.5.0_02 and that $JAVA_HOME/bin is in your PATH environment variable.
    7. Run mvn --version to verify that it is correctly installed.
    설치가 끝나면

    mvn -version
    을 입력하여 설치 및 환경설정이 잘 되었나 확인합니다.


    네트워크 setup에 따라 부가적인 설정이 더 필요할 수 있습니다. 그럴 때는 Guide to configuration Maven을 참조하세요.

    2. 프로젝트 생성

    커맨드라인에 다음과 같은 메이븐 goal을 실행 하세요.
    mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
    여기서 잠깐
    메이븐은 mvn plugin:goal 이런 형태로 각각의 플러그인(이 플러그인은 메이븐 라이프사이클의 특정 부분들에 매핑되어있다.)에 따른  goal을 명시해 줌으로써 실행할 수 있다.
    위에서 archetype은 goal을 가지고 있는 plugin이고 generate는 archetype에서 실행 할 수 있는 goal들 중 하나이다.

    처음으로 run을 하게 되면 시간이 걸릴 수 있다. 왜냐하면 최신 artifacts들(plugin jars and other files)을 로컬레포지토리로 다운로드하기 때문이다.

    위와 같이 명령어를 실행하면 아래와 같은 형태의 디렉토리가 생성된다.
    my-app |-- pom.xml `-- src |-- main | `-- java | `-- com | `-- mycompany | `-- app | `-- App.java `-- test `-- java `-- com `-- mycompany `-- app `-- AppTest.java

    위에서는 maven-archetype-quickstart 를 이용하여 기본템플릿이 위와 같이 나왔다.

    pom.xml 파일이 메이븐에서 프로젝트설정의 핵심이다. 프로젝트를 원하는대로 빌드하는데 필요로하는 메인 정보들을 가진 하나의 설정 파일이다. POM은 매우 거대하고 이것의 복잡함으로 인해 지레 겁을먹을 수 있다. 하지만 지금 효과적으로 사용하기 위해 복잡성을 이해하는 것은 불필요하다.

    위에서 만든 프로젝트의 POM은 다음과 같다.

    <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.mycompany.app</groupId>
      <artifactId>my-app</artifactId>
      <packaging>jar</packaging>
      <version>1.0-SNAPSHOT</version>
      <name>Maven Quick Start Archetype</name>
      <url>http://maven.apache.org</url>
      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </project>

    여기서 
    gruopId는 프로젝트의 그룹 ID이고 일반적으로 패키지이름처럼 사용하는거 같다.
    artifactId는 artifact의 고유ID이다.
    vesrsion은 version개발 중일때는 SNAPSHOT을 붙여쓴다.
    packaging 은 패키징 타입(jar 같은)
    dependencies는 이 프로젝트에서 의존하는 다른 모듈을 정의한다
    하위 엘리먼트중에 나머지는 위와 같고 scope는 의존하는 범위를 설정한다. (ex: compile(디폴트), runtime(실행할때 필요 결국 배포할때 필요), provided(기본적으로 제공되는 모듈 배포시 제외), test(테스트시 필요 배포시 제외))


    3. Build the Project

    mvn package

    아까와는 달리 무언가 커맨드가 단순해진 것을 알 수 있다. 
    goal 을 없애고 phase를 사용하였는데 phase는 빌드 라이프 사이클의 한단계를 의미한다. (메이븐은 ANT와는 달리 자신만의 빌드라이프사이클이 존재한다.)
    결국 하나의 phase는 plugin이 디폴트로 매핑되어있어 실행한다.

    이렇게 실행을 하면
    1. validate
    2. generate-sources
    3. process-sources
    4. generate-resources
    5. process-resources
    6. compile
    위와 같은 빌드라이프 사이클을 순서대로 실행하고 마지막으로 jar 파일을 생성해준다.

    아래와 같이 커맨드를 입력하면 테스트 해 볼 수 있다.

    java -cp target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App
    

    결과:

    Hello World!

    4. Maven Phases

    메이븐의 라이프 사이클은 크게 세가지로 구성되어있다.
    default lifecycle, clean lifecycle, site lifecycle

    default lifecycle의 phase는 다음과 같다.은 다음과 같이 구성되어있다.
    • validate: 프로젝트가 오류가 없는지 필요한 정보가 사용가능한지 체크한다.
    • compile: 프로젝트의 소스코드를 컴파일한다.
    • test: 유닛테스트 프로엠워크를 이용하여 컴파일된 소스를 테스트한다. 
    • package: 컴파일된 코드를 가지고와서 배포될 포맷으로 패키징한다.
    • integration-test: 통합테스트가 가능한 환경으로 패키지를 배포한다.
    • verify: 패키지가 유효한지, 기준에 적합한지 검증한다.
    • install: 패키지를 로컬레포지토리에 인스톨한다.
    • deploy: 패키지를 원격레포지토리로 카피한다. 
    clean lifecycle은
    • clean:
      기존에 빌드된 산출물들을 제거한다.

    site lifecycle은
    • site:
      이 프로젝트를 위한 사이트 문서를 생성한다.

    알아두어야 할 점은 만약 package phase를 실행하였으면 디폴트 라이프 사이클 바인딩에 따라 기존phase들이 순차적으로 실행된다.


    참고 사이트 : 






    건강검진 결과 분석

    카테고리 없음 2011. 1. 17. 15:29 Posted by coodnoob
    AST = 4 
    ALT = 16


    HDL-콜레스테롤
    트리글리세라이드 -- 이건 중밀도 정도로 하면 되겠다.
    LDL - 콜레스테롤

    고밀도 지단백 콜레스테롤(HDL-Choresterol)정상수치 참고치
    남성 35~55 mg/dL| 여성 45~65 mg/dL
    저밀도 지단백 콜레스테롤(LDL-Choresterol)정상수치 참고치
    0~130 mg/dL
    소위 LDL-Choresterol은 몸에 나쁜 콜레스테롤, HDL-Choresterol은 몸에 좋은 콜레스테롤이라 불러진다.
    즉, LDL-Choresterol은 높을수록 HDL-Choresterol은 낮을수록 몸에 해로우므로 총 콜레스테롤 수치 및
    각 구성 성분의 수치를 확인해야 한다.

    HDL콜레스테롤의 증가를 위하여 육류보다는 생선류를, 특히 등푸른 생선류로 대체하시는 것이 좋을 것이며, 식물성 지방산의 섭취를 좀 더 늘려 주시는 것이 필요합니다.

    두부 등 콩식품과 땅콩, 호두, 잣 등 종실류에서 필수지방산의 함량이 높은데, 과체중을 방지하기 위하여 칼로리에 주의해서 섭취하셔야 합니다.



    AST(SGOT), ALT(SGPT)
    프롤로그
    세포는 라이프 사이클을 갖는다. 
    생성되고 성장하고 죽고...
    간세포도 마찬가지인데...

    간세포가 죽을때 세포막이 터지면서 그 안에 있던 내용물이 흘러나와 간내에 흐르는 혈액속으로 들어간다.
    이 때 효소도 같이 들어가는데 AST(GOT), ALT(GPT)도 포함된다. 
    이걸 수치화 한게 AST(GOT), ALT(GPT)이다.
    AST는 다른 장기에서도 나오지만 ALT는 대개 간에서만 나오기 때문에 이 수치가 더 중요하다.

    정상치: 
    AST(SGOT) 0-40
    ALT(SGPT) 0-35
     

    감마지티피

    감마GTP는 세포밖의 아미노산에 클루타미니1기를 결합시키는 효소로 아미노산을 세포내로 운송하는 작용을 합니다.

    알콜이나 약물로 인하여 간장애가 생기면 감마지티피가 대량 만들어져 혈중에 증가하게 되고 신장에 가장많이 함유되어 있고, 다음으로 췌장, 간, 비장, 소장에도 존재합니다.

    이것은 알콜에 의한 간장애의 지표가 되는 검사로 알려져 있습니다.

    정상치 :
    감마지티피 남:11~63, 여:8~35

    Spring Insight 소개 및 설치,사용

    good/Frameworks 2011. 1. 7. 13:57 Posted by coodnoob
    Spring Insight란 무엇인가?

    스프링 인사이트는 한마디로 웹어플리케이션용 모니터링 도구입니다. 

    스프링인사이트에서는 웹어플리케이션에서 일어나는 JDBC 쿼리를 직접 확인 할 수 있고, 스프링 빈의 상호작용, 외부 서비스 호출하는 과정을 상세히 볼 수 있습니다.


    Spring Insight 다운로드 및 설치


    Spring Insight를 설치하기 위해서는 우선 tc Server를 설치하고 insight template을 이용하여 tc Runtime instance를 생성하여야 합니다.
    tc Server의 종류에는 세가지가 있는데 각각 Developer Edition, Standard Edition, Spring Edition이 있습니다.
    tc Server는 Apache Tomcat 기반의 웹어플리케이션서버입니다. (다른점은 여기에 -> http://static.springsource.com/projects/tc-server/2.1/getting-started/html/ch03s02.html)

    그래서인지 Spring Insight는 다른 컨테이너를 지원하지 않습니다. (http://forum.springsource.org/showthread.php?t=89998

    각각에 대한 설명은 http://static.springsource.com/projects/tc-server/2.1/getting-started/html/ch03s03.html 이 곳을 참조하면 되겠습니다.

    각각의 에디션은 http://www.springsource.com/products/springsource-download-center 이 곳에서 다운받을 수 있습니다.

    012
    <다운로드 연속동작>

    원하는 에디션을 클릭하면 사용자 동의를 필요로 하는 입력양식 폼이 나타납니다. 
    양식폼을 채우고 라이센스에 동의하는 체크박스를 클릭하면 다운로드 할 수가 있습니다.

    이 문서에서는 Developer Edition을 다운로드 하였습니다. 
    이 문서를 작업한 컴퓨터의 환경
    OS : Window XP - SP3 , CPU : Core2 Duo T8100 , RAM : 2GH

    1)  다운로드 받은 springsource-tc-server-developer-2.1.X.RELEASE.zip 파일의 압축을 적당한 폴더에 풀고(여기서는 C:\home\tcserver\) 
    2) Command Prompt(명령 프롬프트)를 실행을 합니다.
    3) 좀전에 압축을 푼 디렉토리로 이동을 합니다.
    cd C:\home\tcserver\springsource-tc-server-developer

    4) insight 템플릿을 이용하여 insight instance를 생성합니다.
    tcruntime-instance.bat insight-instance -t insight

    5) 다음으로 위에서 설치된 tc Runtime instance를 윈도우 서비스로 install하고 시작합니다.
    tcruntime-ctl.bat insight-instance instaill
    tcruntime-ctl.bat insight-instance start


    에디션 마다 설치방법이 약간씩 다르기 때문에 http://static.springsource.com/projects/tc-server/2.1/getting-started/html/ch06s02.html#install-developer-edition 여기를 참조하면 참조씁니다.

    6) 설치가 완료되면 브라우저에서 http://localhost:8080/insight 주소를 입력하면 서비스가 실행 중인지 확인 할 수 있습니다. (포트는 insight-instance\conf 안의 server.xml에서 변경할 수 있습니다.)

    <Spring Insight>

    이것으로 설치가 완료 되었습니다.


    Spring Insight 테스트

    1) 이 URL을 참조하면 간단한 웹어플리케이션 생성 및 ANT를 이용한 배포까지 할 수 있습니다.

    2) 위 URL을 참조해서 만들어진 hello.war를 다음과 같이 insight-instance\webapps에 카피를 합니다.
    <hello.war 설치>

    3) 브라우저를 두개 실행시켜서 한쪽은 방금만든 웹어플리케이션(hello), 한쪽은 Spring Insight 어플리케이션 주소를 입력합니다.

    hello 웹어플리케이션에서 발생한 모든일 들을 Spring Insight가 실행되고 있는 웹브라우져에서 확인 할 수 있습니다.

    이렇게 하는 방법도 있고 STS(SpringSource Tool Suite)를 이용하는 방법도 있습니다. 

    사용된 예제와 참고한 사이트의 출처:

    Using Spring Insight

    Getting Started with tc Server

    스프링인사이트 소개 동영상





    'good > Frameworks' 카테고리의 다른 글

    ibatis 매핑시 삽질  (0) 2009.12.29
    AOP  (0) 2009.12.22
    IBATIS LIKE 쿼리 작성시  (0) 2009.12.08

    Twitter 연습

    카테고리 없음 2010. 8. 20. 11:36 Posted by coodnoob

    클래스 설계시 메모

    카테고리 없음 2010. 8. 20. 11:35 Posted by coodnoob
    접근성을 최소화하자
    public으로 사용할 것을 먼저 결정하고 나머지는 private으로