You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Jasen Martin <ja...@gmail.com> on 2015/10/03 15:34:07 UTC

Help with My-first-basic-flex-maven project

Hi


I am trying to come up to speed with the modern maven world, so thought I
would start with the apache wiki (I am using windows 10/64 with Java 8/64).

https://cwiki.apache.org/confluence/display/FLEX/Your+first+Flex+application


Following the instructions, I successfully converted 4.14.1 /AIR 16 - SDK
into my local maven repository using:

*java -jar apache-flex-sdk-converter-1.0.0-SNAPSHOT.jar -mavenDir
C:\Users\manager\.m2\repository -flexVersion 4.14.1 -flashVersions 16.0
-airVersion 16.0 -platforms WINDOWS -fontkit -fdkDir
D:\FlexSDK_4.14.1_AIR-16 download convert*


I also made sure I upgraded to maven 3.3.3 and added the path to the bin
directory:

*mvn --version*

*Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06;
2015-04-22T21:57:37+10:00)*
*Maven home: D:\Maven\apache-maven-3.3.3*
*Java version: 1.8.0_31, vendor: Oracle Corporation*
*Java home: D:\Java\jdk1.8.0_31\jre*
*Default locale: en_GB, platform encoding: Cp1252*
*OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "dos"*

Then I run to create basic project.

using:

*mvn archetype:generate -DarchetypeGroupId=net.flexmojos.oss
-DarchetypeArtifactId=flexmojos-archetypes-application
-DarchetypeVersion=7.1.0-SNAPSHOT*

*[INFO] Scanning for projects...*
*[INFO]*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Building Maven Stub Project (No POM) 1*
*[INFO]
------------------------------------------------------------------------*
*[INFO]*
*[INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) >
generate-sources @ standalone-pom >>>*
*[INFO]*
*[INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) <
generate-sources @ standalone-pom <<<*
*[INFO]*
*[INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @
standalone-pom ---*
*[INFO] Generating project in Interactive mode*
*[INFO] Archetype repository not defined. Using the one from
[net.flexmojos.oss:flexmojos-archetypes-application:7.0.1] found in catalog
remote*
*Define value for property 'groupId': : org.apache.flex.examples*
*Define value for property 'artifactId': : my-first-maven-flex-application*
*Define value for property 'version':  1.0-SNAPSHOT: :*
*Define value for property 'package':  org.apache.flex.examples: :*
*Confirm properties configuration:*
*groupId: org.apache.flex.examples*
*artifactId: my-first-maven-flex-application*
*version: 1.0-SNAPSHOT*
*package: org.apache.flex.examples*
* Y: : y*
*[INFO]
----------------------------------------------------------------------------*
*[INFO] Using following parameters for creating project from Old (1.x)
Archetype: flexmojos-archetypes-application:7.1.0-SNAPSHOT*
*[INFO]
----------------------------------------------------------------------------*
*[INFO] Parameter: basedir, Value: D:\wwwApplications_Apache*
*[INFO] Parameter: package, Value: org.apache.flex.examples*
*[INFO] Parameter: groupId, Value: org.apache.flex.examples*
*[INFO] Parameter: artifactId, Value: my-first-maven-flex-application*
*[INFO] Parameter: packageName, Value: org.apache.flex.examples*
*[INFO] Parameter: version, Value: 1.0-SNAPSHOT*
*[INFO] project created from Old (1.x) Archetype in dir:
D:\wwwApplications_Apache\my-first-maven-flex-application*
*[INFO]
------------------------------------------------------------------------*
*[INFO] BUILD SUCCESS*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Total time: 04:05 min*
*[INFO] Finished at: 2015-10-03T23:23:48+10:00*
*[INFO] Final Memory: 17M/487M*
*[INFO]
------------------------------------------------------------------------*


Here is the POM file created for this test project:

<?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>org.apache.flex.examples</groupId>
    <artifactId>my-first-flex-application</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>swf</packaging>

    <name>my-first-flex-application Flex</name>

    <build>
        <sourceDirectory>src/main/flex</sourceDirectory>
        <testSourceDirectory>src/test/flex</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>net.flexmojos.oss</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>7.1.0-SNAPSHOT</version>
                <extensions>true</extensions>
                <configuration>
                    <debug>true</debug>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>4.14.1</version>
                        <type>pom</type>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe</groupId>
                        <artifactId>fontkit</artifactId>
                        <version>1.0</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.flex</groupId>
            <artifactId>framework</artifactId>
            <version>4.14.1</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flash.framework</groupId>
            <artifactId>playerglobal</artifactId>
            <version>18.0</version>
            <type>swc</type>
        </dependency>

        <dependency>
            <groupId>org.flexunit</groupId>
            <artifactId>flexunit</artifactId>
            <version>4.1.0</version>
            <classifier>flex4</classifier>
            <type>swc</type>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>


All that worked nicely until I did the > *mvn install*


*[INFO] Scanning for projects...*
*[INFO]*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Building my-first-flex-application Flex 1.0-SNAPSHOT*
*[INFO]
------------------------------------------------------------------------*
*[WARNING] The POM for com.adobe.flash.framework:playerglobal:swc:18.0 is
missing, no dependency information available*
*[WARNING] The POM for org.flexunit:flexunit:swc:flex4:4.1.0 is missing, no
dependency information available*
*[INFO]
------------------------------------------------------------------------*
*[INFO] BUILD FAILURE*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Total time: 3.689 s*
*[INFO] Finished at: 2015-10-03T22:47:18+10:00*
*[INFO] Final Memory: 16M/487M*
*[INFO]
------------------------------------------------------------------------*
*[ERROR] Failed to execute goal on project my-first-flex-application: Could
not resolve dependencies for project
org.apache.flex.examples:my-first-flex-application:swf:1.0-SNAPSHOT: The
following artifacts could not be resolved:
com.adobe.flash.framework:playerglobal:swc:18.0,
org.flexunit:flexunit:swc:flex4:4.1.0: Failure to find
com.adobe.flash.framework:playerglobal:swc:18.0 in
http://repo1.maven.org/maven2/ <http://repo1.maven.org/maven2/> was cached
in the local repository, resolution will not be reattempted until the
update interval of maven-central has elapsed or updates are forced -> [Help
1]*
*[ERROR]*
*[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.*
*[ERROR] Re-run Maven using the -X switch to enable full debug logging.*
*[ERROR]*
*[ERROR] For more information about the errors and possible solutions,
please read the following articles:*
*[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
<http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException>*



How do I get the org.flexunit into my local repository, I had not luck
finding it on sontatype, and my flash builder 4.7 version is still
com.adobe.flexunit....and I am sure there is a better way.

How do I map flashplayer and AIR to work with package types?

Do I need to do? *set
PLAYERGLOBAL_HOME=D:\FlexSDK_4.14.1_AIR-16\frameworks\libs\player\16.0 *because
It does not seem to help

And why is the version 18? I did change the version to 16 but no luck!

*        <dependency>*
*            <groupId>com.adobe.flash.framework</groupId>*
*            <artifactId>playerglobal</artifactId>*
*            <version>18.0</version>*
*            <type>swc</type>*
*        </dependency>*



I am sure I have just missed something, hope this makes some sense, any
help much appreciated.



Cheers!
Jasen

Re: Help with My-first-basic-flex-maven project

Posted by Jasen Martin <ja...@gmail.com>.
Thanks Chris,

Thanks for the reply and hope you enjoyed apachecon, be good to see some
FlexJS presentations....

I thought I would start from scratch....I have deleted all references in my
local repository to converted SDK and deleted my *D:\FlexSDK_4.14.1_AIR-16*
 directory...

Sorry to flood but here is what I have done....downloaded and converted
apache SDK again, just on the off chance there had been download or some
kind conflicting between versions...

D:\wwwApplications_Apache\flex-utilities\flex-maven-tools\flex-sdk-converter\cli\target>j*ava
-jar apache-flex-sdk-converter-1.0.0-SNAPSHOT.jar -mavenDir
C:\Users\manager\.m2\repository -flexVersion 4.14.1 -flashVersions 16.0
-airVersion 16.0 -platforms WINDOWS -fontkit -fdkDir
D:\FlexSDK_4.14.1_AIR-16 download convert*
*-----------------------------------------------*
*- Downloading*
*-----------------------------------------------*
*- Downloading Flex SDK version: 4.14.1 to directory:
D:\FlexSDK_4.14.1_AIR-16*
*===========================================================*
*Downloading
http://archive.apache.org/dist/flex/4.14.1/binaries/apache-flex-sdk-4.14.1-bin.zip
<http://archive.apache.org/dist/flex/4.14.1/binaries/apache-flex-sdk-4.14.1-bin.zip>*
*Expected size: 68MB*
* 100% [==================================================]*
*Finished downloading.*
*===========================================================*
*Extracting archive to temp directory.*
*  99% [=================================================>]*
*Finished extracting.*
*===========================================================*
*===========================================================*
*Downloading http://swfobject.googlecode.com/files/swfobject_2_2.zip
<http://swfobject.googlecode.com/files/swfobject_2_2.zip>*
*Expected size: 27KB*
* 100% [==================================================]*
*Finished downloading.*
*===========================================================*
*Extracting archive to temp directory.*
* 100% [==================================================]*
*Finished extracting.*
*===========================================================*
*- Downloading Flash SDK version: 16.0 to directory:
D:\FlexSDK_4.14.1_AIR-16*
*Your System-Id: b6b71989*
*The Adobe SDK license agreement applies to the Adobe Flash Player
playerglobal.swc. Do you want to install the Adobe Flash Player
playerglobal.swc?*
*(In a non-interactive build such as a CI server build, alternatively to
typing y or yes you can also set a system property containing your system
which is interpreted as equivalent to accepting by typing y or yes:
-Dcom.adobe.systemIdsForWhichTheTermsOfTheAdobeLicenseAgreementAreAccepted=b6b71989
)*
*Do you accept (Yes/No) ? y*
*===========================================================*
*Downloading
http://download.macromedia.com/get/flashplayer/updaters/16/playerglobal16_0.swc
<http://download.macromedia.com/get/flashplayer/updaters/16/playerglobal16_0.swc>*
*Expected size: 379KB*
* 100% [==================================================]*
*Finished downloading.*
*===========================================================*
*- Downloading Air SDK version: 16.0 and platform WINDOWS to directory:
D:\FlexSDK_4.14.1_AIR-16*
*Your System-Id: b6b71989*
*The Adobe SDK license agreement applies to the Adobe AIR SDK. Do you want
to install the Adobe AIR SDK? Adobe AIR SDK License:
http://www.adobe.com/products/air/sdk-eula.html
<http://www.adobe.com/products/air/sdk-eula.html>*
*(In a non-interactive build such as a CI server build, alternatively to
typing y or yes you can also set a system property containing your system
which is interpreted as equivalent to accepting by typing y or yes:
-Dcom.adobe.systemIdsForWhichTheTermsOfTheAdobeLicenseAgreementAreAccepted=b6b71989
)*
*Do you accept (Yes/No) ? y*
*===========================================================*
*Downloading
http://airdownload.adobe.com/air/win/download/16.0/AdobeAIRSDK.zip
<http://airdownload.adobe.com/air/win/download/16.0/AdobeAIRSDK.zip>*
*Expected size: 181MB*
* 100% [==================================================]*
*Finished downloading.*
*===========================================================*
*Extracting archive to temp directory.*
* 100% [==================================================]*
*Finished extracting.*
*===========================================================*
*- Downloading Flex Fontkit libraries to directory:
D:\FlexSDK_4.14.1_AIR-16*
*Your System-Id: b6b71989*
*Apache Flex can optionally integrate with Adobe's embedded font support.
This feature requires a few font jars from the Adobe Flex SDK. The Adobe
SDK license agreement for Adobe Flex 4.6 applies to these jars. This
license is not compatible with the Apache V2 license. Do you want to
install these jars from the Adobe Flex SDK?*
*(In a non-interactive build such as a CI server build, alternatively to
typing y or yes you can also set a system property containing your system
which is interpreted as equivalent to accepting by typing y or yes:
-Dcom.adobe.systemIdsForWhichTheTermsOfTheAdobeLicenseAgreementAreAccepted=b6b71989
)*
*Do you accept (Yes/No) ? y*
*statusCode: 200*
*reasonPhrase: OK*
*===========================================================*
*Downloading
http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/afe.jar?format=raw
<http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/afe.jar?format=raw>*
*Unknown size.*
*Finished downloading.*
*===========================================================*
*statusCode: 200*
*reasonPhrase: OK*
*===========================================================*
*Downloading
http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/aglj40.jar?format=raw
<http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/aglj40.jar?format=raw>*
*Unknown size.*
*Finished downloading.*
*===========================================================*
*statusCode: 200*
*reasonPhrase: OK*
*===========================================================*
*Downloading
http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/rideau.jar?format=raw
<http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/rideau.jar?format=raw>*
*Unknown size.*
*Finished downloading.*
*===========================================================*
*statusCode: 200*
*reasonPhrase: OK*
*===========================================================*
*Downloading
http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/flex-fontkit.jar?format=raw
<http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/flex-fontkit.jar?format=raw>*
*Unknown size.*
*Finished downloading.*
*===========================================================*
*Finished downloads.*
*-----------------------------------------------*
*- Conversion*
*-----------------------------------------------*
*- Converting Flex SDK from D:\FlexSDK_4.14.1_AIR-16 to
C:\Users\manager\.m2\repository*
*Exception in thread "main"
org.apache.flex.utilities.converter.exceptions.ConverterException: Error
generating template output.*
*        at
org.apache.flex.utilities.converter.BaseConverter.createPomDocument(BaseConverter.java:288)*
*        at
org.apache.flex.utilities.converter.BaseConverter.writePomArtifact(BaseConverter.java:251)*
*        at
org.apache.flex.utilities.converter.BaseConverter.writeArtifact(BaseConverter.java:361)*
*        at
org.apache.flex.utilities.converter.flex.FlexConverter.writeArtifact(FlexConverter.java:279)*
*        at
org.apache.flex.utilities.converter.BaseConverter.resolveArtifact(BaseConverter.java:349)*
*        at
org.apache.flex.utilities.converter.flex.FlexConverter.generateCompilerArtifacts(FlexConverter.java:103)*
*        at
org.apache.flex.utilities.converter.flex.FlexConverter.processDirectory(FlexConverter.java:70)*
*        at
org.apache.flex.utilities.converter.BaseConverter.convert(BaseConverter.java:87)*
*        at
org.apache.flex.utilities.converter.core.SdkConverterCLI.main(SdkConverterCLI.java:345)*
*Caused by:
org.apache.flex.utilities.converter.exceptions.ConverterException: Could
not create template output directory.*
*        at
org.apache.flex.utilities.converter.BaseConverter.createPomDocument(BaseConverter.java:274)*
*        ... 8 more*



Getting this up and running must be so great, because its proving a tad
tough

Cheers
Jasen



On Sun, Oct 4, 2015 at 3:36 AM, Christofer Dutz <ch...@c-ware.de>
wrote:

> Hi Jason,
>
>  glad you managed to get that far :-)
>
>  just have a look at apache flex flexing and use that instead. I would be
> glad to help you in detail, but I'm still not home from the apachecon. Just
> go to search.maven.org and search for flexunit .... Take the result with
> apache in the groupId
>
> I'll help you as soon as I'm home tomorrow.
>
> Chris
>
>
>
> Von meinem Samsung Galaxy Smartphone gesendet.
>
>
> -------- Ursprüngliche Nachricht --------
> Von: Jasen Martin <ja...@gmail.com>
> Datum: 03.10.2015 17:49 (GMT+01:00)
> An: dev@flex.apache.org
> Betreff: Help with My-first-basic-flex-maven project
>
> Hi
>
>
> I am trying to come up to speed with the modern maven world, so thought I
> would start with the apache wiki (I am using windows 10/64 with Java 8/64).
>
>
> https://cwiki.apache.org/confluence/display/FLEX/Your+first+Flex+application
>
>
> Following the instructions, I successfully converted 4.14.1 /AIR 16 - SDK
> into my local maven repository using:
>
> *java -jar apache-flex-sdk-converter-1.0.0-SNAPSHOT.jar -mavenDir
> C:\Users\manager\.m2\repository -flexVersion 4.14.1 -flashVersions 16.0
> -airVersion 16.0 -platforms WINDOWS -fontkit -fdkDir
> D:\FlexSDK_4.14.1_AIR-16 download convert*
>
>
> I also made sure I upgraded to maven 3.3.3 and added the path to the bin
> directory:
>
> *mvn --version*
>
> *Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06;
> 2015-04-22T21:57:37+10:00)*
> *Maven home: D:\Maven\apache-maven-3.3.3*
> *Java version: 1.8.0_31, vendor: Oracle Corporation*
> *Java home: D:\Java\jdk1.8.0_31\jre*
> *Default locale: en_GB, platform encoding: Cp1252*
> *OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "dos"*
>
> Then I run to create basic project.
>
> using:
>
> *mvn archetype:generate -DarchetypeGroupId=net.flexmojos.oss
> -DarchetypeArtifactId=flexmojos-archetypes-application
> -DarchetypeVersion=7.1.0-SNAPSHOT*
>
> *[INFO] Scanning for projects...*
> *[INFO]*
> *[INFO]
> ------------------------------------------------------------------------*
> *[INFO] Building Maven Stub Project (No POM) 1*
> *[INFO]
> ------------------------------------------------------------------------*
> *[INFO]*
> *[INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) >
> generate-sources @ standalone-pom >>>*
> *[INFO]*
> *[INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) <
> generate-sources @ standalone-pom <<<*
> *[INFO]*
> *[INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @
> standalone-pom ---*
> *[INFO] Generating project in Interactive mode*
> *[INFO] Archetype repository not defined. Using the one from
> [net.flexmojos.oss:flexmojos-archetypes-application:7.0.1] found in catalog
> remote*
> *Define value for property 'groupId': : org.apache.flex.examples*
> *Define value for property 'artifactId': : my-first-maven-flex-application*
> *Define value for property 'version':  1.0-SNAPSHOT: :*
> *Define value for property 'package':  org.apache.flex.examples: :*
> *Confirm properties configuration:*
> *groupId: org.apache.flex.examples*
> *artifactId: my-first-maven-flex-application*
> *version: 1.0-SNAPSHOT*
> *package: org.apache.flex.examples*
> * Y: : y*
> *[INFO]
>
> ----------------------------------------------------------------------------*
> *[INFO] Using following parameters for creating project from Old (1.x)
> Archetype: flexmojos-archetypes-application:7.1.0-SNAPSHOT*
> *[INFO]
>
> ----------------------------------------------------------------------------*
> *[INFO] Parameter: basedir, Value: D:\wwwApplications_Apache*
> *[INFO] Parameter: package, Value: org.apache.flex.examples*
> *[INFO] Parameter: groupId, Value: org.apache.flex.examples*
> *[INFO] Parameter: artifactId, Value: my-first-maven-flex-application*
> *[INFO] Parameter: packageName, Value: org.apache.flex.examples*
> *[INFO] Parameter: version, Value: 1.0-SNAPSHOT*
> *[INFO] project created from Old (1.x) Archetype in dir:
> D:\wwwApplications_Apache\my-first-maven-flex-application*
> *[INFO]
> ------------------------------------------------------------------------*
> *[INFO] BUILD SUCCESS*
> *[INFO]
> ------------------------------------------------------------------------*
> *[INFO] Total time: 04:05 min*
> *[INFO] Finished at: 2015-10-03T23:23:48+10:00*
> *[INFO] Final Memory: 17M/487M*
> *[INFO]
> ------------------------------------------------------------------------*
>
>
> Here is the POM file created for this test project:
>
> <?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>org.apache.flex.examples</groupId>
>     <artifactId>my-first-flex-application</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <packaging>swf</packaging>
>
>     <name>my-first-flex-application Flex</name>
>
>     <build>
>         <sourceDirectory>src/main/flex</sourceDirectory>
>         <testSourceDirectory>src/test/flex</testSourceDirectory>
>         <plugins>
>             <plugin>
>                 <groupId>net.flexmojos.oss</groupId>
>                 <artifactId>flexmojos-maven-plugin</artifactId>
>                 <version>7.1.0-SNAPSHOT</version>
>                 <extensions>true</extensions>
>                 <configuration>
>                     <debug>true</debug>
>                 </configuration>
>                 <dependencies>
>                     <dependency>
>                         <groupId>org.apache.flex</groupId>
>                         <artifactId>compiler</artifactId>
>                         <version>4.14.1</version>
>                         <type>pom</type>
>                     </dependency>
>                     <dependency>
>                         <groupId>com.adobe</groupId>
>                         <artifactId>fontkit</artifactId>
>                         <version>1.0</version>
>                     </dependency>
>                 </dependencies>
>             </plugin>
>         </plugins>
>     </build>
>
>     <dependencies>
>         <dependency>
>             <groupId>org.apache.flex</groupId>
>             <artifactId>framework</artifactId>
>             <version>4.14.1</version>
>             <type>pom</type>
>         </dependency>
>         <dependency>
>             <groupId>com.adobe.flash.framework</groupId>
>             <artifactId>playerglobal</artifactId>
>             <version>18.0</version>
>             <type>swc</type>
>         </dependency>
>
>         <dependency>
>             <groupId>org.flexunit</groupId>
>             <artifactId>flexunit</artifactId>
>             <version>4.1.0</version>
>             <classifier>flex4</classifier>
>             <type>swc</type>
>             <scope>test</scope>
>         </dependency>
>     </dependencies>
>
> </project>
>
>
> All that worked nicely until I did the > *mvn install*
>
>
> *[INFO] Scanning for projects...*
> *[INFO]*
> *[INFO]
> ------------------------------------------------------------------------*
> *[INFO] Building my-first-flex-application Flex 1.0-SNAPSHOT*
> *[INFO]
> ------------------------------------------------------------------------*
> *[WARNING] The POM for com.adobe.flash.framework:playerglobal:swc:18.0 is
> missing, no dependency information available*
> *[WARNING] The POM for org.flexunit:flexunit:swc:flex4:4.1.0 is missing, no
> dependency information available*
> *[INFO]
> ------------------------------------------------------------------------*
> *[INFO] BUILD FAILURE*
> *[INFO]
> ------------------------------------------------------------------------*
> *[INFO] Total time: 3.689 s*
> *[INFO] Finished at: 2015-10-03T22:47:18+10:00*
> *[INFO] Final Memory: 16M/487M*
> *[INFO]
> ------------------------------------------------------------------------*
> *[ERROR] Failed to execute goal on project my-first-flex-application: Could
> not resolve dependencies for project
> org.apache.flex.examples:my-first-flex-application:swf:1.0-SNAPSHOT: The
> following artifacts could not be resolved:
> com.adobe.flash.framework:playerglobal:swc:18.0,
> org.flexunit:flexunit:swc:flex4:4.1.0: Failure to find
> com.adobe.flash.framework:playerglobal:swc:18.0 in
> http://repo1.maven.org/maven2/ <http://repo1.maven.org/maven2/> was cached
> in the local repository, resolution will not be reattempted until the
> update interval of maven-central has elapsed or updates are forced -> [Help
> 1]*
> *[ERROR]*
> *[ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.*
> *[ERROR] Re-run Maven using the -X switch to enable full debug logging.*
> *[ERROR]*
> *[ERROR] For more information about the errors and possible solutions,
> please read the following articles:*
> *[ERROR] [Help 1]
>
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
> <
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
> >*
>
>
>
> How do I get the org.flexunit into my local repository, I had not luck
> finding it on sontatype, and my flash builder 4.7 version is still
> com.adobe.flexunit....and I am sure there is a better way.
>
> How do I map flashplayer and AIR to work with package types?
>
> Do I need to do? *set
> PLAYERGLOBAL_HOME=D:\FlexSDK_4.14.1_AIR-16\frameworks\libs\player\16.0
> *because
> It does not seem to help
>
> And why is the version 18? I did change the version to 16 but no luck!
>
> *        <dependency>*
> *            <groupId>com.adobe.flash.framework</groupId>*
> *            <artifactId>playerglobal</artifactId>*
> *            <version>18.0</version>*
> *            <type>swc</type>*
> *        </dependency>*
>
>
>
> I am sure I have just missed something, hope this makes some sense, any
> help much appreciated.
>
>
>
> Cheers!
> Jasen
>



-- 
------------------------------------------------------------
Jasen Martin
0424 984 955
------------------------------------------------------------

AW: Help with My-first-basic-flex-maven project

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Jason,

 glad you managed to get that far :-)

 just have a look at apache flex flexing and use that instead. I would be glad to help you in detail, but I'm still not home from the apachecon. Just go to search.maven.org and search for flexunit .... Take the result with apache in the groupId

I'll help you as soon as I'm home tomorrow.

Chris



Von meinem Samsung Galaxy Smartphone gesendet.


-------- Ursprüngliche Nachricht --------
Von: Jasen Martin <ja...@gmail.com>
Datum: 03.10.2015 17:49 (GMT+01:00)
An: dev@flex.apache.org
Betreff: Help with My-first-basic-flex-maven project

Hi


I am trying to come up to speed with the modern maven world, so thought I
would start with the apache wiki (I am using windows 10/64 with Java 8/64).

https://cwiki.apache.org/confluence/display/FLEX/Your+first+Flex+application


Following the instructions, I successfully converted 4.14.1 /AIR 16 - SDK
into my local maven repository using:

*java -jar apache-flex-sdk-converter-1.0.0-SNAPSHOT.jar -mavenDir
C:\Users\manager\.m2\repository -flexVersion 4.14.1 -flashVersions 16.0
-airVersion 16.0 -platforms WINDOWS -fontkit -fdkDir
D:\FlexSDK_4.14.1_AIR-16 download convert*


I also made sure I upgraded to maven 3.3.3 and added the path to the bin
directory:

*mvn --version*

*Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06;
2015-04-22T21:57:37+10:00)*
*Maven home: D:\Maven\apache-maven-3.3.3*
*Java version: 1.8.0_31, vendor: Oracle Corporation*
*Java home: D:\Java\jdk1.8.0_31\jre*
*Default locale: en_GB, platform encoding: Cp1252*
*OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "dos"*

Then I run to create basic project.

using:

*mvn archetype:generate -DarchetypeGroupId=net.flexmojos.oss
-DarchetypeArtifactId=flexmojos-archetypes-application
-DarchetypeVersion=7.1.0-SNAPSHOT*

*[INFO] Scanning for projects...*
*[INFO]*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Building Maven Stub Project (No POM) 1*
*[INFO]
------------------------------------------------------------------------*
*[INFO]*
*[INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) >
generate-sources @ standalone-pom >>>*
*[INFO]*
*[INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) <
generate-sources @ standalone-pom <<<*
*[INFO]*
*[INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @
standalone-pom ---*
*[INFO] Generating project in Interactive mode*
*[INFO] Archetype repository not defined. Using the one from
[net.flexmojos.oss:flexmojos-archetypes-application:7.0.1] found in catalog
remote*
*Define value for property 'groupId': : org.apache.flex.examples*
*Define value for property 'artifactId': : my-first-maven-flex-application*
*Define value for property 'version':  1.0-SNAPSHOT: :*
*Define value for property 'package':  org.apache.flex.examples: :*
*Confirm properties configuration:*
*groupId: org.apache.flex.examples*
*artifactId: my-first-maven-flex-application*
*version: 1.0-SNAPSHOT*
*package: org.apache.flex.examples*
* Y: : y*
*[INFO]
----------------------------------------------------------------------------*
*[INFO] Using following parameters for creating project from Old (1.x)
Archetype: flexmojos-archetypes-application:7.1.0-SNAPSHOT*
*[INFO]
----------------------------------------------------------------------------*
*[INFO] Parameter: basedir, Value: D:\wwwApplications_Apache*
*[INFO] Parameter: package, Value: org.apache.flex.examples*
*[INFO] Parameter: groupId, Value: org.apache.flex.examples*
*[INFO] Parameter: artifactId, Value: my-first-maven-flex-application*
*[INFO] Parameter: packageName, Value: org.apache.flex.examples*
*[INFO] Parameter: version, Value: 1.0-SNAPSHOT*
*[INFO] project created from Old (1.x) Archetype in dir:
D:\wwwApplications_Apache\my-first-maven-flex-application*
*[INFO]
------------------------------------------------------------------------*
*[INFO] BUILD SUCCESS*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Total time: 04:05 min*
*[INFO] Finished at: 2015-10-03T23:23:48+10:00*
*[INFO] Final Memory: 17M/487M*
*[INFO]
------------------------------------------------------------------------*


Here is the POM file created for this test project:

<?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>org.apache.flex.examples</groupId>
    <artifactId>my-first-flex-application</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>swf</packaging>

    <name>my-first-flex-application Flex</name>

    <build>
        <sourceDirectory>src/main/flex</sourceDirectory>
        <testSourceDirectory>src/test/flex</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>net.flexmojos.oss</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>7.1.0-SNAPSHOT</version>
                <extensions>true</extensions>
                <configuration>
                    <debug>true</debug>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>4.14.1</version>
                        <type>pom</type>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe</groupId>
                        <artifactId>fontkit</artifactId>
                        <version>1.0</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.flex</groupId>
            <artifactId>framework</artifactId>
            <version>4.14.1</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flash.framework</groupId>
            <artifactId>playerglobal</artifactId>
            <version>18.0</version>
            <type>swc</type>
        </dependency>

        <dependency>
            <groupId>org.flexunit</groupId>
            <artifactId>flexunit</artifactId>
            <version>4.1.0</version>
            <classifier>flex4</classifier>
            <type>swc</type>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>


All that worked nicely until I did the > *mvn install*


*[INFO] Scanning for projects...*
*[INFO]*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Building my-first-flex-application Flex 1.0-SNAPSHOT*
*[INFO]
------------------------------------------------------------------------*
*[WARNING] The POM for com.adobe.flash.framework:playerglobal:swc:18.0 is
missing, no dependency information available*
*[WARNING] The POM for org.flexunit:flexunit:swc:flex4:4.1.0 is missing, no
dependency information available*
*[INFO]
------------------------------------------------------------------------*
*[INFO] BUILD FAILURE*
*[INFO]
------------------------------------------------------------------------*
*[INFO] Total time: 3.689 s*
*[INFO] Finished at: 2015-10-03T22:47:18+10:00*
*[INFO] Final Memory: 16M/487M*
*[INFO]
------------------------------------------------------------------------*
*[ERROR] Failed to execute goal on project my-first-flex-application: Could
not resolve dependencies for project
org.apache.flex.examples:my-first-flex-application:swf:1.0-SNAPSHOT: The
following artifacts could not be resolved:
com.adobe.flash.framework:playerglobal:swc:18.0,
org.flexunit:flexunit:swc:flex4:4.1.0: Failure to find
com.adobe.flash.framework:playerglobal:swc:18.0 in
http://repo1.maven.org/maven2/ <http://repo1.maven.org/maven2/> was cached
in the local repository, resolution will not be reattempted until the
update interval of maven-central has elapsed or updates are forced -> [Help
1]*
*[ERROR]*
*[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.*
*[ERROR] Re-run Maven using the -X switch to enable full debug logging.*
*[ERROR]*
*[ERROR] For more information about the errors and possible solutions,
please read the following articles:*
*[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
<http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException>*



How do I get the org.flexunit into my local repository, I had not luck
finding it on sontatype, and my flash builder 4.7 version is still
com.adobe.flexunit....and I am sure there is a better way.

How do I map flashplayer and AIR to work with package types?

Do I need to do? *set
PLAYERGLOBAL_HOME=D:\FlexSDK_4.14.1_AIR-16\frameworks\libs\player\16.0 *because
It does not seem to help

And why is the version 18? I did change the version to 16 but no luck!

*        <dependency>*
*            <groupId>com.adobe.flash.framework</groupId>*
*            <artifactId>playerglobal</artifactId>*
*            <version>18.0</version>*
*            <type>swc</type>*
*        </dependency>*



I am sure I have just missed something, hope this makes some sense, any
help much appreciated.



Cheers!
Jasen