Hi Chris,
Thanks for information, After getting stuck with maven I thought to give a
chance to ant.
I found flex unit ant task very flexible and I am thinking to go with it. Later
I will be integrating these ant tasks into pom(maven).
Here are my few concerns over using maven,
1. What time it will be required to mavenize flex sdk as per the
requirements of flexmojo 6.x? (since I am new here, converting SDK seems to me
a time consuming activity.)
2. Flexmojo generate TestRunner.mxml on the fly but I wanted to add
some global variables to this generated mxml before compiling as classes I am
going to test relies on these variables.
FlexUnit task gives me flexibility to compile TestRunner.mxml separately and
then I can invoke FlexUnit task to run test cases.
Do you think I still continue with maven? Am I missing and leading into wrong
direction?
Regards,
Raj
-----Original Message-----
From: Christofer Dutz [mailto:[email protected]]
Sent: Saturday, January 24, 2015 6:00 AM
To: [email protected]
Subject: AW: Flexmojo + Flex Unit
Ah ... think I know the problem.
Apache FlexUnit has a different jave package name of its classes... FlexMojos
in that old version doesn't know about those. I have however adjusted new
versions (6.x and 7.x) to support Apache FlexUnit. So I would double-suggest to
update :-)
Chris
-----Ursprüngliche Nachricht-----
Von: Raj U. Shaikh [mailto:[email protected]]
Gesendet: Dienstag, 20. Januar 2015 13:35
An: [email protected]
Betreff: RE: Flexmojo + Flex Unit
I moved little ahead and now facing another issue. Shared console log below.
I found relevant information from stackoverflow:
http://stackoverflow.com/questions/18505129/how-do-i-get-flexunit-flexmojos-and-mockolate-to-work-together
Which says that I need to mavenise flex sdk and use flexmojo 6. Isn't there is
any solution to work with flexmojo 4?
Console Log:
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @
ICDLibrary --- [INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- flexmojos-maven-plugin:4.0-beta-7:test-compile
(default-test-compile) @ ICDLibrary --- [INFO] Flexmojos 4.0-beta-7
[INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[INFO] Compiling test class: [com.majesco.stgicd.redeemer.suites.AllTestSuite]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.931s
[INFO] Finished at: Tue Jan 20 17:54:26 IST 2015 [INFO] Final Memory: 10M/343M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-beta-7:test-compile
(default-test-compile) on project ICDLibrary:
java.lang.reflect.InvocationTargetException: Not found any compatible unit test
framework [ERROR] http://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests
[ERROR] -> [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/MojoExecutionException
-----Original Message-----
From: Raj U. Shaikh
Sent: Tuesday, January 20, 2015 3:51 PM
To: [email protected]
Subject: Flexmojo + Flex Unit
Hi,
I am using flexmojo version 4.2-beta, Flex SDK 4.1 and I wanted to run test
cases through maven.
I have existing pom file to compile, release, build a same flex library project.
Now when I tried to integrate test cases with pom file, I am getting following
error. However I noticed that after executing test-compile command I can see
TestRunner.mxml file generated in test-classes directory.
What could be the problem? (I cannot upgrade to latest Flex SDK.)
1. Here is POM
<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.majescomastek.stgicd</groupId>
<artifactId>ICDLibrary</artifactId>
<version>5.40.2.1-SNAPSHOT</version>
<packaging>swc</packaging>
<name>ICD Library</name>
<properties>
<flex-version>4.1.0.16248</flex-version>
<flexmojos.version>4.2-beta</flexmojos.version>
<sonar.language>flex</sonar.language>
<sonar.dynamicAnalysis>false</sonar.dynamicAnalysis>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<flex.debug>true</flex.debug>
</properties>
<build>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
<version>${flexmojos.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex-version}</version>
<type>pom</type>
</dependency>
</dependencies>
<version>${flexmojos.version}</version>
<extensions>true</extensions>
<configuration>
<includeClasses>
<scan>
<includes>
<include>**</include>
</includes>
</scan>
</includeClasses>
<includeTestFiles>
<includeTestFile>AllTestSuite.as</includeTestFile>
</includeTestFiles>
<namespaces>
<namespace>
<uri>http://ns.majescomastek.com/icd</uri>
<manifest>src/main/resources/icd-manifest.xml</manifest>
</namespace>
</namespaces>
<includeNamespaces>
<namespace>http://ns.majescomastek.com/icd</namespace>
</includeNamespaces>
<includeFiles>
<include>icd-manifest.xml</include>
<include>design.xml</include>
</includeFiles>
<showWarnings>false</showWarnings>
<configurationReport>true</configurationReport>
<targetPlayer>10.1.0</targetPlayer>
<!-- compiler option specifying the target flash player version -->
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>${flex-version}</version>
<classifier>10.1</classifier>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex-version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>${flex-version}</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
2. Here is console log:
D:\eclipse_workspace\testunit_workspace\olds\8.8.2.0_ICDLibrary>mvn
test-compile [INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ICD Library 5.40.2.1-SNAPSHOT [INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
ICDLibrary --- [INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 69 resources
[INFO]
[INFO] --- flexmojos-maven-plugin:4.2-beta:compile-swc (default-compile-swc) @
ICDLibrary --- [INFO] Flexmojos 4.2-beta
[INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[WARNING] No themes are explicitly defined in the <theme> section or in any
scope="theme" dependencies. Flexmojos is now attempting to figure out which
themes to include. (to avoid this warning you should explicitly state your
theme dependencies) [WARNING] Adding spark.css theme because spark.swc was
included as a dependency [INFO]
D:\eclipse_workspace\testunit_workspace\olds\8.8.2.0_ICDLibrary\target\ICDLibrary-5.40.2.1-SNAPSHOT.swc
(824702 bytes) [INFO] [INFO] --- maven-resources-plugin:2.6:testResources
(default-testResources) @ ICDLibrary --- [INFO] Using 'UTF-8' encoding to copy
filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- flexmojos-maven-plugin:4.2-beta:test-compile (default-test-compile)
@ ICDLibrary --- [INFO] Flexmojos 4.2-beta
[INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[INFO] Compiling test class: [com.majesco.stgicd.redeemer.suites.AllTestSuite]
Downloading:
http://172.16.246.23:8081/artifactory/pnc-central/org/sonatype/flexmojos/flexmojos-unittest-support/4.2-beta/flexmojos-unittest-support-4.2-beta-flex.swc
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.227s
[INFO] Finished at: Tue Jan 20 12:46:27 IST 2015 [INFO] Final Memory: 10M/236M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.sonatype.flexmojos:flexmojos-maven-plugin:4.2-beta:test-compile
(default-test-compile) on project ICDLibrary:
java.lang.reflect.InvocationTargetException: Failed to resolve artifact
org.sonatype.flexmojos:flexmojos- unittest-support:swc:flex:4.2-beta -> [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/MojoExecutionException
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of
Mastek Limited, unless specifically indicated to that effect. Mastek Limited
does not accept any responsibility or liability for it. This e-mail and
attachments (if any) transmitted with it are confidential and/or privileged and
solely for the use of the intended person or entity to which it is addressed.
Any review, re-transmission, dissemination or other use of or taking of any
action in reliance upon this information by persons or entities other than the
intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the
recipient to run the virus check on e-mails and attachments before opening
them. If you have received this e-mail in error, kindly delete this e-mail from
desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of
Mastek Limited, unless specifically indicated to that effect. Mastek Limited
does not accept any responsibility or liability for it. This e-mail and
attachments (if any) transmitted with it are confidential and/or privileged and
solely for the use of the intended person or entity to which it is addressed.
Any review, re-transmission, dissemination or other use of or taking of any
action in reliance upon this information by persons or entities other than the
intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the
recipient to run the virus check on e-mails and attachments before opening
them. If you have received this e-mail in error, kindly delete this e-mail from
desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of
Mastek Limited, unless specifically indicated to that effect. Mastek Limited
does not accept any responsibility or liability for it. This e-mail and
attachments (if any) transmitted with it are confidential and/or privileged and
solely for the use of the intended person or entity to which it is addressed.
Any review, re-transmission, dissemination or other use of or taking of any
action in reliance upon this information by persons or entities other than the
intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the
recipient to run the virus check on e-mails and attachments before opening
them. If you have received this e-mail in error, kindly delete this e-mail from
desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~