Flex + Maven(flexmojos) – プロジェクト作成(2)

2017年11月28日プログラミングFlex, maven

スポンサーリンク

flexmojos-archetypes-modular-webapp で生成したプロジェクト(Flex + Maven(flexmojos) – プロジェクト作成参照)の pom.xml には artifactId に不整合があるため修正する。この際、サブプロジェクトのフォルダ名も変更する。

サブプロジェクトのフォルダ名変更
flex-maven-sample/swc → sample/flex-maven-sample-lib
flex-maven-sample/swf → sample/flex-maven-sample-app
flex-maven-sample/war → sample/flex-maven-sample-war

image2

flex-maven-sample/pom.xml

<?xml version="1.0"?>
<!--

    Copyright 2008 Marvin Herman Froeder
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>jp.wd3</groupId>
  <artifactId>flex-maven-sample</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>
  
  <modules>
    <module>flex-maven-sample-lib</module>
    <module>flex-maven-sample-app</module>
    <module>flex-maven-sample-war</module>
  </modules>
</project>

flex-maven-sample/flex-maven-sample-lib/pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2008 Marvin Herman Froeder
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>

  <parent>
    <groupId>jp.wd3</groupId>
    <artifactId>flex-maven-sample</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

  <groupId>jp.wd3</groupId>
  <artifactId>flex-maven-sample-lib</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>swc</packaging>

  <name>Flex Maven Sample Library</name>

  <build>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <testSourceDirectory>src/test/flex</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <version>3.4-SNAPSHOT</version>
        <extensions>true</extensions>
        <configuration>
          <locales>
            <locale>en_US</locale>
          </locales>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <version>3.2.0.3958</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>com.adobe.flexunit</groupId>
      <artifactId>flexunit</artifactId>
      <version>0.85</version>
      <type>swc</type>
      <scope>test</scope>
      </dependency>
  </dependencies>

</project>

flex-maven-sample/flex-maven-sample-app/pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2008 Marvin Herman Froeder
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>

  <parent>
    <groupId>jp.wd3</groupId>
    <artifactId>flex-maven-sample</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

  <groupId>jp.wd3</groupId>
  <artifactId>flex-maven-sample-app</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>swf</packaging>
  <name>Flex Maven Sample Application</name>

  <build>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <testSourceDirectory>src/test/flex</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <version>3.4-SNAPSHOT</version>
        <extensions>true</extensions>
        <configuration>
          <locales>
            <locale>en_US</locale>
          </locales>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <version>3.2.0.3958</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>com.adobe.flexunit</groupId>
      <artifactId>flexunit</artifactId>
      <version>0.85</version>
      <type>swc</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jp.wd3</groupId>
      <artifactId>flex-maven-sample-lib</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>swc</type>
    </dependency>
  </dependencies>
</project>

flex-maven-sample/flex-maven-sample-war/pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2008 Marvin Herman Froeder
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>
  <parent>
    <artifactId>flex-maven-sample</artifactId>
    <groupId>jp.wd3</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  
  <groupId>jp.wd3</groupId>
  <artifactId>flex-maven-sample-war</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>war</packaging>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <version>3.4-SNAPSHOT</version>
        <executions>
          <execution>
            <goals>
              <goal>copy-flex-resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.1.17</version>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>jp.wd3</groupId>
      <artifactId>flex-maven-sample-app</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>swf</type>
    </dependency>
  </dependencies>

</project>

スポンサーリンク

2017年11月28日プログラミングFlex, maven