Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Need ways to avoid moving lot of files many times during the build

Have you tried defining your ckeditor dependency as a war overlay?

If you unpack/copy anything to ${project.build.directory}/m2e-wtp/web-resources/, that will be deployed by WTP (you need to make sure the workspace sees the file changes). You can use maven profiles to switch the unpack location depending on whether you're building in m2e or via CLI (something similar to https://github.com/sonatype/m2eclipse-wtp/wiki/How-do-I-add-my-web-project-classes-to-another-project-classpath%3F)


On Wed, Nov 30, 2011 at 2:25 PM, Sebastien Tardif <SebTardif@xxxxxx> wrote:

I’m unable to find a way to unpack a jar to a specific location in one step. Ideally, in  maven-war-plugin, I should be able to ask to get something unpack to a specific location. Right now I need to use maven-dependency-plugin to unpack in location x, then maven-war-plugin move it to another location (m2e-wtp) before compressing. Of course, moving the file to (m2e-wtp) could have be skipped, it’s not that hard to create a war/jar file from files from different location or publish to a server from files from different location.

 

If at least a “stable” property existed that work in both maven command line and m2e that represent folder like “m2e-wtp”, I could have unpack the files directly there when using maven-war-plugin.

 

Am I the only one doing enterprise application? It seems in all projects I work with I always find myself with slow Eclipse due to the size of my project.

 

Even when these maven steps are optimized it seems to be very difficult to find server support that do not require to “publish” the entire files to the server location. That’s insane.

 

<plugin>

                                                                <groupId>org.apache.maven.plugins</groupId>

                                                                <artifactId>maven-dependency-plugin</artifactId>

                                                                <version>2.3</version>

                                                                <executions>

                                                                                <execution>

                                                                                                <id>unpack</id>

                                                                                                <phase>package</phase>

                                                                                                <goals>

                                                                                                                <goal>unpack</goal>

                                                                                                </goals>

                                                                                                <configuration>

                                                                                                                <artifactItems>

                                                                                                                                <artifactItem>

                                                                                                                                                <groupId>com.onassignment.ops.externals</groupId>

                                                                                                                                                <artifactId>ckeditor</artifactId>

                                                                                                                                                <version>3.5</version>

                                                                                                                                </artifactItem>

                                                                                                                </artifactItems>

                                                                                                                <includes>**/*</includes>

                                                                                                                <overWriteReleases>false</overWriteReleases>

                                                                                                                <overWriteSnapshots>true</overWriteSnapshots>

                                                                                                                <outputDirectory>${project.build.directory}/root</outputDirectory>

                                                                                                </configuration>

                                                                                </execution>

                                                                </executions>

                                                </plugin>

 

                                                <plugin>

                                                                <groupId>org.apache.maven.plugins</groupId>

                                                                <artifactId>maven-war-plugin</artifactId>

                                                                <version>2.1.1</version>

                                                                <configuration>

                                                                                <overlays>

                                                                                                <overlay>

                                                                                                                <groupId>com.adobe.coldfusion</groupId>

                                                                                                                <artifactId>coldfusion</artifactId>

                                                                                                </overlay>

                                                                                                <overlay>

                                                                                                                <groupId>com.adobe.coldfusion</groupId>

                                                                                                                <artifactId>rds</artifactId>

                                                                                                </overlay>

                                                                                </overlays>

                                                                                <webResources>

                                                                                                <resource>

                                                                                                                <directory>${project.build.directory}/root</directory>

                                                                                                </resource>

                                                                                                <resource>

                                                                                                                <directory>/src/main/resources</directory>

                                                                                                </resource>

                                                                                </webResources>

 

                                                                </configuration>

                                                </plugin>


_______________________________________________
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

Back to the top