2
<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.dummy</groupId>
<artifactId>Dummy</artifactId>
<version>0.8.4</version>
<packaging>swc</packaging>
<name>Dummy</name>

<properties>
    <!--    the application name which must match the main mxml file
            and application descriptor file names -->
    <application.name>Dummy</application.name>
    <air.version>3.8</air.version>
    <flex.version>4.10.0.20130801</flex.version>
    <flexmojos.version>6.0.0</flexmojos.version>
    <source.path>sources</source.path>
    <dependency.path>dependencies</dependency.path>

    <!-- github server corresponds to entry in ~/.m2/settings.xml -->
    <github.global.server>github</github.global.server>
</properties>

<repositories>
    <repository>
        <id>maven_repo</id>
        <url>https://raw.github.com/Dummy/dummymaven_repo/master/</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
        </snapshots>
    </repository>
</repositories>

<build>
    <sourceDirectory>${source.path}</sourceDirectory>
    <plugins>
        <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-jgitflow-plugin</artifactId>
            <version>1.0-alpha20</version>
            <configuration>
                <!-- see goals wiki page for configuration options -->
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.7</version>
            <configuration>
                <altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
            </configuration>
        </plugin>
        <plugin>
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <version>0.8</version>
            <configuration>
                <message>Maven artifacts for ${project.name} ${project.version}</message>  <!-- git commit message -->
                <noJekyll>true</noJekyll>                                  <!-- disable webpage processing -->
                <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
                <branch>refs/heads/master</branch>                       <!-- remote branch name -->
                <includes><include>**/*</include></includes>
                <repositoryName>dummymaven_repo</repositoryName>      <!-- github repo name -->
                <repositoryOwner>dummy</repositoryOwner>    <!-- github username  -->
                <merge>true</merge>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>site</goal>
                    </goals>
                    <phase>deploy</phase>

                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>net.flexmojos.oss</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>6.0.0</version>
            <extensions>true</extensions>
            <dependencies>
                <dependency>
                    <groupId>org.sonatype.sisu.inject</groupId>
                    <artifactId>guice-bean-containers</artifactId>
                    <version>2.3.0</version>
                    <type>pom</type>
                </dependency>
                <dependency>
                    <groupId>com.adobe.flex</groupId>
                    <artifactId>compiler</artifactId>
                    <version>${flex.version}</version>
                    <type>pom</type>
                </dependency>
                <dependency>
                    <groupId>com.adobe.air</groupId>
                    <artifactId>compiler</artifactId>
                    <version>${air.version}</version>
                    <type>pom</type>
                </dependency>
                <dependency>
                    <groupId>com.adobe.air.compiler</groupId>
                    <artifactId>adt</artifactId>
                    <version>${air.version}</version>
                    <scope>compile</scope>
                </dependency>
            </dependencies>
            <configuration>
                <defineStatements>
                  <property>
                    <name>CONFIG::FLEXBolean</name>
                    <value>true</value>
                  </property>
                  <property>
                    <name>CONFIG::AS3Bolean</name>
                    <value>false</value>
                  </property>                         
                </defineStatements>
            </configuration>


        </plugin>
    </plugins>
</build>
<dependencies>
    <dependency>
        <groupId>com.adobe.air.framework</groupId>
        <artifactId>common-framework</artifactId>
        <version>${air.version}</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework.air</groupId>
        <artifactId>air-framework</artifactId>
        <version>${flex.version}</version>
        <type>pom</type>
    </dependency>
</dependencies>

我想添加一些编译器参数,例如定义( CONFIG:FLEX, true )。我已经尝试了很多组合,但没有成功。此外,我使用的是 flexmojos 6.0(not enaught docs),它与 4.0-RC2 不同。

谢谢

4

1 回答 1

0

好吧,我还没有使用此功能,但我有一些人使用以下符号成功地将它们与 FM 6.0.1(应该与 6.0.0 相同)一起使用:

        <configuration>

            ...

            <defines>
                <property>
                    <name>CONFIG::debugging</name>
                    <value>${flex.debug}</value>
                </property>
               <property>
                    <name>CONFIG::versionNumber</name>
                    <value>'${project.version}'</value>
                </property>
            </defines>
        </configuration>

我会试一试。所以诀窍是使用“defines”而不是“defineStatements”。

克里斯

于 2013-09-10T13:36:50.227 回答