How do you extend Tycho OSGi Packaging Plugin timestamp logic? #2255
Replies: 4 comments 4 replies
-
May I ask if you really want to write your own provider or do you want to change the current default for timestamps (e.g. formatting etc.?) |
Beta Was this translation helpful? Give feedback.
-
I'm am involved in the same project as the original poster. The issue I am having is that, although writing such a provider is easy by using the tycho-buildtimestamp-jgit as an example, the issue is how to build, test and install the plugin into Tycho. Is there any documentation available that describes these steps? That is, is there any documentation available that describes how a 3rd party can build and deploy a custom tycho plugin? I have looked at https://github.com/eclipse-tycho/tycho/blob/master/CONTRIBUTING.md and have loaded the tycho code base and created a timestamp provider that compiles but, as I mentioned above, I haven't found anything on-line that describes the next steps. On a side note, on the CONTRIBUTING page, in the manual steps. there is the following text that mentions a target but the target does not seem to exist in the load code. Was the name of the target changed? "For Tycho only: Configure the target platform: Open the file tycho-bundles-target/tycho-bundles-target.target and click on Set as Target Platform in the upper right corner of the target definition editor." |
Beta Was this translation helpful? Give feedback.
-
Thanks for you quick response. I suspect you are assuming that I have a higher level of Maven/Tycho knowledge then I have. We recently upgraded our build from a pure PDE build to a Tycho build so Maven/Tycho is new to us. The step I am uncertain about is the "build a simple jar" step. How do I build the jar and how do I deploy it so that the pom you mentioned in your comment will be able to find it? Is there any documentation that describes that process for a 3rd party Tycho plugin? Do I need to use the mvn command line to do that or is there commands available in Eclipse? It seems that install Maven plugins are in the .m2 folder. If I have the Tycho code loaded in Eclipse, is there an Eclipse command or build I can run that will build and install Tycho into my local .m2 folder so I can then test my code? Or is this something I also need to use the command line for? |
Beta Was this translation helpful? Give feedback.
-
Thanks again. I think I get the gist of it now. |
Beta Was this translation helpful? Give feedback.
-
The documentation states that :The timestamp generation logic is extensible. The primary use case is to generate build version qualifier based on the timestamp of the last project commit." But it does not give any examples or clues about how to do this. Do you create a java class/jar? If so, what is it supposed to do? What input does it get? Where do you define it? What are the requirements? etc.
Details please.
And an example would be nice.
Beta Was this translation helpful? Give feedback.
All reactions