| Summary: | Tycho stacktraces when configuration is incorrect rather than reporting the problem | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Daniel Thomas <daniel.thomas> | ||||||
| Component: | Tycho | Assignee: | Tobias Oberlies <t-oberlies> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P2 | CC: | julien.henry | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Daniel Thomas
Thanks for reporting this. I totally agree that error handling could be better in many cases. And because we can't just go through the entire code for these kind of problems, it is good to get your examples of bad log messages. Created attachment 203332 [details]
Patch proposal
(In reply to comment #2) > Created attachment 203332 [details] > Patch proposal I think that perhaps there should be some sort of warning given for "the product publisher did not create the basedir. So there was no project definition file. Nothing to do." noting that they should check that they have a .product file in the right place - silent failure (which appears as success) being slightly more tedious than bailing with an exception. Fixed with 4633bd5. Thanks for the patch :-) I added an info log entry in case the the tycho-p2-director-plugin:materialize-products is configured, but there is no product file in the expected location. It is now supported to have materialize-products in the build, although there is no product file. This may be useful for templates/parent POMs. For your information I encountered the same stack trace for a totally different reason. In my corporate parent pom there is this snippet of XML to generate and attach source bundle to every artifact: <plugins> <!-- Force generation of source bundle even for SNAPSHOTS --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> But this configuration make the product generation fail because it seems the clean plugin is called during the forked execution so there is no more target folder when the materialize-products goal is called. Using jar-no-fork has fixed the issue but I spend lot of time to find the reason. May be good to display a better error message than NPE. For information I will attach the build output. Created attachment 205118 [details]
Tycho Maven output with NPE
|