All,
I hate it when I get so fixated on a problem (In this case figuring
out how to "exclude source") that I cannot see the bigger picture
anymore. Even with my ant example I didn't see it, but It occurred
to me this morning that all I need to do is include only the files I
want from resource. I'd like to thank you all for not rubbing my
nose in it. ;)
Unfortunately, it won't work. Explicitly including the files adds
them to the root of the jar (one is specifying the root to include).
Furthermore, I seem to have erred in one of my experiments, and the
build.properties content:
bin.includes = .,\
META-INF/
source.. = src/
src.excludes = */.svn/*
still yields the entire "resource" contents in the jar. This is
probably due to the following placed in the build section of the
pom:
<resources>
<resource>
<directory>.\resource</directory>
</resource>
</resources>
So it appears I am dealing with the union of Maven and Tycho
interpreted Eclipse functionality (removing that section, removes
the resources).
Therefore, I still need to figure out how to exclude resources, and
then only implement that solution in one methodology. So I'm still
interested in how other projects have resolved this.
-Eric
On 3/8/2011 2:49 PM, Eric Gwin wrote:
Igor,
On 3/8/2011 12:54 PM, Igor Fedorenko wrote:
What
Tycho version do you use?
0.10.0
Can
you point me at the project that has
this problem?
I'm working on a branch called MTPC of the EclipseLink project.
Specifically on the core bundle
(foundation/org.eclipse.persistence.core) as it has the fewest
dependencies.
I've been able to experiment further and have determined that the
reason I was getting duplicate resources in the "resource/.." path
was that I had selected the resource/ and other dirs for inclusion
in the binary build on the build configuration settings page in
Eclipse. This apparently needs to be done to include the manifest,
and would probably work for other files in the root of the project
to get into the root of the jar, but it directly includes the
selected files into the jar (1:1 mapping of the project path to
the jar).
While "source.. = src/" in the build properties is necessary to
include the classes in the jar, and
"source.. = src/, resource/" will include the classes and map
everything under resource/ into the jar
The latter works pretty well, but we use the resource dir to
include many types of resources - some are not intended for bundle
inclusion (ie. compile-time only, etc), so I'm hoping I'll find a
way to exclude source as well. I've yet to uncover any
documentation that lists the supported parameters in
build.properties. (I did try "excludesource.. =
resource/source-bundle/" and it doesn't work... <g>). Though
I'm suspecting we may need to reorganize our project directory
hierarchy to proceed.
Basically I'm trying to duplicate using Tycho what the following
would do in ant:
<jar
jarfile="${core.2.common.plugins.dir}/${ant.project.name}_${version.string}.jar"
manifest="${manifest.dir}/MANIFEST.MF">
<fileset dir="${core.2.base.dir}">
<include name="about.html"/>
<include name="readme.html"/>
<include name="license.*"/>
</fileset>
<fileset dir="${classes.dir}">
<include
name="org/eclipse/persistence/**/*.class"/>
</fileset>
<fileset dir="${resource.dir}">
<include name="xsd/*.xsd"/>
<include
name="org/eclipse/persistence/internal/helper/VendorNameToPlatformMapping.properties"/>
</fileset>
</jar>
Thanks,
-Eric
--
Regards,
Igor
On 11-03-08 10:13 AM, Eric Gwin wrote:
Hi,
I'm looking for tips/tricks to controlling the contents of the
bundle
that Tycho generates. Since it directly relates to building
Eclipse
projects, so I thought I'd ask here before I dug further into
the
various docs.
Basically, it is my understanding that Tycho uses the
build.properties
file to determine where to get the manifest files, and the
generated
classes, more than likely the same is true of the various
resources that
need to be shipped in the jar. However, I'm having issues
where the
resources are being included both within the package structure
of the
jar AND the resources/org/eclipse/persistence.... hierarchy.
I'm also trying to replicate the inclusion of the root
license, readme
and about html files but other than by copying them to each
plugin
project I cannot seem to replicate the appropriate pathing
in-jar (I'd
rather have them in a single project and share the files
across multiple
plugin projects. I've reviewed some other project pom files
but that
haven't found the control mechanism.
Can anyone provide me with some pointers?
--
-Eric
Oracle <http://www.oracle.com>
Eric Gwin | Senior Software Developer
Phone: +613 288 4622 <tel:+613%20288%204622> | | Fax:
+613 2382818
<fax:+613%202382818> | | Mobile: +613 8582347
<tel:+613%208582347>
Oracle Java Server Technologies
ORACLE Canada | 45 O'Connor St., Ottawa, Ontario | K1P 6L2
Green Oracle <http://www.oracle.com/commitment>
Oracle is committed to
developing practices and products that help protect the
environment
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
--
-Eric

Eric Gwin | Senior Software Developer
Phone: +613 288 4622 | | Fax: +613
2382818 | | Mobile: +613 8582347
Oracle Java Server Technologies
ORACLE Canada | 45 O'Connor St., Ottawa, Ontario | K1P 6L2
Oracle is
committed to developing practices and products that help
protect the environment
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
--
-Eric

Eric Gwin | Senior Software Developer
Phone: +613 288 4622 | |
Fax: +613 2382818 | |
Mobile: +613 8582347
Oracle Java Server Technologies
ORACLE Canada | 45 O'Connor St., Ottawa, Ontario | K1P 6L2
Oracle is committed to developing practices and
products that help protect the environment
|