Build with specific folders [message #661914] |
Mon, 28 March 2011 14:09 |
|
Hi,
I try to build an Eclipse RCP application with Tycho. In my plugins projects, I have a pom with the eclipse-plugin packaging.
May it was a mistake, but I've tried to follow the "standard" Maven architecture in my plugins projects with the folders :
- src/main/java
- src/main/statics/
- ...
Tycho find my .java and put in the final jar a com folder with the .class. Good. But my problem is that all what is under statics is not included in my build.
My questions are :
- How can I explain to Tycho which are the folders to use for my build ?
- Is it a good strategy to use the "standard" Maven folders in an RCP application ?
|
|
|
|
Re: Build with specific folders [message #661944 is a reply to message #661920] |
Mon, 28 March 2011 14:54 |
|
Thanks for your quick reply.
Thus, if I want to use others folders, I must define my built in the build.properties file. (Or use a custom build definition).
I will try to stick with the folders given PDE plugin creation by the wizard, at least for images, icons, etc.
But if I want to use the filters strategy allowed by Maven, to build some properties file according to my build profile, how can I do ?
I've thought to define a specific resources files in my pom.xml, with filtering, and include it in the binary part of my build.properties.
<build>
<resources>
<resource>
<directory>/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
Is it a good solution ?
|
|
|
Re: Build with specific folders [message #662310 is a reply to message #661944] |
Wed, 30 March 2011 08:18 |
Jan Sievers Messages: 23 Registered: July 2009 |
Junior Member |
|
|
Although it is configured in tycho's default build lifecycles, I did not try
resource filtering yet.
The problem is that any resources found in source folder in build.properties
will be copied by maven-osgi-compiler-plugin to target/classes/ *without*
any filtering (this is what PDE build does).
So you will have to make sure maven-resources-plugin and
maven-osgi-compiler-plugin do not compete for copying the same resources.
You can try to
- configure a resource dir in pom.xml with filtering
- make sure the same resource dir is not a source dir in build.properties
Note that tis will only work in eclipse if you use m2eclipse to import your
project and make sure maven resource filtering runs during eclipse
incremental build.
Let us know if this works for you.
Regards,
Jan
"jod" <jod@all4tec.net> wrote in message
news:imq72j$b53$1@news.eclipse.org...
> Thanks for your quick reply.
>
> Thus, if I want to use others folders, I must define my built in the
> build.properties file. (Or use a custom build definition). :?
> I will try to stick with the folders given PDE plugin creation by the
> wizard, at least for images, icons, etc.
>
> But if I want to use the filters strategy allowed by Maven, to build some
> properties file according to my build profile, how can I do ?
>
> I've thought to define a specific resources files in my pom.xml, with
> filtering, and include it in the binary part of my build.properties.
>
>
> <build>
> <resources>
> <resource>
> <directory>/resources</directory>
> <filtering>true</filtering>
> </resource>
> </resources>
>
> Is it a good solution ?
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03296 seconds