[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [egit-dev] How to build [EJ]Git?
|
On 2010-01-06, at 11:01 AM, Shawn O. Pearce wrote:
> Jason van Zyl <jason@xxxxxxxxx> wrote:
>>
>> Though I think creating a BND file which represents the final
>> manifest would be better because then you don't have the to the
>> JAR scanning in order to create the manifest.
>
> I don't know. You can pick up the MANIFEST files with
>
> mvn process-classes
>
> Which yea, does require building the class files first, but that's
> still pretty fast. No JAR'ing required.
>
Sorry, I meant processing the classes.
>> A BND file is honestly nicer to look at then
>> manifest.
>
> Hmm. They look the same to me [1]. I'm not sure there is much
> benefit to the BND file, vs. just adding the instructions to the
> maven-bundle-plugin like we've already done in the pom [2].
>
You don't have to worry about the formatting which humans can't really do without PDE.
> [1] http://blog.springsource.com/2008/02/18/creating-osgi-bundles/
> [2] http://egit.eclipse.org/w/?p=jgit.git;a=blob;f=org.eclipse.jgit/pom.xml;h=9b1c59f2cda9035732bbdd9cf6a6ee245eab0a4d;hb=8067494103b4dc8c2136a4fa30ffb2991e72e8ed
>
>> What this will allow us to do is create a non-expensive
>> way to have JGit and EGit in the Eclipse workspace without having to
>> constantly generate the manifest in the pom-first JGit project.
>
> Building the class files is expensive?
>
No, the scanning the BND has to do of the classes to produce the manifest. My argument here is that even though you don't want a manifest-first build that if you maintain a BND file, or just the MANIFEST as that's even easier, then that will obviate any calculation of the manifest and it will be easier to integrate with EGit. I just figured that would be easier then having BND generate the manifest even when it doesn't change that often. I actually don't know how smart BND is, and what it does the cache partial results.
> Eclipse does that as soon as I import the code into the workbench.
>
> If I'm developing this project, dammit, I need the code compiled
> into bytecode so I can execute its tests.
>
> I guess I can call it expensive to run both the Maven compiler *and*
> the JDT compiler on the same project during import. But only one
> is really necessary.
>
I'm talking more about the JGit and EGit in the same workspace. If we want PDE to understand both the POM-first and manifest-first projects then PDE must have a manifests for both. If you're making changes to both in the workspace then the generated manifest for JGit needs to be kept up-to-date in order for PDE to function properly. Hacking away on JGit and the manifest not being generated/update correctly won't play nice with the EGit project.
>> We
>> just have to settle on the approach as the JGit build the way it
>> is does not make it work well with PDE or Tycho. Pick your poison
>> we'll adjust Maven and Tycho.
>
> In my dream world, the m2eclipse plugin would have configured the
> project builder to run process-classes plugins in Maven after the
> Eclipse JDT ran on that project, so post-processing can be done
> correctly, no matter what the plugin was doing.
>
Sure, we can make a configurator in M2Eclipse for this. That's not a problem.
> E.g. AspectJ plugins must also register on process-classes phase
> in order to do their code stitching. Under m2eclipse you might
> be able to enable the Eclipse AspectJ builders... but if you don't
> know about them you'd still want to fire the standard Maven plugin
> so the project at least works correctly when executed. No?
>
> So I guess my question here is, why isn't the maven-bundle-plugin
> being fired by m2eclipse? Or is it being fired, its just firing
> too late to matter to the PDE?
We need to make a configurator and probably some other bits to make pom-first and manifest-first projects work together. As I said, we're happy to do the work because this pattern is going to crop up again and again. Just decide what you want, then be patient, and we'll fix it.
>
> --
> Shawn.
> _______________________________________________
> egit-dev mailing list
> egit-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/egit-dev
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
http://twitter.com/jvanzyl
----------------------------------------------------------
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
http://twitter.com/jvanzyl
----------------------------------------------------------