0

検索してすべての言語を無効にし、デフォルトの言語を英語に設定しました。そのため、英語のみが利用可能です。しかし、jasig CAS でこれを行う可能性はないと思います。

そのため、jasig CAS ビルドの最終的な .war ファイルからすべての言語ファイルを削除しようとしています。

彼女は私の pom.xml ファイルです:

<modelVersion>4.0.0</modelVersion>
<groupId>lu.ion.cas</groupId>
<artifactId>cas-ion</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>cas-ion Maven Webapp</name>
<url>http://maven.apache.org</url>

<dependencies>
    <dependency>
        <groupId>org.jasig.cas</groupId>
        <artifactId>cas-server-webapp</artifactId>
        <version>${cas.version}</version>
        <type>war</type>
        <scope>runtime</scope>
    </dependency>

    <dependency>
        <groupId>org.jasig.cas</groupId>
        <artifactId>cas-server-support-ldap</artifactId>
        <version>${cas.version}</version>
        <type>jar</type>
        <scope>runtime</scope>
    </dependency>
</dependencies>

<properties>
    <cas.version>3.5.1</cas.version>
</properties>

<repositories>
    <repository>
        <id>ja-sig</id>
        <url>http://oss.sonatype.org/content/repositories/releases/</url>
    </repository>
</repositories>

<build>
    <plugins>
        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <warName>cas-ion</warName>
                <excludes>
                    <exclude>**/messages_*.properties</exclude>
                </excludes>
            </configuration>
        </plugin>
    </plugins>
</build>

これらのファイルを削除することになっている部分:

<excludes>
    <exclude>**/messages_*.properties</exclude>
</excludes>

しかし、それらのファイルはまだそこにあります。

4

2 に答える 2

2

ここで説明されている Maven War プラグイン オーバーレイを使用します: http://maven.apache.org/plugins/maven-war-plugin/overlays.html

この場合、pom は次のようになります。

<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
    <overlays>
        <overlay>
            <groupId>org.jasig.cas</groupId>
            <artifactId>cas-server-webapp</artifactId>
            <excludes>
                <exclude>WEB-INF/classes/messages_*.properties</exclude>        
            </excludes>
        </overlay>
    </overlays>
</configuration>

言語を含めたい場合は、次のような別のオーバーレイを追加します。

<overlay>                           
<groupId>org.jasig.cas</groupId>
<artifactId>cas-server-webapp</artifactId>                          
<includes>
    <include>WEB-INF/classes/messages_en.properties</include>                       
</includes>

于 2013-10-15T07:30:27.063 に答える
0

要素を使用webResourcesします。http://maven.apache.org/plugins/maven-war-plugin/faq.html#webresourcesexclude

<plugin>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.3</version>
  <configuration>
    <webResources>
      <resource>
        <directory>path_to_messages</directory>
        <excludes>
          <exclude>messages_*.properties</exclude>
        </excludes>
      </resource>
    </webResources>
  </configuration>
</plugin>
于 2012-10-19T11:25:08.847 に答える