2009/1/16 David Leangen <op...@leangen.net> > > Ok, this helps. It is indeed maven-pax-plugin that is the cause > (indirectly) of my performance problems. > > If I do not include that plugin, my build time is 4:43. When I include > it, however, it slows to 27:07. Hmmmm.... >
and almost all of that time is spent unpacking various bits of bundles and massaging the manifest to get things in the right place for Eclipse/PDE... The problem is that if I don't include it, almost nothing will compile > in Eclipse. > > I do need to compile against bundles with embedded jars, but not all my > projects need this. I guess I'll need to break things down on a > project-by-project basis. > > Tell me again how this works in IDEA? You guys don't have these > problems, right? > you could also consider only running the full Maven build occasionally and using Eclipse's incremental compiler for while you're editing, etc. I mean the whole point of generating those files and pushing things around is to make Eclipse/PDE happy so that you can develop and compile in Eclipse without dropping back to Maven. if you're looking for full Eclipse-Maven integration I'd look at Tycho... Cheers, > =David > > On Fri, 2009-01-16 at 18:01 +0800, Stuart McCulloch wrote: > > 2009/1/16 David Leangen <op...@leangen.net> > > > > Thanks, Stuart, > > > > Just to clarify a few points of confusion on my part... > > > > Is it not sufficient to just use maven-bundle-plugin? Other > > than > > generating my Eclipse files, is there any purpose for using > > maven-pax-plugin? > > > > maven-pax-plugin provides the following enhanced (inherited) mojos: > > > > 1) enhanced Eclipse mojo (better .project / .classpath for OSGi > > projects) > > > > 2) enhanced compile mojo (can compile against bundles with embedded > > jars) > > > > the other mojos are related to project management and provisioning: > > > > > > http://www.ops4j.org/projects/pax/construct/maven-pax-plugin/index.html > > > > if you don't need 2) then there's no reason to enable the <extensions> > > for the pax-plugin... however, you should still keep the plugin > > definition > > in your pom.xml because it means you can use the short form: > > > > mvn pax:provision > > > > if you don't have the plugin in your pom Maven requires the long form: > > > > mvn org.ops4j:maven-pax-plugin:provision > > > > HTH > > > > > > Thanks! > > =David > > > > On Thu, 2009-01-15 at 22:49 +0800, Stuart McCulloch wrote: > > > > > > > 2009/1/15 David Leangen <op...@leangen.net> > > > > > > "Yo" to all, > > > > > > Question regarding maven build and OSGi stuff. > > > > > > I am now using maven-bundle-plugin along with > > maven-pax-plugin > > > for > > > almost all my projects. It works great! > > > > > > My only complaint is that the build is soooooooooo > > sloooooow. > > > The > > > culprit is mostly the generation of the manifests > > and the > > > Eclipse stuff. > > > > > > Any ideas how I could speed things up? > > > > > > What do peeps here usually do? > > > > > > (And no Eclipse wisecracks this time, please, I KNOW > > many of > > > you think I > > > should switch to IDEA. ;-) > > > > > > get a faster computer / more memory? > > > > > > [ seriously, this is sometimes the answer and can be cheaper > > in the > > > long run ] > > > > > > anyway, here are a few other options: > > > > > > 1) Maven pauses when it first loads the maven-pax-plugin > > lifecycle, > > > possibly > > > because there are several goals with quite a few > > parameters - > > > but as the > > > delay happens in Maven internals when parsing the > > plugin XML > > > there isn't > > > much we can do - none of our code is involved in this > > delay > > > > > > but you could try moving the <extensions> tag down > > from the > > > pax-plugin > > > to the bundleplugin section, this would disable > > certain pax > > > features (like > > > support for compiling against embedded jars) and may > > well > > > reduce the > > > initial delay as Maven then wouldn't load the > > pax-plugin > > > lifecycle > > > > > > [ you definitely don't need > > <extensions>true</extensions> on > > > *both* of the > > > plugin definitions like you have below, try with it > > just on > > > the bundleplugin > > > section and if that doesn't work move it back to > > the > > > pax-plugin section ] > > > > > > 2) upgrade to 1.4.3 of the maven-bundle-plugin, this > > version plugs > > > a few > > > leaks wrt. zip resources - your builds will use less > > memory & > > > less GC > > > > > > 3) add a profile to generate the files that you're > > finding slow > > > (Eclipse, etc.) > > > and move the relevant plugin executions into that > > profile - you > > > probably > > > don't need to keep regenerating these files all the > > time, just > > > once in a > > > while after some major coding - some people generate > > the > > > manifest > > > separately, save it, and then use it with the normal > > > maven-jar-plugin > > > > > > 4) as Toni suggested, check your repository settings - > > make sure > > > it's > > > not repeatedly trying to download some missing piece > > of > > > metadata > > > > > > if all else fails I'm afraid you would probably have to > > resort to > > > profiling the build > > > (the source is available online for anyone to use) - > > personally I > > > don't have any > > > spare time to spend on this :( > > > > > > another option is to look at the recent Tycho work as an > > alternative > > > solution: > > > > > > > > > > > > http://blogs.sonatype.com/people/2008/11/building-eclipse-plugins-with-maven-tycho/ > > > http://docs.codehaus.org/display/M2ECLIPSE/Tycho+project > > +overview > > > > > > HTH > > > > > > > > > Below are my plugin and pluginManagement sections of > > my master > > > pom. > > > > > > Thanks! > > > =David > > > > > > <plugin> > > > <groupId>org.ops4j</groupId> > > > <artifactId>maven-pax-plugin</artifactId> > > > <executions> > > > <execution> > > > <id>ide-support</id> > > > <goals> > > > <goal>eclipse</goal> > > > </goals> > > > </execution> > > > </executions> > > > </plugin> > > > > > > > > > <pluginManagement> > > > <plugins> > > > <plugin> > > > <groupId>org.apache.felix</groupId> > > > > > <artifactId>maven-bundle-plugin</artifactId> > > > <version>1.4.1</version> > > > <extensions>true</extensions> > > > <configuration> > > > <instructions> > > > > > <Bundle-DocURL>${pom.url}</Bundle-DocURL> > > > <_include>osgi.bundle</_include> > > > <Embed-Dependency>*;scope=compile| > > > runtime</Embed-Dependency> > > > </instructions> > > > </configuration> > > > </plugin> > > > <plugin> > > > <groupId>org.ops4j</groupId> > > > <artifactId>maven-pax-plugin</artifactId> > > > <extensions>true</extensions> > > > <version>1.3</version> > > > <configuration> > > > <classpathContainers> > > > > > > > > > <classpathContainer>org.eclipse.pde.core.requiredPlugins</classpathContainer> > > > <classpathContainer> > > > > > > > > > org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1 > > > .5 > > > </classpathContainer> > > > </classpathContainers> > > > </configuration> > > > </plugin> > > > <plugin> > > > <groupId>org.apache.felix</groupId> > > > <artifactId>maven-obr-plugin</artifactId> > > > </plugin> > > > </plugins> > > > </pluginManagement> > > > _______________________________________________ > > > general mailing list > > > general@lists.ops4j.org > > > http://lists.ops4j.org/mailman/listinfo/general > > > > > > -- > > > Cheers, Stuart > > > _______________________________________________ > > > general mailing list > > > general@lists.ops4j.org > > > http://lists.ops4j.org/mailman/listinfo/general > > > > > > _______________________________________________ > > general mailing list > > general@lists.ops4j.org > > http://lists.ops4j.org/mailman/listinfo/general > > > > > > > > > > -- > > Cheers, Stuart > > _______________________________________________ > > general mailing list > > general@lists.ops4j.org > > http://lists.ops4j.org/mailman/listinfo/general > > > _______________________________________________ > general mailing list > general@lists.ops4j.org > http://lists.ops4j.org/mailman/listinfo/general > -- Cheers, Stuart
_______________________________________________ general mailing list general@lists.ops4j.org http://lists.ops4j.org/mailman/listinfo/general