Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] lifecycle-mapping for lesscss-maven-plugin

Thank you Fred! That works great.

 

From: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-bounces@xxxxxxxxxxx] On Behalf Of Fred Bricon
Sent: 28 November 2011 13:26
To: Maven Integration for Eclipse users mailing list
Subject: Re: [m2e-users] lifecycle-mapping for lesscss-maven-plugin

 

Alexis,

 

1 - Make sure your lifecycle-mapping definition is declared in the <pluginManagement> section of your pom.xml

 

2- The prepare-package phase is ignored by m2e. You should bind the less plugin execution to the process-resources phase instead

 

3- If you use m2e-wtp, I strongly suggest you change the output directory to target/m2e-wtp/web-resources/

 

I successfully ran the less plugin on incremental builds with the following configuration : 

 

                                    <plugin>

                                                <groupId>org.codehaus.mojo</groupId>

                                                <artifactId>lesscss-maven-plugin</artifactId>

                                                <version>1.0-beta-1</version>

                                                <executions>

                                                            <execution>

                                                                        <phase>process-resources</phase>

                                                                        <goals>

                                                                                    <goal>compile</goal>

                                                                        </goals>

                                                            </execution>

                                                </executions>

                                                <configuration>

                                                            <!-- No m2e connector for lesscss yet, working around by writing to 

                                                                        source dir -->

                                                            <!-- Changes to .less won't be seen until after a maven build -->

                                                            <sourceDirectory>${project.basedir}/src/main/webapp/less</sourceDirectory>

                                                            <outputDirectory>${project.build.directory}/m2e-wtp/web-resources/less</outputDirectory>

                                                            <compress>true</compress>

                                                </configuration>

                                    </plugin>

 

Regards,

 

Fred Bricon

On Mon, Nov 28, 2011 at 2:02 PM, Alexis Lee <alexis.lee@xxxxxxxxxxxx> wrote:

Hello list,

 

I’m trying to get the lesscss-maven-plugin to run on incremental build. I experimented with modifying the plugin but hit some snags; also this requires m2e 1.1 which is not yet released. I understand I can get a similar effect with m2e 1.0 by adding config to my project’s pom.xml, which I have done:

 

                  <plugin>

                        <groupId>org.eclipse.m2e</groupId>

                        <artifactId>lifecycle-mapping</artifactId>

                        <version>1.0.0</version>

                        <configuration>

                              <lifecycleMappingMetadata>

                                    <pluginExecutions>

                                          <pluginExecution>

                                                <pluginExecutionFilter>

                                                      <groupId>org.codehaus.mojo</groupId>

                                                      <artifactId>lesscss-maven-plugin</artifactId>

                                                      <versionRange>[1.0-beta-1,)</versionRange>

                                                      <goals>

                                                            <goal>compile</goal>

                                                      </goals>

                                                </pluginExecutionFilter>

                                                <action>

                                                      <execute>

                                                            <runOnIncremental>true</runOnIncremental>

                                                      </execute>

                                                </action>

                                          </pluginExecution>

                                    </pluginExecutions>

                              </lifecycleMappingMetadata>

                        </configuration>

                  </plugin>

 

Unfortunately this does not seem to work. Here’s the plugin configuration I’m using:

 

                  <plugin>

                        <groupId>org.codehaus.mojo</groupId>

                        <artifactId>lesscss-maven-plugin</artifactId>

                        <version>1.0-beta-1</version>

                        <executions>

                              <execution>

                                    <phase>prepare-package</phase>

                                    <goals>

                                          <goal>compile</goal>

                                    </goals>

                              </execution>

                        </executions>

                        <configuration>

                              <!-- No m2e connector for lesscss yet, working around by writing to source dir -->

                              <!-- Changes to .less won't be seen until after a maven build -->

                              <sourceDirectory>${project.basedir}/WebContent</sourceDirectory>

                              <outputDirectory>${project.basedir}/WebContent</outputDirectory>

<!--                          <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory> -->

                              <compress>true</compress>

                        </configuration>

                  </plugin>

 

Please could anyone help me?

 

 

Thanks in advance,

Alexis


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users



 

--
"Have you tried turning it off and on again" - The IT Crowd


________________________________________________________________________
This e-mail has been scanned for all viruses.
________________________________________________________________________


Back to the top