You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Christofer Dutz <ch...@c-ware.de> on 2015/04/24 16:55:11 UTC
Help proofreading Maven documentation
Hi,
as I think the process of building Flex applications with Maven is more and more reaching it's final state, I have started writing down a completely new version of the Flexmojos documentation in our Flex Wiki, cause I think this is where people would start looking.
All documents are located here and on pages underneath:
https://cwiki.apache.org/confluence/display/FLEX/Building+Flex+applications+with+Maven
It would be a great help for me, if some of you could start reading it and give me feedback:
- If you are new to the topic ... where there things you didn't understand?
- Are things I wrote simply wrong?
- Where do I have to explain a little more?
- Did I miss something that you think I should add? (Ok ... there is still a lot missing, but I'll try writing whenever I find the time)
The pages with a (WIP) at the end are "Work In Progress" and are reminders to myself to write the corresponding tutorials.
One note though ... I wrote the parts of documentation using the ultra-fresh versions of the Flex SDK Converter and Flexmojos which I both adjusted several times during the last days. If you experience some different behavior, please check if you have the latest version. For example I adjusted the Flex SDK Converter to produce wrapper modules this morning and the Flexmojos archetype to use this instead of the completely screwed-up Flexmojos wrapper-goal.
It has taken quite some time and even more hard work to fine-tune the FDK structure and Flexmojos and all the tools in-between, but I think the current state is in a really fine state and I feel more and more comfortable calling it the final state. As soon as the FDK converter and Flexojos 7.1.0 are released, we might start publishing FDK resources as Maven artifacts officially :-)
Chris
AW: Help proofreading Maven documentation
Posted by Christofer Dutz <ch...@c-ware.de>.
Please stick to version 7.1.0-SNAPSHOT for now as this is the one I'm writing the documentation for. I put an enormous amount of effort into making Flexmojos work with Maven versions above 3.0 and changes to Aether were some of the major changes I had to deal with. So please try the 7.1.0-SNAPSHOT.
Chris
-----Ursprüngliche Nachricht-----
Von: lynwall [mailto:lyn.wall@kbmg.com]
Gesendet: Mittwoch, 29. April 2015 18:47
An: users@flex.apache.org
Betreff: Re: Help proofreading Maven documentation
Hi Chris
I get this error trying to build my war, based on the instructions at https://cwiki.apache.org/confluence/display/FLEX/Your+first+Flex+multi-module+project.
Thanks in advance for your help.
This is the error:
[ERROR] Failed to execute goal
net.flexmojos.oss:flexmojos-maven-plugin:7.0.1:copy-flex-resources (default) on project war: Execution default of goal net.flexmojos.oss:flexmojos-maven-plugin:7.0.1:copy-flex-resources failed:
An API incompatibility was encountered while executing
net.flexmojos.oss:flexmojos-maven-plugin:7.0.1:copy-flex-resources:
java.lang.NoSuchMethodError:
org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;
[ERROR] -----------------------------------------------------
[ERROR] realm =
extension>net.flexmojos.oss:flexmojos-maven-plugin:7.0.1-50681597
[ERROR] strategy =
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
And here is the war 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>
<properties>
<flexmojos.version>7.0.1</flexmojos.version>
<flex.version>4.14.1</flex.version>
<flash.version>16.0</flash.version>
<kosmos.version>4.0.1-SNAPSHOT</kosmos.version>
<application>application</application>
</properties>
<parent>
<artifactId>MyProjectMain</artifactId>
<groupId>com.company.project</groupId>
<version>4.0.1-SNAPSHOT</version>
</parent>
<artifactId>war</artifactId>
<packaging>war</packaging>
<properties>
<swf>swf-1.0.0-SNAPSHOT</swf>
<width>100%</width>
<height>100%</height>
<title>MyProject</title>
<useBrowserHistory>true</useBrowserHistory>
<expressInstallSwf>expressInstall.swf</expressInstallSwf>
<application>application</application>
</properties>
<build>
<plugins>
<plugin>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flexmojos.version}</version>
<executions>
<execution>
<goals>
<goal>copy-flex-resources</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<overlays>
<overlay>
<groupId>org.apache.flex.wrapper
</groupId>
<artifactId>swfobject</artifactId>
<type>war</type>
<filtered>true</filtered>
</overlay>
</overlays>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.flex.wrapper</groupId>
<artifactId>swfobject</artifactId>
<version>${flex.version}</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.17</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>net.flexmojos.oss</groupId>
<artifactId>
flexmojos-maven-plugin
</artifactId>
<versionRange>[7.0.0,)</versionRange>
<goals>
<goal>copy-flex-resources</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>com.company.project</groupId>
<artifactId>swf</artifactId>
<version>${project.version}</version>
<type>swf</type>
</dependency>
<dependency>
<groupId>org.apache.flex.wrapper</groupId>
<artifactId>swfobject</artifactId>
<version>${flex.version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-proofreading-Maven-documentation-tp10169p10227.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Help proofreading Maven documentation
Posted by lynwall <ly...@kbmg.com>.
Hi Chris
I get this error trying to build my war, based on the instructions at
https://cwiki.apache.org/confluence/display/FLEX/Your+first+Flex+multi-module+project.
Thanks in advance for your help.
This is the error:
[ERROR] Failed to execute goal
net.flexmojos.oss:flexmojos-maven-plugin:7.0.1:copy-flex-resources (default)
on project war: Execution default of goal
net.flexmojos.oss:flexmojos-maven-plugin:7.0.1:copy-flex-resources failed:
An API incompatibility was encountered while executing
net.flexmojos.oss:flexmojos-maven-plugin:7.0.1:copy-flex-resources:
java.lang.NoSuchMethodError:
org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;
[ERROR] -----------------------------------------------------
[ERROR] realm =
extension>net.flexmojos.oss:flexmojos-maven-plugin:7.0.1-50681597
[ERROR] strategy =
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
And here is the war 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>
<properties>
<flexmojos.version>7.0.1</flexmojos.version>
<flex.version>4.14.1</flex.version>
<flash.version>16.0</flash.version>
<kosmos.version>4.0.1-SNAPSHOT</kosmos.version>
<application>application</application>
</properties>
<parent>
<artifactId>MyProjectMain</artifactId>
<groupId>com.company.project</groupId>
<version>4.0.1-SNAPSHOT</version>
</parent>
<artifactId>war</artifactId>
<packaging>war</packaging>
<properties>
<swf>swf-1.0.0-SNAPSHOT</swf>
<width>100%</width>
<height>100%</height>
<title>MyProject</title>
<useBrowserHistory>true</useBrowserHistory>
<expressInstallSwf>expressInstall.swf</expressInstallSwf>
<application>application</application>
</properties>
<build>
<plugins>
<plugin>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flexmojos.version}</version>
<executions>
<execution>
<goals>
<goal>copy-flex-resources</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<overlays>
<overlay>
<groupId>org.apache.flex.wrapper
</groupId>
<artifactId>swfobject</artifactId>
<type>war</type>
<filtered>true</filtered>
</overlay>
</overlays>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.flex.wrapper</groupId>
<artifactId>swfobject</artifactId>
<version>${flex.version}</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.17</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>net.flexmojos.oss</groupId>
<artifactId>
flexmojos-maven-plugin
</artifactId>
<versionRange>[7.0.0,)</versionRange>
<goals>
<goal>copy-flex-resources</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>com.company.project</groupId>
<artifactId>swf</artifactId>
<version>${project.version}</version>
<type>swf</type>
</dependency>
<dependency>
<groupId>org.apache.flex.wrapper</groupId>
<artifactId>swfobject</artifactId>
<version>${flex.version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-proofreading-Maven-documentation-tp10169p10227.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Help proofreading Maven documentation
Posted by Simon Casey <we...@gmail.com>.
Hi Chris,
Coincidentally, I am just going through these docs now whilst I upgrade my
company's Flex version from 4.11 to 4.14.1. I noticed that you don't
mention to use the 'develop' branch when cloning the flex-utilities repo.
If you stick on master, the file path for the next steps are not there.
I'll let you know if I come across anything else,
PS
You are doing absolutely fantastic work on Flexmojos, Chris. I know that my
company for one really appreciates it.
On Fri, 24 Apr 2015 at 15:55 Christofer Dutz <ch...@c-ware.de>
wrote:
> Hi,
>
>
> as I think the process of building Flex applications with Maven is more
> and more reaching it's final state, I have started writing down a
> completely new version of the Flexmojos documentation in our Flex Wiki,
> cause I think this is where people would start looking.
>
>
> All documents are located here and on pages underneath:
>
>
> https://cwiki.apache.org/confluence/display/FLEX/Building+Flex+applications+with+Maven
>
>
> It would be a great help for me, if some of you could start reading it and
> give me feedback:
>
> - If you are new to the topic ... where there things you didn't understand?
>
> - Are things I wrote simply wrong?
>
> - Where do I have to explain a little more?
>
> - Did I miss something that you think I should add? (Ok ... there is still
> a lot missing, but I'll try writing whenever I find the time)
>
>
> The pages with a (WIP) at the end are "Work In Progress" and are reminders
> to myself to write the corresponding tutorials.
>
>
> One note though ... I wrote the parts of documentation using the
> ultra-fresh versions of the Flex SDK Converter and Flexmojos which I both
> adjusted several times during the last days. If you experience some
> different behavior, please check if you have the latest version. For
> example I adjusted the Flex SDK Converter to produce wrapper modules this
> morning and the Flexmojos archetype to use this instead of the completely
> screwed-up Flexmojos wrapper-goal.
>
>
> It has taken quite some time and even more hard work to fine-tune the FDK
> structure and Flexmojos and all the tools in-between, but I think the
> current state is in a really fine state and I feel more and more
> comfortable calling it the final state. As soon as the FDK converter and
> Flexojos 7.1.0 are released, we might start publishing FDK resources as
> Maven artifacts officially :-)
>
> Chris
>
>
RE: Help proofreading Maven documentation
Posted by lynwall <ly...@kbmg.com>.
Thank you so much for your help!
Lyn Wall | UI Architect | KBM Group | (Tel) 713 995 2392 | (Mob) 281 377 6356 | lyn.wall@kbmg.com<ma...@kbmg.com>
From: Christofer Dutz [via Apache Flex Users] [mailto:ml-node+s2333346n10242h28@n4.nabble.com]
Sent: Friday, May 01, 2015 4:54 AM
To: Wall, Lyn
Subject: AW: Help proofreading Maven documentation
Well you shouldn't manually download SNAPSHOT versions and install them locally.
This will definitely not work as you expected. By the way a SNAPSHOT on a remote repository consists of the following parts:
{artifactId}-{version}-{build-date}.{build-time}-{counter}.jar
Locally you only have one {artifactId}-{version}-SNAPSHOT, but on the server you usually have 1-20 of them. When building Maven checks the remote daily (default) but can be set to check in other intervals, if new SNAPSHOTs have been provided. Maven uses the Date, Time and Counter to check this.
So in your case you shouldn't have manually donwloaded the stuff to your local repo, but have maven to that for you by adding the apache and the sonatype snapshot repos to your build.
Perhaps some more explanation here:
http://stackoverflow.com/questions/5901378/what-exactly-is-a-maven-snapshot-and-why-do-we-need-it
Chris
-----Ursprüngliche Nachricht-----
Von: lynwall [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=10242&i=0>]
Gesendet: Donnerstag, 30. April 2015 19:11
An: [hidden email]</user/SendEmail.jtp?type=node&node=10242&i=1>
Betreff: Re: Help proofreading Maven documentation
I'm sure I'm missing something really obvious here so I apologize in advance for the stupid question. I've downloaded the files in the repository and they are in a folder named 7.1.0-SNAPSHOT, but the file names have the build number rather than snapshot (eg.
flexmojos-maven-plugin-7.1.0-20150425.164827-22.jar) so when I refer to <flexmojos.version>7.1.0-SNAPSHOT</flexmojos.version> maven can't resolve it. I've made sure that my repositories are pointing to the snapshots repository. How do I get maven to see 7.1.0-SNAPSHOT?
<repositories>
<repository>
<id>flex-mojos-repository</id>
<url>
https://oss.sonatype.org/content/repositories/snapshots/net/flexmojos/oss/</url>
<releases> <enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/net/flexmojos/oss/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots> <enabled>false</enabled> </snapshots>
</pluginRepository>
</pluginRepositories>
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-proofreading-Maven-documentation-tp10169p10238.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-flex-users.2333346.n4.nabble.com/Help-proofreading-Maven-documentation-tp10169p10242.html
To unsubscribe from Help proofreading Maven documentation, click here<http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=10169&code=bHluLndhbGxAa2JtZy5jb218MTAxNjl8MjEwMjc4OTEzNQ==>.
NAML<http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-proofreading-Maven-documentation-tp10169p10244.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
AW: Help proofreading Maven documentation
Posted by Christofer Dutz <ch...@c-ware.de>.
Well you shouldn't manually download SNAPSHOT versions and install them locally.
This will definitely not work as you expected. By the way a SNAPSHOT on a remote repository consists of the following parts:
{artifactId}-{version}-{build-date}.{build-time}-{counter}.jar
Locally you only have one {artifactId}-{version}-SNAPSHOT, but on the server you usually have 1-20 of them. When building Maven checks the remote daily (default) but can be set to check in other intervals, if new SNAPSHOTs have been provided. Maven uses the Date, Time and Counter to check this.
So in your case you shouldn't have manually donwloaded the stuff to your local repo, but have maven to that for you by adding the apache and the sonatype snapshot repos to your build.
Perhaps some more explanation here:
http://stackoverflow.com/questions/5901378/what-exactly-is-a-maven-snapshot-and-why-do-we-need-it
Chris
-----Ursprüngliche Nachricht-----
Von: lynwall [mailto:lyn.wall@kbmg.com]
Gesendet: Donnerstag, 30. April 2015 19:11
An: users@flex.apache.org
Betreff: Re: Help proofreading Maven documentation
I'm sure I'm missing something really obvious here so I apologize in advance for the stupid question. I've downloaded the files in the repository and they are in a folder named 7.1.0-SNAPSHOT, but the file names have the build number rather than snapshot (eg.
flexmojos-maven-plugin-7.1.0-20150425.164827-22.jar) so when I refer to <flexmojos.version>7.1.0-SNAPSHOT</flexmojos.version> maven can't resolve it. I've made sure that my repositories are pointing to the snapshots repository. How do I get maven to see 7.1.0-SNAPSHOT?
<repositories>
<repository>
<id>flex-mojos-repository</id>
<url>
https://oss.sonatype.org/content/repositories/snapshots/net/flexmojos/oss/</url>
<releases> <enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/net/flexmojos/oss/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots> <enabled>false</enabled> </snapshots>
</pluginRepository>
</pluginRepositories>
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-proofreading-Maven-documentation-tp10169p10238.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Help proofreading Maven documentation
Posted by lynwall <ly...@kbmg.com>.
I'm sure I'm missing something really obvious here so I apologize in advance
for the stupid question. I've downloaded the files in the repository and
they are in a folder named 7.1.0-SNAPSHOT, but the file names have the build
number rather than snapshot (eg.
flexmojos-maven-plugin-7.1.0-20150425.164827-22.jar) so when I refer to
<flexmojos.version>7.1.0-SNAPSHOT</flexmojos.version> maven can't resolve
it. I've made sure that my repositories are pointing to the snapshots
repository. How do I get maven to see 7.1.0-SNAPSHOT?
<repositories>
<repository>
<id>flex-mojos-repository</id>
<url>
https://oss.sonatype.org/content/repositories/snapshots/net/flexmojos/oss/</url>
<releases> <enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/net/flexmojos/oss/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots> <enabled>false</enabled> </snapshots>
</pluginRepository>
</pluginRepositories>
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Help-proofreading-Maven-documentation-tp10169p10238.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.