Birt查看器为一个Maven项目的birt 4.3.1

时间:2014-02-25 10:25:27

标签: maven birt

嗨,我是birt和maven的新手。可以任何人帮我如何将birt查看器转换为需要在weblogic中部署的maven项目。任何建议或教程链接都将是一个很大的帮助。

先谢谢。

1 个答案:

答案 0 :(得分:1)

使用此文件夹结构创建并创建名为pom.xml的xml文件。 下载Birt运行时,您可以找到一个birtviewer示例(WebViewerExample)。

  .WebViewerExample(Root Folder)
     .src
        .main
            .webapp
                .WEB-INF
                    .lib
                    .web.xml
                    ..(other files)
                .new_report_1.rptdesign
                ...(other files)
    .pom.xml
    .target
    .weblogic-maven-plugin.jar  

下载BirtReportFramework并将名为'org.eclipse.birt.report.data.oda'的jar文件从birt-report-framework-4_3_1 \ eclipse \ plugins复制到WebViewerExample \ src \ main \ webapp \ WEB-INF \ lib中

在命令提示符下到达Root文件夹'WebViewerExample'并运行mvn clean install。 如果你因为丢失或无法下载任何jar文件而得到maven错误。不用担心..你在maven网站上谷歌jar位置并手动下载jar,真正的技巧是将jar放在maven存储库内的正确位置。 例如,如果错误类似于“[ERROR]无法执行目标org.apache.maven.plugins:maven-eclipse-plugin:2.9:eclipse”

转到Maven存储库,其路径类似于.m2 \ repository \ org \ apache \ maven \ plugins \ maven-eclipse-plugin \ 2.9

在2.9文件夹中放置maven-eclipse-plugin-2.9.jar和maven-eclipse-plugin-2.9.pom。 如果maven由于某些问题而无法为您提供,请尝试下载并放置相关的jar和pom。

我的pom.xml

   <?xml version="1.0" encoding="UTF-8"?>
  <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.webviewer</groupId>

     <artifactId>WebViewerExample</artifactId>
      <packaging>pom</packaging>
<name>Birt Viewer Maven Project</name>
   <version>0.0.1-SNAPSHOT</version>

 <properties>
      <jdk.version>1.6</jdk.version> 
      <logback.version>1.0.13</logback.version> 
      <junit.version>4.10</junit.version>
      <spring.version>3.0.5.RELEASE</spring.version> 
 </properties>

 <repositories>
                <repository>
                <releases>
                <enabled>false</enabled>
                </releases>
                <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
                </snapshots>
                <id>sonatype-nexus-snapshots</id>
                <name>Sonatype Nexus Snapshots</name>
  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </repository>

                    <repository>
                           <releases>
                              <enabled>true</enabled>
                           </releases>
                           <snapshots>
                              <enabled>false</enabled>
                              <updatePolicy>daily</updatePolicy>
                              <checksumPolicy>ignore</checksumPolicy>
                           </snapshots>
                           <id>sonatype-nexus-releases</id>
                           <name>Sonatype Nexus Snapshots</name>
                           <url>https://oss.sonatype.org/content/repositories/releases</url>
                        </repository>
 </repositories>

<dependencies>


        <dependency>
<groupId>org.eclipse.birt.runtime</groupId>
<artifactId>org.eclipse.birt.runtime</artifactId>
 <version>4.3.1.v20130918-1142</version>
<!--<version>4.3.1</version> -->
   </dependency>

  <dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>1.0</version>
    </dependency>
</dependencies>
     <build>

            <plugins>
                    <plugin>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <version>3.1</version>
                            <configuration>
                            <!-- <packagingIncludes>/*.rptdesign</packagingIncludes> 
                             <packagingIncludes>/*.jsp</packagingIncludes>
                             -->
                            <packagingExcludes>WEB-INF/lib/org.apache.xerces-2.9.0.jar</packagingExcludes>

                                    <source>1.6</source>
                                    <target>1.6</target>
                            </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.0</version>
                    </plugin>


                    <plugin>
                      <groupId>org.codehaus.mojo</groupId>
                      <artifactId>tomcat-maven-plugin</artifactId>
                        <version>1.1</version>
                      <configuration>
                        <url>http://localhost:8080/manager/text</url>
                        <server>Apache_Tomcat_7_x86</server>
                        <path>/birtviewer</path>
                      </configuration>
                    </plugin>

         </plugins>

</build>

谢谢, 风...