Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Resolve Maven plugin dependencies from target platform?

Hi Andreas,

it is a ‘feature’ of EMF’s Ecore generator (used by Xcore) to touch the MANIFEST.MF.
I guess it is best to file a bugzilla against EMF (Xcore component) and discuss your use case there.

Sven

> On 07 Nov 2014, at 12:31, Andreas Sewe <andreas.sewe@xxxxxxxxxxxxxx> wrote:
> 
> Hi Sven,
> 
> thank you for your reply.
> 
>> there is no inherent coupling between the libs needed by the plugin and the libs needed by the generated code.
>> It is just that you are generating an Xtext language infrastructure using an Xtext language infrastructure (i.e. the *.xtext grammar language).
>> So of course the dependencies are very alike, but this is just a result of the bootstrapping. There are clear version constraints for both the plugin and the
>> generated bundle projects. I hope this is understandable.
> 
> Maybe you can shed some more light on the way versions are handled.
> 
> I have an Xcore model like the following [1]. Using the
> xtext-maven-plugin defined in my pom.xml [2] takes this model as input
> and generates Java code based on the Xcore language definition found in
> the plugin's dependencies. This Java code assumes that the Xcore runtime
> library in a certain version (range) is present. Correct?
> 
> Now, as far as I know, you can leave it to Xtext to rewrite the
> MANIFEST.MF and add the appropriate version ranges:
> 
>  @GenModel(bundleManifest="true")
> 
> Even if this directive would work with the xtext-maven-plugin (it has no
> effect in my build. Bug?), letting the code generation step rewrite the
> MANIFEST.MF clashes with with the way Tycho works (at least to my
> limited understanding of Tycho). By the time the rewrite happens Tycho
> has already read the old, non-rewritten MANFIEST.MF and build its mental
> model of the project dependencies based on that.
> 
> Moreover, whatever the xtext-maven-plugin generates during a "mvn clean
> install" normally just won't be checked into SCM.
> 
> So, automatically letting the code generator fill in the version ranges
> in the MANIFEST.MF doesn't seem to work well -- at least not during the
> code-generation step part of a "mvn clean install".
> 
> What is the recommended workflow then? Trigger code generation manually
> every once in a while and explicitly check in the generated MANIFEST.MF?
> 
>> I still see that it would be convenient to reuse the dependency definitions but I don’t see how we could do something for that in Xtext.
> 
> One way would be let Tycho resolve the xtext-maven-plugin's dependencies
> to the bundles defined in the target platform (hence my original
> question), but as Igor said this might be hard/impossible.
> 
> Best wishes,
> 
> Andreas
> 
> [1]
> <https://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/tree/plugins/org.eclipse.recommenders.stacktraces.model/models/stacktraces.xcore?id=v2.1.10>
> [2]
> <https://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/tree/plugins/org.eclipse.recommenders.stacktraces.model/pom.xml?id=v2.1.10>
> 
> -- 
> Codetrails GmbH
> The knowledge transfer company
> 
> Robert-Bosch-Str. 7, 64293 Darmstadt
> Phone: +49-6151-276-7092
> Mobile: +49-170-811-3791
> http://www.codetrails.com/
> 
> Managing Director: Dr. Marcel Bruch
> Handelsregister: Darmstadt HRB 91940
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top