2016-07-25 5 views
1

OSGI (Jboss Fuse/Karaf) 환경에서 Jaspereports를 사용하려고했습니다.Jasperreports OSGI (fuse/karaf)

jaspereports 6.3.0의 OSGI 아티팩트를 찾을 수 없습니다. jar 파일을 감싸려고 할 때 itext와 같은 OSGI가 아닌 종속성에서 오류가 발생합니다.

OSGI 환경에서이 방법을 사용할 수 있습니까? 내가 OSGi 프레임 bunlde에 포장 한

답변

0

, 당신이 여기에서 찾을 수 있습니다

https://github.com/liveSense/org.liveSense.framework.jasperreports

그것은 이전 버전 (4.5.0)이지만, 일, 난 생산 시스템에 사용했습니다. 나는 퓨즈에 요구되는 모든 생각하지 않는다 -

<?xml version="1.0" encoding="ISO-8859-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/maven-v4_0_0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
<groupId>com.github.livesense</groupId> 
<artifactId>jasperreports</artifactId> 
<version>6.3.0</version> 

<packaging>bundle</packaging> 
<name>liveSense :: Framework :: Jasper reports</name> 
<description> 
    liveSense Jasper report framework 
</description> 

<build> 
    <plugins> 

     <plugin> 
      <groupId>org.apache.felix</groupId> 
      <artifactId>maven-bundle-plugin</artifactId> 
      <extensions>true</extensions> 
      <configuration> 
       <instructions> 
        <_exportcontents> 
         net.sf.jasperreports.*;version=6.3.0 
        </_exportcontents> 
        <Import-Package> 
         com.apple.mrj.*;resolution:=optional, 
         com.lowagie.toolbox.*;resolution:=optional, 
         javax.mail.*;resolution:=optional, 
         junit.*;resolution:=optional, 
         antlr.*;resolution:=optional, 
         bsh.*;resolution:=optional, 
         jxl.*;resolution:=optional, 
         mondrian.*;resolution:=optional, 
         net.sourceforge.barbecue.*;resolution:=optional, 
         com.adobe.xmp.*;resolution:=optional, 
         org.apache.batik.*;resolution:=optional, 
         org.apache.poi.*;resolution:=optional, 
         org.apache.lucene.*;resolution:=optional, 
         org.apache.tools.ant.*;resolution:=optional, 
         org.apache.velocity.*;resolution:=optional, 
         org.codehaus.jackson.*;resolution:=optional, 
         org.eclipse.jdt.*;resolution:=optional, 
         org.exolab.castor.*;resolution:=optional, 
         org.hibernate.*;resolution:=optional, 
         org.jaxen.*;resolution:=optional, 
         org.krysalis.barcode4j.*;resolution:=optional, 
         org.springframework.beans.factory.*;resolution:=optional, 
         org.springframework.core.io.*;resolution:=optional, 
         org.w3c.dom.svg.*;resolution:=optional, 
         org.apache.commons.javaflow.*;resolution:=optional, 
         org.mozilla.javascript.*;resolution:=optional, 
         com.google.zxing.*;resolution:=optional, 
         org.olap4j.*;resolution:=optional, 
         * 
        </Import-Package> 


        <!-- bundle supplied resource prefixes --> 
        <Include-Resource>{maven-resources}</Include-Resource> 

        <!-- Do not inline jars, include as jar files --> 
        <!-- There are config files with same name will be overwritten --> 
        <Embed-Dependency>*;scope=compile;inline=false</Embed-Dependency> 


       </instructions> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 
<dependencies> 

    <!-- Embedded dependencies --> 
    <dependency> 
     <groupId>net.sf.jasperreports</groupId> 
     <artifactId>jasperreports</artifactId> 
     <version>6.3.0</version> 
    </dependency> 
    <dependency> 
     <groupId>com.lowagie</groupId> 
     <artifactId>itext</artifactId> 
     <version>2.1.7</version> 
    </dependency> 
    <dependency> 
     <groupId>org.jfree</groupId> 
     <artifactId>jfreechart</artifactId> 
     <version>1.0.19</version> 
    </dependency> 
    <dependency> 
     <groupId>org.jfree</groupId> 
     <artifactId>jcommon</artifactId> 
     <version>1.0.23</version> 
    </dependency> 
</dependencies> 
</project> 

내가 (karaf 4.0.1 단위) folowing 번들을 사용했습니다 배포가 :

pom.xml 파일의 업데이트 된 버전은 다음과 같다 설치된 기능에 이러한 번들 중 일부가 포함되어 있기 때문입니다.

bundle:install -s mvn:commons-io/commons-io/1.4 
bundle:install -s mvn:commons-collections/commons-collections/3.2.1 
bundle:install -s mvn:commons-lang/commons-lang/2.6 
bundle:install -s mvn:commons-beanutils/commons-beanutils/1.8.3 
bundle:install -s mvn:commons-digester/commons-digester/2.1 
bundle:install -s mvn:commons-codec/commons-codec/1.6 
bundle:install -s mvn:commons-pool/commons-pool/1.5.6 
bundle:install -s mvn:commons-dbutils/commons-dbutils/1.3 
bundle:install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/1.3_2 
bundle:install -s mvn:org.apache.commons/commons-math/2.2 
bundle:install -s mvn:commons-dbcp/commons-dbcp/1.4 
bundle:install -s mvn:commons-fileupload/commons-fileupload/1.2.2 
bundle:install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/3.1_6 
bundle:install -s mvn:org.apache.httpcomponents/httpcore-osgi/4.4.5 
bundle:install -s mvn:org.apache.httpcomponents/httpclient-osgi/4.5.1 
bundle:install -s mvn:org.bouncycastle/bcprov-jdk16/1.46 
bundle:install -s mvn:org.bouncycastle/bcprov-ext-jdk16/1.46 
bundle:install -s mvn:org.bouncycastle/bctsp-jdk16/1.46 
bundle:install -s mvn:org.bouncycastle/bcmail-jdk16/1.46 
bundle:install -s mvn:org.codehaus.groovy/groovy-all/1.8.2 
bundle:install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan/2.7.1_6 
bundle:install -s mvn:com.ibm.icu/icu4j/49.1 
bundle:install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcel/5.2_4 
bundle:install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan/2.7.1_4