Community
Participate
Working Groups
Build Identifier: Suppose you're building a product for win32 and later decide to build it for linux as well. tycho-compiler-plugin and tycho-packaging-plugin are then executed again. But if you know that nothing has changed in between, it would be nice to be able to skip execution of these plugins. This is a little bit related to the following maven issue: http://jira.codehaus.org/browse/MNG-3321 Reproducible: Always
(In reply to Michel Krämer from comment #0) Agreed. In a complex product with many Maven modules, a reliable incremental build capability is important, as are any build performance enhancement measures. Maven doesn't have any built-in support for up-to-date checking and this is generally the responsibility of individual plug-ins. However, many plug-ins do not or cannot efficiently determine up-to-date-ness (for example, it's hard to see how tycho-compiler-plugin could determine this without launching Eclipse). Now, it is a well-established pattern for a Mojo's configuration to include a 'skip' property. I contributed the uptodate-property and uptodate-properties goals to the popular org.codehaus.mojo:build-helper-maven-plugin - these goals can check output files for up-to-date-ness with respect to their source files and set a boolean property which can then be used to skip a subsequent plug-in execution if it has been determined that it is not required. So, please may we have 'skip' configuration properties for ALL Tycho goals? It should be simplicity itself to implement. Thanks!
(In reply to Michel Krämer from comment #0) > Build Identifier: > > Suppose you're building a product for win32 and later decide to build it for > linux as well. tycho-compiler-plugin and tycho-packaging-plugin are then > executed again. But if you know that nothing has changed in between, it > would be nice to be able to skip execution of these plugins. tycho-compiler-plugin will only compile source file that are newer than their respective .class files. If you change nothing and omit the clean lifecycle, it's a nop: [DEBUG] Output directory: /Users/d037913/git/eclipse/org.eclipse.tycho-demo/itp01/tycho.demo.itp01.tests/target/classes [INFO] Nothing to compile - all classes are up to date Similarly, tycho-packaging plugin should support <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-packaging-plugin</artifactId> <version>${tycho-version}</version> <configuration> <archive> <forced>false</forced> </archive> </configuration> </plugin> which should update the jar file with changed files only, see [1]. For now this has been disabled due to a bug with source jars with commit https://github.com/sonatype/sonatype-tycho/commit/93636a86c19c488602d64543a93bf0494d0d2894 may revisit this and add proper support for jar file updating. [1] https://maven.apache.org/shared/maven-archiver/
Correct incremental java compilation is hard and from a quick look I believe Tycho does not do it right. It seems to completely ignore changes to compilation classpath, so build results may be wrong when project dependencies change. Even within the project, Tycho compiler ignores changes to referenced types and may not recompile sources it should. It may also leave stale .class files if project sources happen to use secondary types. My recommend always using "clean" with Tycho builds.
Eclipse Tycho is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/tycho/issues/ instead. If this issue is relevant to you, your action is required. 0. Verify this issue is still happening with latest Tycho 2.4.0-SNAPSHOT if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done if issue is still present when latest release: * Create a new issue at https://github.com/eclipse/tycho/issues/ ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience) ** In the GitHub description, start with a link to this bugzilla ticket ** Optionally add new content to the description if it can helps towards resolution ** Submit GitHub issue * Update bugzilla ticket ** Add to "See also" property (up right column) the link to the newly created GitHub issue ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>" ** Set status as CLOSED MOVED ** Submit All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for Tycho will be archived and made read-only.