2011-07-28 8 views
2

JBoss (특히 5.1.0.GA)에 의존하는 프로젝트가 있으며 SBT를 사용하여이 프로젝트를 설정하려고합니다. 내가 궁금해 한 것은 "이 프로젝트는 JBoss 버전 X 및 그와 관련된 모든 것에 의존합니다"라고하는 방법이 있는지 또는 모든 개별 종속성을 개별적으로 선언했는지 여부입니다. 희망은 SBT가 프로젝트를 컴파일하는 데 필요한 모든 적절한 종속성을 다운로드한다는 것입니다.SBT에서 jboss에 대한 의존성을 어떻게 선언합니까?

저는 의존 관계 관리에 대해 매우 익숙하므로 어떤 방향으로도 감사하겠습니다. 나는 아이비를 사용하는 SBT를 사용하여 이것을하려하지만, maven의 예제도 환영한다.

답변

2

모든 종속성을 수동으로 선언해야하며 모든 종속성을 포함하는 수퍼 pom은 없습니다.

일부 경우에는 정확히 무엇이 필요한지 알아 내기가 쉽지 않으므로 대부분 매우 까다 롭습니다.

좋은 시작은 jboss_home/lib 아래에있는 모든 lib를 가져 와서 거기에서 줄이기 시작하는 것입니다.

자신 만의 저장소 프록시 (예 : artifactory 또는 archiva)가있는 경우 이러한 수퍼 팩을 만들 수 있습니다.

이것은 내 저장소에서 가져온 것으로, 시작하는 데 도움이 될 수 있습니다. 그러나 이것은 공식적인 것이 아니며 나의 필요에 적합합니다.

<?xml version="1.0" encoding="ISO-8859-1"?> 
<?xml-stylesheet type="text/xsl" href="http://www.jayasoft.fr/org/ivyrep/ivy-doc.xsl"?> 
<ivy-module version="1.0"> 
    <info 
     organisation="jboss" 
     module="jboss" 
     revision="5.1.0" 
     status="release" 
     publication="20110801120000"/> 
    <configurations> 
      <conf name="compile" visibility="public" /> 
      <conf name="client" visibility="public" extends="compile,mail,activation, aop"/> 
      <conf name="server" visibility="public" extends="compile,servlet,jmx"/> 
      <conf name="hibernate" visibility="public" /> 
      <conf name="activation" visibility="public" /> 
      <conf name="mail" visibility="public" /> 
      <conf name="servlet" visibility="public" /> 
      <conf name="jmx" visibility="public" /> 
        <conf name="jmx-client" visibility="public" extends="client,jmx"/> 
      <conf name="aop" visibility="public" /> 
      <conf name="javaee" visibility="public" /> 
      <conf name="ant" visibility="public" /> 
     <conf name="logging" visibility="public" /> 
    </configurations> 
    <publications> 
    <!-- from jbossall-client readme.txt --> 
      <artifact name="commons-logging"  type="jar" conf="client"/> 
     <artifact name="concurrent"  type="jar" conf="client"/> 
     <artifact name="ejb3-persistence"  type="jar" conf="client"/> 
     <artifact name="jboss-aop-client"  type="jar" conf="client"/> 
     <artifact name="jboss-appclient"  type="jar" conf="client"/> 
     <artifact name="jboss-aspect-jdk50-client"  type="jar" conf="client"/> 
     <artifact name="jboss-client"  type="jar" conf="client,ant"/> 
     <artifact name="jboss-common-core"  type="jar" conf="client,ant"/> 
     <artifact name="jboss-ejb3-common-client"  type="jar" conf="client"/> 
     <artifact name="jboss-ejb3-core-client"  type="jar" conf="client"/> 
     <artifact name="jboss-ejb3-proxy-impl-client"  type="jar" conf="client"/> 
     <artifact name="jboss-ejb3-proxy-spi-client"  type="jar" conf="client"/> 
     <artifact name="jboss-ejb3-security-client"  type="jar" conf="client"/> 
     <artifact name="jboss-j2se"  type="jar" conf="client"/> 
     <artifact name="jboss-javaee"  type="jar" conf="client,javaee,ant"/> 
     <artifact name="jboss-logging-log4j"  type="jar" conf="client"/> 
     <artifact name="jboss-logging-spi"  type="jar" conf="client,ant"/> 
     <artifact name="jboss-messaging-client"  type="jar" conf="client"/> 
     <artifact name="jboss-remoting"  type="jar" conf="client"/> 
     <artifact name="jboss-security-spi"  type="jar" conf="client,ant"/> 
     <artifact name="jboss-serialization"  type="jar" conf="client,ant"/> 
     <artifact name="jboss-system-client"  type="jar" conf="client"/> 
     <artifact name="jboss-system-jmx-client"  type="jar" conf="client"/> 
     <artifact name="jbosssx-as-client"  type="jar" conf="client,ant"/> 
     <artifact name="jbosssx-client"  type="jar" conf="client,ant"/> 
     <artifact name="jmx-client"  type="jar" conf="client,ant"/> 
     <artifact name="jnp-client"  type="jar" conf="client"/> 
     <artifact name="jboss-mdr"  type="jar" conf="client"/> 
     <!--END from jbossall-client readme.txt --> 
     <!-- additional client-libs --> 
     <artifact name="jbosscache-core"  type="jar" conf="client"/> 
     <artifact name="trove"  type="jar" conf="client"/> 
     <artifact name="javassist"  type="jar" conf="client,hibernate"/> 
     <!-- END additional client-libs --> 
     <artifact name="activation"   type="jar" conf="activation"/> 
     <artifact name="mail"    type="jar" conf="mail"/> 
     <artifact name="jboss-javaee"  type="jar" conf="compile"/> 
     <artifact name="jboss-j2se"   type="jar" conf="compile"/> 
     <artifact name="jboss-system-jmx"  type="jar" conf="compile,jmx"/> 
     <artifact name="jbosscache-core"  type="jar" conf="compile"/> 
     <artifact name="jboss-remoting"   type="jar" conf="compile,ant"/> 
     <artifact name="jboss-kernel"  type="jar" conf="compile"/> 
     <artifact name="jboss-logging-spi"  type="jar" conf="compile, logging"/> 
     <artifact name="jboss-security-spi"   type="jar" conf="compile"/> 
     <artifact name="jboss-ejb3-ext-api"   type="jar" conf="server"/> 
     <artifact name="jboss-ejb3-core"  type="jar" conf="server"/> 
     <artifact name="jboss-integration"  type="jar" conf="compile,ant"/> 
     <artifact name="ejb3-persistence" type="jar" conf="hibernate"/> 
     <artifact name="hibernate-core"   type="jar" conf="hibernate"/> 
     <artifact name="hibernate-entitymanager" type="jar" conf="hibernate"/> 
     <artifact name="hibernate-annotations" type="jar" conf="hibernate"/> 
     <artifact name="hibernate-commons-annotations" type="jar" conf="hibernate"/> 
     <artifact name="jboss-system-client" type="jar" conf="server"/> 
     <artifact name="servlet-api"  type="jar" conf="servlet"/> 
     <artifact name="jbosssx"   type="jar" conf="server"/> 
     <artifact name="jmx-invoker-adaptor-client"  type="jar" conf="server,jmx,ant"/> 
     <artifact name="antlr" type="jar" conf="hibernate"/>  
     <artifact name="slf4j-api" type="jar" conf="server, logging"/> 
     <artifact name="slf4j-jboss-logging" type="jar" conf="server, logging"/> 
     <artifact name="jboss-aop-client" type="jar" conf="aop"/> 
     <artifact name="jbossjmx-ant" type="jar" conf="ant"/> 
    </publications> 
</ivy-module> 
관련 문제