[RELENG-89] Dependencies script should detect profiles and commented out code Created: 09/Apr/18 Updated: 17/Aug/20 |
|
| Status: | In Progress |
| Project: | releng |
| Component/s: | Autorelease, Jenkins Job Builder |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Medium |
| Reporter: | Thanh Ha (zxiiro) | Assignee: | Anil Belur |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The code that generates the dependencies.log needs to be able to handle profiles and commented out code. A first step should be the comments as its easier. Profiles will be more difficult as we can't be sure if it's activated or not but maybe assume it's activated and then if <activeByDefault>false</activeByDefault> then ignore (Although there's other cases where it needs to ignore too). |
| Comments |
| Comment by Anil Belur [ 11/Apr/18 ] |
|
zxiiro Please share some github links on existing commented lines in the projects, unable to find them? > Profiles will be more difficult as we can't be sure if it's activated or not but maybe assume it's activated and then if <activeByDefault>false</activeByDefault> then ignore (Although there's other cases where it needs to ignore too). Assuming its active, assumes that the project is included in the list and exclude them if its set to `false`, but need to understand why we can't check simply check the poms for `<activeByDefault>true</activeByDefault>`. |
| Comment by Thanh Ha (zxiiro) [ 11/Apr/18 ] |
|
Regarding commented out code This comes in 2 forms: 1. A module that is not even listed as a module to build In this case it is not commented out code, the project just did not declare the module. It's similar to how in autorelease we have a modules list: https://github.com/opendaylight/releng-autorelease/blob/master/pom.xml You can disable a project from building by simply just removing it from the pom. I don't have an example off hand but I've seen it. 2. Using XML <!-- comment --> flag This one is easier to detect as it has a specific syntax. For example: This is the most common way projects disable things in their own projects. Regarding profiles We can not assume <activeByDefault> because it is only one of many activation/deactivation methods of Maven. https://maven.apache.org/guides/introduction/introduction-to-profiles.html Additionally without inspecting the profile we cannot tell what is even in the profile as there are many things Maven pom.xml files support in a profile. |