Bug 20361 - [jar exporter] package.html should not be exported with ".class + resources"
Summary: [jar exporter] package.html should not be exported with ".class + resources"
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-06-14 12:25 EDT by Andreas Krüger CLA
Modified: 2009-08-30 02:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Krüger CLA 2002-06-14 12:25:57 EDT
As is the custom, I have my package.html files together with those .java files
in the package directories.

No I ask Eclipse to export a binary JAR file.  That is, a JAR-archive with
"export generated class files and resources", but NOT with "export Java source
files and resources".  In this case, the GUI by default threatens to export
package.html.

But package.html is a source file kind of an animal, not a resource file kind of
an animal.  So I don't want it to be exported on a binary export.

What I'm saying is, the GUI should, by default, export "package.html" files
together with .java files, not together with .classe files, neither together
with resources.
Comment 1 Dirk Baeumer CLA 2002-06-14 12:28:13 EDT
Good point but for 2.0 we are in a mode where we only consider critical bug 
fixes. 

Postponing > 2.0
Comment 2 Dani Megert CLA 2002-08-19 09:45:10 EDT
Would a third option (unchecked by default) solve your problem:
[] Export package.html
?

Please note that we can't filter "overview.html" since this is only a proposed
name and not a rule.
Comment 3 Andreas Krüger CLA 2002-08-19 12:58:27 EDT
Daniel: I'd prefer some option

[ ] include *.html-files and files from directories "doc-files"

By default, this should be
unchecked when I'm exporting "generated class files and resources",
and checked when I'm exporting "Java source files and resources".
Comment 4 Dani Megert CLA 2002-08-20 03:13:33 EDT
- including doc-files is a good point.
- including all .htm(l) is not OK (think about a web-project where htmls belong
to the binary distribution
- the option should not change the other two options and even for source
distributions the doc is normally not included (see SDK's src.zip).

Thanks again for this good PR.
Comment 5 Andreas Krüger CLA 2002-08-20 06:09:45 EDT
> - including all .htm(l) is not OK

Step back a moment and you'll see that we are fighting a Java deficiency.

What is not OK is that source code and documentation and resources are
all mixed up in the same directory structure.

That source code and documentation belong into the same directory structure
is something that SUN has cooked up for us.  We'll have to eat that stew.


Personally, I don't think I have the source code if I don't also have any
documentation that goes along with it.  You say:

> even for source distributions the doc is normally not included

When source code is packaged in everyday life, the aim more often than not is
that someone who receives the package (usually myself or people from my team)
can either understand or develop.  In either case, they would want any
documentation that goes with the source code.

SUN packaging src.zip is not the usual case.  Let the documentation that goes
with the source code go with the source code.  So I want an option

[ ] include *.html-files and files from directories "doc-files"

, and I want it autofilled to "x" if source code is exported.
If you are the rare person exporting SUN's src.zip, you can always
uncheck it.  (And you'll probably have an ant script anyway.)

As a side remark, in Javadoc context, we say ".html" and not ".htm".
Compare package.html, also compare what Javadoc generates.

Now, on to resources.

It's SUN's fault that doc-files and source code is all mixed up.
But it's our fault if doc-files/source code and resources are all mixed up.

If you set up a web project with .html - resource files and put these
resource files into the same directory structure with the source code,
you deserve the all those kinds of trouble you are going to run into.
I have little mercy with you.

What I'm saying:

Any project that needs more than a very few resources
should have and will have a separate directory structure
devoted to resources ONLY.

This is certainly the case for a project that has .html - resources.

Consider what would happen if not:
A project architect that puts .html-resources in the middle of the source code
in essence says: "We have no need for javadoc .html files."
Looks like a small, unimportant project to me.

So, I postulate different directory hirarchy for resource files.
I'm not sure how well Eclipse supports that kind of an approach presently.

Out of the top of my head, if I had need of a project with nontrivial
resources (I admit I presently don't), I would consider split it up into two
projects under Eclipse.  One has a source folder with the .java sources,
the second has a source folder with the resource files.
Anyway.

If you separate your resources from your source/javadoc, you don't really
need to care about the checkbox under consideration.  You can just click
on or off the entire directory structure containing the resources, as
appropiate.

If you don't have a separate resource structure, you probably only need
something simple, along these lines:  "If it doesn't look like javadoc,
it's a resouce."  Which is exactly what I'm proposing.
Comment 6 Dani Megert CLA 2002-08-20 06:51:34 EDT
>That source code and documentation belong into the same directory structure
>is something that SUN has cooked up for us.  We'll have to eat that stew.
Agree.

>SUN packaging src.zip is not the usual case.  Let the documentation that goes
>with the source code go with the source code.  So I want an option
Not true at all. Also Eclipse does packaging like this
- runtime
- source
- doc & javadoc
So I guess Sun and Eclipse are rare examples and are both wrong ;-)

>As a side remark, in Javadoc context, we say ".html" and not ".htm".
>Compare package.html, also compare what Javadoc generates.
I know, but for (Win*) people who read the option it would not be obvious why
*.html would be excluded but not *.htm

>So, I postulate different directory hirarchy for resource files.
>I'm not sure how well Eclipse supports that kind of an approach presently.
No problem, but if you select a project which has its resource in proj/resources
and the source in proj/source and then export proj with your option checked it
would exclude all *.html files from proj/resources.

>Out of the top of my head, if I had need of a project with nontrivial
>resources (I admit I presently don't), I would consider split it up into two
>projects under Eclipse.  One has a source folder with the .java sources,
>the second has a source folder with the resource files.
For Eclipse plug-in developers this would mean to have two plug-ins for one thing.

What you're asking for is another feature for I we already have a PR (I think):
adding filter support to the JAR file exporter. This would allow you to filter
whatever you like. (e.g. *.html, *.doc).
Comment 7 Andreas Krüger CLA 2002-08-20 06:57:30 EDT
> This would allow you to filter whatever you like. (e.g. *.html, *.doc).

Please, remember:

> - including doc-files is a good point.

Comment 8 Dani Megert CLA 2002-11-12 05:48:47 EST
Proposed fix:

[ ] Export Java doc files (package.html, doc-files directory)
which will exclude the following from PACKAGE_FRAGMENTS:
- directory 'doc-files' (including children)
- file 'package.html'
Comment 9 Dani Megert CLA 2003-01-15 03:38:30 EST
Post 2.1
Comment 10 Robert (Kraythe) Simmons CLA 2003-09-04 07:58:14 EDT
THis is easy to do, just look at the ocmpiler settings in the project 
properties and on the "Build Path" tab, add the appropriate names. 
Comment 11 Dani Megert CLA 2006-09-27 07:23:30 EDT
Reassigning to inbox since there are currently no plans to work on this.
Comment 12 Martin Aeschlimann CLA 2006-10-04 09:21:49 EDT
no plans for this
Comment 13 Denis Roy CLA 2009-08-30 02:16:08 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.