flexmojos - copy-flex-resources из rsls не работает - PullRequest
0 голосов
/ 17 августа 2011

Я пытаюсь скопировать зависимые rsls в войну, используя плагин copy-flex-resources.Однако я получаю следующую ошибку:

[ОШИБКА] Не удалось выполнить цель org.sonatype.flexmojos: flexmojos-maven- plugin: 3.8: copy-flex-resources (copy-flex-resources) в проектеsmh: Не удалось найти com.adobe.flex.fram textLayout: swz: 4.1.0.16076 в https://repository.sonatype.org/content/groups/flexgroup, который был кэширован в локальном репозитории, разрешение не будет предприниматься повторно, пока не истечет значение val обновления sonatype-flex-repositoryили принудительное обновление ............ [ОШИБКА] Затем установите его с помощью команды: [ОШИБКА] mvn install: install-file -DgroupId = com.adobe.flex.framework - DartifactId = textLayout-Dversion = 4.1.0.16076 -Dpackaging = swz -Dfile = / path / to / file

Я уже прошел по ссылкам http://groups.google.com/group/flex-mojos/browse_thread/thread/6f47b2980275aaeb http://groups.google.com/group/flex-mojos/browse_thread/thread/2aa96d8d69e1ddb5 https://repository.sonatype.org/content/sites/maven-sites/flexmojos/3.8/copy-flex-resources-mojo.html

Я следовал за списком poms, как указано в https://docs.sonatype.org/pages/viewpage.action?pageId=7045277

, чтобы решить вышеупомянутую проблему, я установил файл swz в локальный репозиторий, используя mvn install: install-file -DgroupId = com.adobe.flex.framework - DartifactId = textLayout -Dversion = 4.1.0.16076 -Dpackaging = swz - Dfile= textLayout_1.1.0.604.swz (Побочным эффектом этого было то, что это переписало существующий конфиг pom в репозитории)

, а затем запустил mvn compile.Я получил следующую ошибку

[ОШИБКА] Не удалось выполнить цель org.sonatype.flexmojos: flexmojos-maven- plugin: 3.8: copy-flex-resources (copy-flex-resources) в проекте smh: Не удалосьcopy C: \ Users \ bharadke.m2 \ repository \ com \ adobe \ flex \ framework \ textLayout \ 4.1.0.16076 \ textLayout-4.1.0.16076.swz: неверный синтаксис имени файла, имени каталога или метки тома -> [Справка1]

Ниже приведены мои фрагменты pom.xml 1. flex project pom:

           <build>
                   <sourceDirectory>src/main/flex</sourceDirectory>
                   <testSourceDirectory>src/test/flex</testSourceDirectory>
                   <plugins>
                           <plugin>
                                   <groupId>org.sonatype.flexmojos</groupId>
                                   <artifactId>flexmojos-maven-plugin</artifactId>
                                   <version>${flex-mojos-plugin.version}</version>
                                   <extensions>true</extensions>
                                   <executions>
                                   </executions>
                                   <dependencies>
                                           <dependency>
                                                   <groupId>com.adobe.flex</groupId>
                                                   <artifactId>compiler</artifactId>
                                                   <version>${flex.sdk.version}</version>
                                                   <type>pom</type>
                                           </dependency>
                                   </dependencies>
                   <configuration>
                   <policyFileUrls>
           <url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
           <url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
           </policyFileUrls>

             <rslUrls>
               <url>http://fpdownload.adobe.com/pub/swz/flex/$
    {flex.sdk.version}/{artifactId}_{version}.{extension}</url>
               <url>http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/
    {artifactId}_1.1.0.604.{extension}</url>
             </rslUrls>
                                   <keepAllTypeSelectors>true</keepAllTypeSelectors>
                   <contextRoot>/abc</contextRoot>
                    </configuration>
                           </plugin>
                   </plugins>
           </build>
    <dependencies>
    <!-- Dynamically load the Adobe signed RSL framework instead of merging into SWF. -->
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>textLayout</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
  </dependency>
    <!-- OSMF SWC would go here. -->
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>framework</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>spark</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>sparkskins</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>rpc</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>datavisualization</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <!-- Flex framework resource bundles -->
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <version>${flex.sdk.version}</version>
      <type>pom</type>
    </dependency>
    <dependency>
        <groupId>org.puremvc.pipes</groupId>
        <artifactId>Utility_AS3_MultiCore_Pipes</artifactId>
        <version>1.1</version>
        <type>swc</type>
        <scope>rsl</scope>
    </dependency>

    <dependency>
        <groupId>org.puremvc.multicore</groupId>
        <artifactId>PureMVC_AS3_MultiCore</artifactId>
        <version>1.0.5</version>
        <type>swc</type>
        <scope>rsl</scope>
    </dependency>



2. web-application pom :

     <build>
      <finalName>foo</finalName>
          <plugins>
                                 <plugin>
                                   <groupId>org.sonatype.flexmojos</groupId>
                                   <artifactId>flexmojos-maven-plugin</artifactId>
                                   <version>${flex-mojos-plugin.version}</version>
                                   <extensions>true</extensions>
                                   <executions>
                                   <execution>
                                           <phase>compile</phase>
                                           <id>copy-flex-resources</id>
                                           <goals>
                                           <goal>copy-flex-resources</goal>
                                           </goals>
                                           </execution>
                                   </executions>
                                   <dependencies>
                                           <dependency>
                                                   <groupId>com.adobe.flex</groupId>
                                                   <artifactId>compiler</artifactId>
                                                   <version>${flex.sdk.version}</version>
                                                   <type>pom</type>
                                           </dependency>
                                   </dependencies>
                                   <configuration>
                   <stripVersion>true</stripVersion>
                   <copyRSL>true</copyRSL>
                                   </configuration>
                           </plugin>
           </plugins>
    </build>

Я во всем разбираюсь, но не могу найти решение.Любая помощь очень ценится

ОБНОВЛЕНИЕ 1: @J_A_X, я как-то понял, что это работает с комбинацией 4.0-RC1 и исправлением пом.Но есть и другая проблема.Пользовательские зависимости, которые я добавил, например

    <dependency>
        <groupId>org.puremvc.pipes</groupId>
        <artifactId>Utility_AS3_MultiCore_Pipes</artifactId>
        <version>1.1</version>
        <type>swc</type>
        <scope>rsl</scope>
    </dependency>

    <dependency>
        <groupId>org.puremvc.multicore</groupId>
        <artifactId>PureMVC_AS3_MultiCore</artifactId>
        <version>1.0.5</version>
        <type>swc</type>
        <scope>rsl</scope>
    </dependency>

, не копируются.получение следующей ошибки

[ОШИБКА] Не удалось выполнить цель org.sonatype.flexmojos: flexmojos-maven-plugin: 4.0-RC1: copy-flex-resources (copy-flex-resources) в проекте smh: исполнительная копия-flex-ресурсы цели org.sonatype.flexmojos: flexmojos-maven-plugin: 4.0-RC1: copy-flex-resources не удалось: не удалось разрешить артефакт com.hp.ci:ci-ui-lib:swf:0.0.1-SNAPSHOT -> [Помощь 1]

Я полагаю, что плагин flex-mojos автоматически извлекает SWF из соответствующего SWC и копирует в место назначения, а не мы устанавливаем в хранилище.Я прав в этом?

Ответы [ 2 ]

0 голосов
/ 23 августа 2011

Решено с помощью комбинации нескольких вещей.

  1. обновлено до flex-mojos-4.0.RC1
  2. Adobe не имеет mavenized версии фреймворка rsls. следовательно нужно скачать их и установить в наш локальный репо http://groups.google.com/group/flex-mojos/browse_thread/thread/6f47b2980275aaeb
  3. Каждая из записей RSLurl SHUD имеет запись policyfileURL Каждая запись в массиве rslUrls должна иметь соответствующую запись в этом массиве. http://repository.sonatype.org/content/sites/flexmojos-site/4.0-SNAPSHOT/compile-swf-mojo.html
  4. Все пользовательские rsls должны иметь соответствующий swf в репо. Т.е. copy-flex-resources не будет автоматически запускать цель create-rsl. он должен быть запущен в каждой из библиотек, а соответствующие файлы swf должны быть установлены в репозиторий.
0 голосов
/ 17 августа 2011

Если вы хотите включить RSL в свой пакет, вам необходимо добавить их в качестве зависимостей и правильно настроить URL RSL для аварийного переключения. Добавив эти зависимости, вы сможете заставить их работать с вашей целью. Тем не менее, я нахожу немного странным, что вам нужны как собственные, так и ваши собственные RSL для интернет-приложения, где вам понадобится интернет, независимо от того, что вы делаете.

<dependencies>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <version>${flex.sdk.version}</version>
      <type>pom</type>
      <exclusions>
            <exclusion>
                <groupId>com.adobe.flex.framework</groupId>
                <artifactId>playerglobal</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>playerglobal</artifactId>
        <version>${flex.sdk.version}</version>
        <classifier>${flash.version}</classifier>
        <type>swc</type>
    </dependency>

    <!-- Cached, signed libraries -->
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>framework</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>textLayout</artifactId>
        <version>${flex.textlayout.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>osmf</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>rpc</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>charts</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>mx</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>spark</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>advancedgrids</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>sparkskins</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>spark_dmv</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>

    <!-- THEMES -->
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>spark</artifactId>
        <version>${flex.sdk.version}</version>
        <classifier>theme</classifier>
        <type>css</type>
        <scope>theme</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flexunit</groupId>
        <artifactId>flexunit</artifactId>
        <version>${flexunit.version}</version>
        <type>swc</type>
        <scope>test</scope>
    </dependency>
</dependencies>
...