Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] How to set executable bit (chmod 755) on non-root files?

>I've tried "faking it" as a root file, and using things like 
>root.hpux.gtk.ia64.permissions.755=eclipse,**/*.so 
>But that had no effect. (Well, the eclipse executable is set correctly, but not the so file). 

p2 itself has no wildcard support in terms of p2 chmod instructions.
Wildcards are resolved into p2 instructions during build at feature package time so they only apply to actual root files declared in the feature being built.
Long story short, faking root files won't work here.

>Honestly, at this point, I'd be happy to use maven-antrun-plugin to call chmod right before packaging, but I'm too much a novice to know 
>how to get that to execute at the right point in time (after "on disk", but before zipping up). Is there a special "phase" I could associate it with? 

I would try to get in between the director call ("materialize-products") installing the product and the archiver creating the tar.gz ("archive-products") as in [1]
with a maven-antrun chmod task execution.

Unfortunately both goals materialize-products and archive-products are assigned to maven lifecycle phase [2] "package" by default.
One option would be to move materialize-products to earlier phase "prepare-package" and then do your chmod in phase "package".
Mmake sure the chmod antrun execution is declared before archive-products in terms of XML as they are both in phase "package" and IIRC in this case XML declaration order is significant for execution order.

IMHO Tycho should be more flexible here but right now this is what you can do.

Regards,
Jan

[1] http://git.eclipse.org/c/tycho/org.eclipse.tycho-demo.git/tree/itp04-rcp/eclipse-repository/pom.xml 
[2] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference 




Back to the top