How to

쉽게 따라할 수 있는 예제입니다.

Example List

  1. sample : "Hello Glue!!!"
    (download sample.zip)

  2. sample-parent : maven project 입니다.
    (download sample-parent.zip)

    1. sample-hello : jar
      - Service : hello-service

    2. sample-hello-jdbc : jar
      - Service : sample01-service, sample02-service, sample03-service, sample04-service
      - Bean : com.poscoict.glueframework.dao.jdbc.GlueJdbcDao
      - Activity : Jdbc Search, Jdbc Insert, Jdbc Delete, Jdbc Modify
      - ETC : glue_sql

    3. sample-hello-mybatis : jar
      - Service : sample11-service, sample12-service
      - Bean : com.poscoict.glueframework.dao.mybatis.GlueMybatisDao
      - Activity : Mybatis Search, Mybatis Insert, Mybatis Delete, Mybatis Modify
      - ETC : emp.xml

    4. sample-hello-hibernate : jar
      - Service : sample21-service, sample22-service
      - Bean : com.poscoict.glueframework.dao.hibernate.GlueHibernateDao
      - Activity : Hibernate Hql Search, Hibernate Hql Delete, Hibernate Hql Modify, Hibernate Entity Create, Hibernate Entity Modify, Hibernate Entity Remove
      - ETC : glue_sql, scott.hbm.xml

    5. sample-hello-ehcache : war
      - Service : hello-cache-service
      - Bean : com.poscoict.glueframework.cache.ehcache.GlueEhCacheManager

    6. sample-hello-jcs : war

    7. sample-hello-msg-xml : jar

    8. sample-hello-msg-db : jar

    9. sample-hello-logback : jar

    10. sample-hello-log4j : jar

    11. sample-hello-exception : jar

    12. sample-hello-springmvc : war

    13. sample-hello-gnt : war

    14. sample-hello-ucube3 : jar

    15. sample-hello-ucube4 : jar

Setup Maven

  1. download maven

  2. unzip maven

  3. local repository 구성 : 아래 2가지중 선택할 수 있습니다.

    • mvn install:install-file 실행
      cd C:\apache-maven-3.2.2\bin
      set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_45
      set M2_HOME=C:\apache-maven-3.2.2
      set M2=%M2_HOME%\bin
      
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\license-api-1.1.0.jar -DgroupId=com.poscoict.license -DartifactId=license-api -Dversion=1.1.0 -Dpackaging=jar
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\glue-schema-4.2.3-RELEASE.jar -DgroupId=com.poscoict -DartifactId=glue-schema -Dversion=4.2.3-RELEASE -Dpackaging=jar -DgeneratePom=true
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\glue-core-4.2.3-RELEASE.jar -DgroupId=com.poscoict -DartifactId=glue-core -Dversion=4.2.3-RELEASE -Dpackaging=jar -DgeneratePom=true
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\glue-mybatis-4.2.3-RELEASE.jar -DgroupId=com.poscoict -DartifactId=glue-mybatis -Dversion=4.2.3-RELEASE -Dpackaging=jar -DgeneratePom=true
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\glue-hibernate-4.2.3-RELEASE.jar -DgroupId=com.poscoict -DartifactId=glue-hibernate -Dversion=4.2.3-RELEASE -Dpackaging=jar -DgeneratePom=true
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\glue-schedule-4.2.3-RELEASE.jar -DgroupId=com.poscoict -DartifactId=glue-schedule -Dversion=4.2.3-RELEASE -Dpackaging=jar -DgeneratePom=true
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\glue-ws-4.2.3-RELEASE.jar -DgroupId=com.poscoict -DartifactId=glue-ws -Dversion=4.2.3-RELEASE -Dpackaging=jar -DgeneratePom=true
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\glue-tester-4.2.3-RELEASE.jar -DgroupId=com.poscoict -DartifactId=glue-tester -Dversion=4.2.3-RELEASE -Dpackaging=jar -DgeneratePom=true
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\glue-mongodb-4.2.3-RELEASE.jar -DgroupId=com.poscoict -DartifactId=glue-mongodb -Dversion=4.2.3-RELEASE -Dpackaging=jar -DgeneratePom=true
      mvn install:install-file -Dfile=C:\eclipse\users\GlueSDK\lib\gluelib\glue-redis-4.2.3-RELEASE.jar -DgroupId=com.poscoict -DartifactId=glue-redis -Dversion=4.2.3-RELEASE -Dpackaging=jar -DgeneratePom=true
      
    • 예제 project의 pom.xml 에 repository 추가
      url(C:/eclipse/users/GlueSDK/repo/)로 지정된 위치는 GlueSDK_HOME/repo 의 절대경로이며, 하위 directory는 groupId, artifactId, version 정보를 포함합니다. .
      <project . . .>
          . . .
          <repositories>
             <repository>
                 <id>repo</id>
                 <name>repo</name>
                 <url>file://C:/eclipse/users/GlueSDK/repo</url>
             </repository>
          </repositories>
          . . .
      </project>
      <!--  
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-core/4.2.3-RELEASE/glue-core-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-hibernate/4.2.3-RELEASE/glue-hibernate-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-mongodb/4.2.3-RELEASE/glue-mongodb-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-mybatis/4.2.3-RELEASE/glue-mybatis-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-redis/4.2.3-RELEASE/glue-redis-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-schedule/4.2.3-RELEASE/glue-schedule-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-schema/4.2.3-RELEASE/glue-schema-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-tester/4.2.3-RELEASE/glue-tester-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-ucube/4.2.3-RELEASE/glue-ucube-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-ws/4.2.3-RELEASE/glue-ws-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-xplatform/4.2.3-RELEASE/glue-xplatform-4.2.3-RELEASE.jar
      C:/eclipse/users/GlueSDK/repo/com/poscoict/license/license-api/1.1.0/license-api-1.1.0.jar
      -->
      

    또는 다음과 같이 예제 proejct의 pom.xml 에 systemPath를 사용할 수도 있습니다.

    <project . . .>
        . . .
        <dependencies>
            <dependency>
                <groupId>com.poscoict</groupId>
                <artifactId>glue-core</artifactId>
                <version>4.2.3-RELEASE</version>
                <scope>system</scope>
                <systemPath>C:/eclipse/users/GlueSDK/repo/com/poscoict/glue-core/4.2.3-RELEASE/glue-core-4.2.3-RELEASE.jar</systemPath>
            </dependency>
        </dependencies>
        . . .
    </project>