Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Tycho » Build with specific folders
Build with specific folders [message #661914] Mon, 28 March 2011 10:09 Go to next message
Jonathan Dumont is currently offline Jonathan Dumont
Messages: 55
Registered: March 2011
Location: Laval
Member
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 #661920 is a reply to message #661914] Mon, 28 March 2011 10:20 Go to previous messageGo to next message
Jan Sievers is currently offline Jan Sievers
Messages: 23
Registered: July 2009
Junior Member
build.properties defines the source folders used by both PDE and tycho:
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. pde.doc.user/guide/tools/editors/manifest_editor/build.htm

While it is possible to use "standard" Maven source folder names
(src/main/java, src/main/resources) , it is probably more convenient to
stick witht the src/ folder which the PDE plugin creation wizard creates for
you.
BTW separate source folders for .java files and non-java resources which
maven encourages are not needed for tycho.
You can mix source files and resource files in the same source folder.

Regards,
Jan


"jod" <jod@all4tec.net> wrote in message
news:imq4e4$6lm$1@news.eclipse.org...
> 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 10:54 Go to previous messageGo to next message
Jonathan Dumont is currently offline Jonathan Dumont
Messages: 55
Registered: March 2011
Location: Laval
Member
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). Confused

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 04:18 Go to previous messageGo to next message
Jan Sievers is currently offline 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 ?
>
>
>
Re: Build with specific folders [message #662317 is a reply to message #662310] Wed, 30 March 2011 05:00 Go to previous message
Jonathan Dumont is currently offline Jonathan Dumont
Messages: 55
Registered: March 2011
Location: Laval
Member
Thanks for the infos.

I will try and warn you of my success (or not Very Happy ) as soon as possible


Previous Topic:config.ini - osgi.splashPath
Next Topic:Features versions in .product file
Goto Forum:
  


Current Time: Thu Aug 21 06:30:48 EDT 2014

Powered by FUDForum. Page generated in 0.08258 seconds