Hi Christofer,
Thanks for replying, I managed to solve the problem and posted a
follow up but for some reason the message didn't end up on the list.
Here's how I got it to work.
In the css project:
......................
<artifactId>css</artifactId>
<packaging>swc</packaging>
<name>css</name>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flexmojo.version}</version>
<extensions>true</extensions>
<configuration>
<includeStylesheet>
<stylesheet>
<name>defaults.css</name>
<path>src/defaults.css</path>
</stylesheet>
</includeStylesheet>
</configuration>
</plugin>
</plugins>
And in the GUI project:
<dependencies>
<dependency>
<groupId>....</groupId>
<artifactId>mxml</artifactId>
<type>swc</type>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>.....</groupId>
<artifactId>css</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>theme</scope>
<type>swc</type>
</dependency>
</dependencies>
</project>
And it works. What I didn't realise (having never created a theme
before) was that the css file had to be called defaults.css (note the
plural).
On Feb 1, 9:25 am, Christofer Dutz <[email protected]>
wrote:
> How did you create your Theme? Could you please post that pom.
> I think the problem is related to a theme.swc that is not built correctly.
>
> Chris
>
> 2011/1/29 bryan hunt <[email protected]>
>
> > Hi there,
>
> > Firstly forgive me, I am neither a flexmojos or flex component expert so
> > I may be asking some stupid questions here.
>
> > I've spend the last couple of days trying various combinations of things
> > and feel perhaps it's the right time to just ask the community.
>
> > I want to create themes, I want to create them as swc's.
>
> > I want to be able to work on them completely independently of my other
> > work.
>
> > For example I'm working on one right now.
>
> > I want to be able to express it as a project dependency in the pom file
> > and without any hardcoded css references in my mxml files have every
> > widget turn green.
>
> > Is this possible? In my desktop pom file, I place:
>
> > <build>
> > <plugins>
> > <plugin>
> > <groupId>org.sonatype.flexmojos</groupId>
> > <artifactId>flexmojos-maven-plugin</artifactId>
> > <version>${flexmojo.version}</version>
> > <extensions>true</extensions>
> > <configuration>
> > <themes>
> > <theme>main.css</theme>
> > </themes>
> > etc etc
> > <dependency>
> > <groupId>senti.f</groupId>
> > <artifactId>css</artifactId>
> > <version>1.0-SNAPSHOT</version>
> > <scope>theme</scope>
> > <type>swc</type>
> > </dependency>
>
> > And I get an exception:
>
> > [INFO]File main.css not found
> > [ERROR] Build failed ...etc
>
> > But if I comment out the themes section and add a line like this:
> > <mx:Style source="main.css"/>
>
> > To my main.mxml file, everything works fine.
>
> > I don't want to have to reference my stylesheet from every mxml file, I
> > just want to create a theme swc and by including it override all the
> > defaults.
>
> > Am I on the right path at all?
>
> > Thanks,
>
> > Bryan
>
> > --
> > 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/