【问题标题】:How to refence Environment files in Maven based project for Tibco BW 6.x application如何在基于 Maven 的项目中为 Tibco BW 6.x 应用程序引用环境文件
【发布时间】:2018-06-13 10:54:01
【问题描述】:

我的 BW 6.x 应用程序有不同的基于环境的配置文件属性文件。项目是 mavenized,我需要在 POM.xml 中引用属性文件,我将如何实现这一点。

【问题讨论】:

    标签: maven properties pom.xml businessworks


    【解决方案1】:

    在MyAppModule/POM.xml 中尝试使用此代码:

    <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>
        <artifactId>MyAppModule</artifactId>
        <packaging>bwmodule</packaging>
        <name>MyAppModule</name>
        <description>MyAppModule</description>
    
        <parent>
            <groupId>com.exemple.tibco</groupId>
            <artifactId>MyAppModule.application.parent</artifactId>
            <version>1.0.0-SNAPSHOT</version>
            <relativePath>../MyAppModule.application.parent</relativePath>
        </parent>
    
        <build>
            <sourceDirectory>src</sourceDirectory>
            <outputDirectory>target/classes</outputDirectory>
            <plugins>
                <plugin>
                    <groupId>com.tibco.plugins</groupId>
                    <artifactId>bw6-maven-plugin</artifactId>
                    <extensions>true</extensions>
                </plugin>
            </plugins>
        </build>
    </project>
    

    在all.parent/POM.xml:

    <?xml version='1.0' encoding='UTF-8'?>
    <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://maven.apache.org/POM/4.0.0"
        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.exemple.tibco</groupId>
        <artifactId>all.parent</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>pom</packaging>
        <properties>
            <project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
            <skipTests>true</skipTests>
        </properties>
    
        <dependencyManagement>
            <dependencies>
    
                <dependency>
                    <groupId>com.tibco.plugins</groupId>
                    <artifactId>com.tibco.bw.palette.shared</artifactId>
                    <version>6.2.500.001</version>
                </dependency>
                <dependency>
                    <groupId>com.tibco.plugins</groupId>
                    <artifactId>com.tibco.bw.runtime</artifactId>
                    <version>6.3.500.002</version>
                </dependency>           
                <dependency>
                    <groupId>com.tibco.plugins</groupId>
                    <artifactId>org.genxdm.api</artifactId> 
                    <version>1.3.2</version>    
                </dependency>   
    
    
            </dependencies>
        </dependencyManagement>
    
        <build>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>com.tibco.plugins</groupId>
                        <artifactId>bw6-maven-plugin</artifactId>
                        <version>2.1.1</version>
                        <extensions>true</extensions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.8.0</version>
                        <configuration>
                            <source>1.8</source>
                            <target>1.8</target>
                        </configuration>
                    </plugin>
                </plugins>
            </pluginManagement> 
        </build>
    
    </project>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-23
      • 1970-01-01
      • 2019-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多