Then you have to do some reading... http://www.sonatype.com/books/maven-book/reference/public-book.html http://flexmojos.sonatype.org/reference-application.html http://flexmojos.sonatype.org/getting-started.html
VELO On Fri, Sep 10, 2010 at 7:21 AM, Robert <[email protected]> wrote: > So you're saying that I need modify the MyProject pom to build to > build the FlexBuilder artefacts? I have tried to do this, however, mvn > flexmojos:flexbuilder won't generate the artefacts because the > MyProject pom has packaging as pom (i.e. > <packaging>pom</packaging>). > if I change this to <packaging>swf</packaging> then MyProjectWAR and > MyProjectSWF don't get built. I can either get the FlexBuilder > artefacts generated, or the WAR and the SWF built, but never both. Is > what I'm doing possible? Here's the MyProject pom which creates the > WAR and SWF, but doesn't generated the FlexBuilder artefacts, even > though the build is successful. > > <?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> > > <parent> > <groupId>com.fmr</groupId> > <artifactId>Project</artifactId> > <version>1.0</version> > <relativePath>../pom.xml</relativePath> > </parent> > > <groupId>com.fmr</groupId> > <artifactId>MyProject</artifactId> > <version>1.0</version> > > <name>MyProject</name> > <packaging>pom</packaging> > > <build> > <sourceDirectory>src/main/flex</sourceDirectory> > <testSourceDirectory>src/test/flex</testSourceDirectory> > </build> > > <properties> > <version>1.0</version> > <flex.mojo.version>3.6.1</flex.mojo.version> > <flex.sdk.version>4.0.0.14159</flex.sdk.version> > <flex.sdk.qtp.version>3.2.0</flex.sdk.qtp.version> > > <flex.targetplayer.version>10.1.0</flex.targetplayer.version> > > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > <sonar.language>flex</sonar.language> > <sonar.dynamicAnalysis>false</sonar.dynamicAnalysis> > </properties> > > <profiles> > <profile> > <id>install</id> > <activation> > <activeByDefault>false</activeByDefault> > </activation> > <build> > <plugins> > <plugin> > > <groupId>org.sonatype.flexmojos</groupId> > > <artifactId>flexmojos-maven-plugin</artifactId> > > <version>${flex.mojo.version}</version> > > <extensions>true</extensions> > <dependencies> > <dependency> > > <groupId>com.adobe.flex</groupId> > > <artifactId>compiler</artifactId> > > <version>${flex.sdk.version}</version> > > <type>pom</type> > </dependency> > <dependency> > > <groupId>com.adobe.flex.compiler</groupId> > > <artifactId>license</artifactId> > > <version>${flex.sdk.version}</version> > </dependency> > </dependencies> > <configuration> > > <targetPlayer>10.0.0</targetPlayer> > <includeAsClasses> > <sources> > > <directory>src/main/flex</directory> > </sources> > </includeAsClasses> > </configuration> > </plugin> > </plugins> > </build> > </profile> > > <profile> > <id>default</id> > <activation> > <activeByDefault>true</activeByDefault> > </activation> > <modules> > <module>build/MyProjectSWF</module> > <module>build/MyProjectWAR</module> > </modules> > </profile> > </profiles> > > <dependencies> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>flex-framework</artifactId> > <version>${flex.sdk.version}</version> > <type>pom</type> > </dependency> > </dependencies> > > </project> > > > I am new to Maven, so my approach to this might be completely wrong. > Thanks. > > On Sep 9, 8:08 pm, Marvin Froeder <[email protected]> wrote: > > You do realize that maven projects are isolated, right? You are trying > to > > to break that isolation by using relative paths, but flexmojos (or maven) > > isn't meant to be used like that, so doesn't surprise me you aren't able > to > > achieve whatever you wanna. > > > > On Thu, Sep 9, 2010 at 4:01 PM, Robert <[email protected]> wrote: > > > I have a Flex project that has a base pom, and two sub-pom's that > > > build a WAR and a SWF, structure is like below. The MyProjectSWF > > > pom.xml runs Flexmojos and builds the FlexBuilder artefacts > > > (.actionscriptproperties, .flexlibproperties, etc.). The artefacts > > > build fine, the problem is that I want to build them in the MyProject > > > folder and not the MyProjectSWF folder. > > > > > MyProject > > > | > > > |------- MyProjectWAR > > > | > > > |------- MyProjectSWF > > > > > The MyProject pom.xml is fairly simple. > > > > > <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"> > > > > > .... some stuff ... > > > > > <profiles> > > > <profile> > > > <id>default</id> > > > <activation> > > > <activeByDefault>true</activeByDefault> > > > </activation> > > > <modules> > > > <module>build/MyProjectWAR</module> > > > <module>build/MyProjectSWF</module> > > > </modules> > > > </profile> > > > </profiles> > > > </project> > > > > > The pom in MyProjectSWF looks like this. > > > > > <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"> > > > . . the usual . . > > > <build> > > > > > <sourceDirectory>${basedir}/../../src/main/flex</sourceDirectory> > > > <testSourceDirectory>${basedir}/../../src/test/flex</ > > > testSourceDirectory> > > > <resources> > > > <resource> > > > > > <directory>${basedir}/../../src/main/resources</directory> > > > </resource> > > > </resources> > > > <plugins> > > > <plugin> > > > > <groupId>org.sonatype.flexmojos</groupId> > > > > > <artifactId>flexmojos-maven-plugin</artifactId> > > > <version>${flex.mojo.version}</version> > > > <extensions>true</extensions> > > > <dependencies> > > > <dependency> > > > > > <groupId>com.adobe.flex</groupId> > > > > > <artifactId>compiler</artifactId> > > > > > <version>${flex.sdk.version}</version> > > > <type>pom</type> > > > </dependency> > > > <dependency> > > > > > <groupId>com.adobe.flex.compiler</groupId> > > > > > <artifactId>license</artifactId> > > > > > <version>${flex.sdk.version}</version> > > > </dependency> > > > </dependencies> > > > > > <configuration> > > > > > <targetPlayer>${flex.targetplayer.version}</targetPlayer> > > > <sourcePaths> > > > > <path>${basedir}/../../src/main/flex</path> > > > > > <path>${basedir}/../../src/main/locale</path> > > > > <path>${basedir}/../../src/main/resources</ > > > path> > > > > <path>${basedir}/../../src/test/flex</path> > > > > > <path>${basedir}/../../src/test/resources</path> > > > </sourcePaths> > > > > <sourceFile>ProcessWorkbenchFlexView.mxml</ > > > sourceFile> > > > </configuration> > > > </plugin> > > > </plugins> > > > </build> > > > <dependencies> > > > . the usual . . > > > </dependencies> > > > </project> > > > > > Can anyone tell me how I can tell my MyProjectSWF pom.xml to redirect > > > my Flexbuilder artefacts up two directories? > > > > > Thanks! > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Flex Mojos" group. > > > To post to this group, send email to [email protected] > > > To unsubscribe from this group, send email to > > > [email protected]<flex-mojos%[email protected]> > <flex-mojos%[email protected]<flex-mojos%[email protected]> > > > > > For more options, visit this group at > > >http://groups.google.com/group/flex-mojos > > > > >http://flexmojos.sonatype.org/ > > -- > You received this message because you are subscribed to the Google > Groups "Flex Mojos" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<flex-mojos%[email protected]> > For more options, visit this group at > http://groups.google.com/group/flex-mojos > > http://flexmojos.sonatype.org/ > -- You received this message because you are subscribed to the Google Groups "Flex Mojos" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex-mojos http://flexmojos.sonatype.org/
