0

I have a flex project that I need to convert into a maven project. I am using m2e for Eclipse and at the bottom of this post is the POM.xml file that I have created.

My issue is that I cannot seem to run a mvn clean install on this POM. In Eclipse there is an error highlighting the first "plugin" line that says:

-Plugin execution not covered by lifecycle configuration:
 org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1:test-compile 
 (execution: default-test-compile, phase: test-compile)  

and

-Plugin execution not covered by lifecycle configuration:
org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1:compile-swf 
(execution: default-compile-swf, phase: compile)

Beyond that, if I do run the mvn clean install I get a different error:

Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:
3.7.1:compile-swf (default-compile-swf) on project flex: Failure to find
com.adobe.flex.framework:framework:rb.swc:en_US:3.2.0.3958 in
nexusserver/nexus/content/groups/public was cached in the local repository, 
resolution  will not be reattempted until the update interval of nexus has 
elapsed or updates are forced

I am looking at the nexus server and I see:

-com\adobe\flex\framework\framework\3.2.0.3958

Inside there are a bunch of zips and stuff, and the file: framework-3.2.0.3958.rb.swc

So I'm not sure what actually the problem is. I'm still a bit of a maven novice and I've never actually used flex before so I think I am just a little overwhelmed at the moment. Does anyone have any ideas how to fix at least one of the issues? Thank you for your time.

edit: Even worse, the file is located in my local repository so I have no idea why it isn't seeing it.

--

POM.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated from the following command: mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.org/content/groups/public 
-DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-application 
-DarchetypeVersion=3.7.1 -->
<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>com.company.ref</groupId>
<artifactId>flex</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>swf</packaging>

<name>flex</name>

<build>
    <plugins>
        <plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>3.7.1</version>
            <extensions>true</extensions>
            <configuration>
                <locales>
                    <locale>en_US</locale>
                </locales>
            </configuration>
        </plugin>
    </plugins>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <testSourceDirectory>src/test/flex</testSourceDirectory>
    <pluginManagement>
        <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings 
                only. It has no influence on the Maven build itself. -->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>aspectj-maven-plugin</artifactId>
                                    <versionRange>[1.0,)</versionRange>
                                    <goals>
                                        <goal>test-compile</goal>
                                        <goal>compile</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <execute />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

<dependencies>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>flex-framework</artifactId>
        <version>3.2.0.3958</version>
        <type>pom</type>
    </dependency>
</dependencies>

<profiles>
    <profile><!--https://docs.sonatype.org/pages/viewpage.action?pageId=2949459 -->
        <id>m2e</id>
        <activation>
            <property>
                <name>m2e.version</name>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.maven.ide.eclipse</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>0.9.9-SNAPSHOT</version>
                    <configuration>
                        <mappingId>customizable</mappingId>
                        <configurators>
                            <configurator
                                id='org.maven.ide.eclipse.configuration.flex.configurator' />
                        </configurators>
                        <mojoExecutions>
                            <mojoExecution>org.apache.maven.plugins:maven-resources-plugin::</mojoExecution>
                        </mojoExecutions>
                    </configuration>
                </plugin>
            </plugins>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>2.4</version>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
    </profile>
</profiles>

This is the full error I get:

[INFO]   Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[WARNING] Source file was not defined, flexmojos will guess one.
[WARNING] Not defined if locales should be merged or not
[WARNING] Unable to find license.jar on classpath. Check wiki for instructions about how to add it:
URL
Downloading: nexusURL/nexus/content/groups/public/com/adobe/flex/framework/framework/3.2.0.3958/framework-3.2.0.3958-en_US.rb.swc
[INFO] Unable to find resource 'com.adobe.flex.framework:framework:rb.swc:en_US:3.2.0.3958' in repository central (central)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.adobe.flex.framework -DartifactId=framework -Dversion=3.2.0.3958 -Dclassifier=en_US -Dpackaging=rb.swc -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.adobe.flex.framework -DartifactId=framework -Dversion=3.2.0.3958 -Dclassifier=en_US -Dpackaging=rb.swc -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]


com.adobe.flex.framework:framework:rb.swc:3.2.0.3958

from the specified remote repositories: central

Update 3:This is my new POM:

<?xml version="1.0" encoding="UTF-8"?>
<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>com.company.table</groupId>
<artifactId>flex</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>swf</packaging>

<name>flex</name>

<repositories>
    <repository>
        <id>flex-mojos-repository</id>
        <url>https://repository.sonatype.org/content/groups/flexgroup</url>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>flex-mojos-repository</id>
        <url>https://repository.sonatype.org/content/groups/flexgroup</url>
    </pluginRepository>
</pluginRepositories>

<build>
    <plugins>
        <plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>3.7.1</version>
            <extensions>true</extensions>               
        </plugin>
    </plugins>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <testSourceDirectory>src/test/flex</testSourceDirectory>
</build>

<dependencies>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>flex-framework</artifactId>
        <version>3.2.0.3958</version>
        <type>pom</type>
    </dependency>
</dependencies> 

Ken Harris
  • 113
  • 1
  • 1
  • 9
  • This sometimes happens. Try to remove the entire folder from your local repository (which will force maven to re-download it) and see if it helps. – Andrew Logvinov Apr 06 '13 at 07:56
  • Sorry I didn't get back to you sooner, Andrew, but I just tried it and I still ran into the issue. I was hopeful. – Ken Harris Apr 08 '13 at 17:10
  • I'm just very confused at why it is looking for `'com.adobe.flex.framework:framework:rb.swc:en_US:3.2.0.3958'` and then below it doesn't even have the en_US part in it. – Ken Harris Apr 08 '13 at 17:24
  • Sorry to bombard with additional comments, but when I run `mvn dependency:tree` it runs successfully, but `mvn clean install` does not. – Ken Harris Apr 08 '13 at 17:29
  • Maybe it's looking for `en_US` because you specified this locale? Take a look at [this question](http://stackoverflow.com/questions/6412292/maven-failure-to-download-swc-files), maybe it helps. – Andrew Logvinov Apr 08 '13 at 18:39
  • @AndrewLogvinov I updated the original question with my new POM. I don't have anything with en_US in the locale and it is still showing up when I do a `mvn clean install`. I also tried https and http, still no dice. I am behind a proxy but I have been able to successfully download other packages. – Ken Harris Apr 08 '13 at 19:06
  • Possible duplicate of [Why do Eclipse Luna Maven projects give errors for maven-compiler-plugin?](https://stackoverflow.com/questions/26366376/why-do-eclipse-luna-maven-projects-give-errors-for-maven-compiler-plugin) – Paul Sweatte Jun 21 '17 at 18:30
  • Not really a duplicate @PaulSweatte, as my question was asked 4 years ago and that link was asked 2 years ago. – Ken Harris Jun 27 '17 at 19:57

0 Answers0