| Summary: | buildQualifier parameter also updates non qualifier Bundle-Version | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Anthony Dahanne <anthony.dahanne> | ||||||
| Component: | Tycho | Assignee: | Project Inbox <tycho-inbox> | ||||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | bsd, igor, markward.schubert | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Anthony Dahanne
Created attachment 207934 [details]
the simple example to demonstrate the bug
just a thought about the resolution :
I think that if we add :
if (version.getQualifier() != null && !version.getQualifier().equals("qualifier")) {
project.setContextValue(TychoConstants.CTX_EXPANDED_VERSION, version);
return;
}
to
https://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/DefaultReactorProject.java#n169
that should fix it. (ok ok, the "qualifier" string should be shared; it is already the case... in org.eclipse.tycho.buildversion.VersioningHelper that depends on ... tycho-core :-( )
what do you think ?
I think I'll be happy to review&apply a patch that includes the fix and corresponding unit/integration tests ;-) Created attachment 208015 [details]
Patch providing both the fix and the associated it test
This provided patch fixes the bug.
I don't think it creates any regression (some it tests never run on my machine...)
I hope reviewing this patch will make you happy ;-)
Have a good day !
Wow !
seems like I got a total misunderstanding of the build qualifier...
the env. variable "buildQualifier" is only used internally and should not be used when launching maven.
instead, using the build qualifier goal of the tycho-packaging-plugin takes care of everything.
with this snippet in the parent :
<plugin>
<!-- Generates the build qualifier and expose a property named 'buildQualifier' -->
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>build-qualifier</id>
<goals>
<goal>build-qualifier</goal>
</goals>
<phase>validate</phase>
<configuration>
<format>${build.qualifier}</format>
</configuration>
</execution>
<execution>
<id>packaging</id>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</execution>
</executions>
</plugin>
a -Dbuild.qualifier=M01 will put M01 as a qualifier and will not update the fixed versions.
I'd like to document this somewhere so that other users may know; can I create a wiki page for that ? (TychoAndBuildQualifier page in tycho wiki)
(In reply to comment #5) > > I'd like to document this somewhere so that other users may know; can I create > a wiki page for that ? (TychoAndBuildQualifier page in tycho wiki) Yes, by all means document this, wiki.eclipse.org is open for everybody. I added a note to http://wiki.eclipse.org/Tycho/FAQ Marking this as RESOLVED WONTFIX. Thanks Brian, I forgot to document, will do better next time ;-) |