Bug 86941 - "Cleaning" project does not work in RAD v6.0
Summary: "Cleaning" project does not work in RAD v6.0
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 1.2.0 M2   Edit
Hardware: PC Windows 2000
: P1 major (vote)
Target Milestone: 1.2.0 M3   Edit
Assignee: Helen Beeken CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-01 15:32 EST by Ricardo CLA
Modified: 2005-03-21 16:46 EST (History)
0 users

See Also:


Attachments
files to reproduce problem (4.14 KB, application/octet-stream)
2005-03-01 15:33 EST, Ricardo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo CLA 2005-03-01 15:32:17 EST
Rational Application Developer v6.0

We have the "build automatically" feature is off (we build our projects 
whenever we'd like to... the automatic build sometimes is kind of annoying).

I will include an EAR file that you guys can import into the RAD workspace to 
reproduce the problem. It contains two projects: BuildTestEAR and BuildTestWEB. 
You can use the BuildTestWEB project to reproduce the problem described below.

The following works as expected when the project has just a WEB nature (does 
not have ASPECTJ nature):

If there are compilation errors in a project, and then you select that project, 
and "clean" the selected project (Project->Clean..), all compilation errors for 
that project dissapear. The output folder is cleaned (in this case, the classes 
folder under the web-inf folder). The output folder is cleaned whenever you 
select to clean a project (regardless of having compilation errors or not).

However, if you convert the BuildTestWEB project to ASPECT nature, then above 
functionality is lost:

If there are compilation errors in a project, and then you select that project, 
and "clean" the selected project (Project->Clean..), compilation errors DO NOT 
dissapear for that project. The output folder is NOT cleaned when you select to 
clean a project (regardless of having compilation errors or not); files are not 
deleted.
Comment 1 Ricardo CLA 2005-03-01 15:33:09 EST
Created attachment 18395 [details]
files to reproduce problem

EAR file to import to reproduce problem.
Comment 2 Matt Chapman CLA 2005-03-01 22:35:08 EST
Yes, I hit this too, in plain Eclipse. Our builder is not honouring the clean
operation. Helen, please could you take a look.
Comment 3 Helen Beeken CLA 2005-03-02 06:42:57 EST
Hi Ricardo,

Thanks for providing a failing test project and detailed instructions of how to
recreate the failure :-)

I've had a look into this and the reason is that our builder which extends
IncrementalProjectBuilder doesn't override the

	protected void clean(IProgressMonitor monitor) throws CoreException {
		//default implementation does nothing
	}

method. In the current state, the behaviour you're seeing will be seen whenever
a user chooses to "clean" an AJ project.

Obviously, the fix is to implement this method with behaviour which cleans all
output folders, clears all state and then does a full build. Clearing all state
will have to be changed when bug 73435 is resolved (this is to do with having a
"state" object around in a similar way to the JavaBuilder. We currently don't
have one but discussions are going on about creating one - this will help us
with incremental compilation).

I will work on this asap as this should be fixed before we release M3.

Thanks, Helen
Comment 4 Helen Beeken CLA 2005-03-08 08:09:47 EST
The fix has now been integrated and the following AJDT build contains this fix.

BUILD COMPLETE -  build.223 
Date of build: 03/08/2005 09:16:11 
Time to build: 25 minutes 26 seconds 
Last changed: 03/08/2005 08:34:54 
Last log entry: 86941: overriding the clean(..) method in AJBuilder 

Just as a note.... the fix entailed just providing an empty clean(..) method. 
By providing this, the underlying jdt builder mechanism forces a full build so 
it's not necessary for us to do this aswell in our clean(..) method. When we 
have a state and such like, this will need to be reset in the clean method, 
but until then, it's ok just having an empty one.
Comment 5 Helen Beeken CLA 2005-03-08 11:58:57 EST
Hi Ricardo,

I'm in the process of uploading a development AJDT build which contains the fix
for this bug - currently I'm waiting for the webpages to reflect the changes
I've made - when this happens you should be able to download a copy.

The date of the AJDT build you need is:

1.2.0.20050308091611

Thanks, Helen
Comment 6 Helen Beeken CLA 2005-03-09 03:45:23 EST
Hi Ricardo,

I'm still waiting for download page on the website to reflect my changes (the
development build zip file), however, if you install AJDT via the update site
mechanism then you can pick up AJDT 1.2.0.20050308091611 now (url:
http://download.eclipse.org/technology/ajdt/30/dev/update)

Thanks, Helen
Comment 7 Helen Beeken CLA 2005-03-15 04:20:50 EST
Hi Ricardo,

Just to let you know, the ajdt download webpages are now reflecting the changes
I  made. The links to the dev build zip files are now up to date and contain the
fix you need.

Thanks again, Helen
Comment 8 Ricardo CLA 2005-03-21 16:46:14 EST
(In reply to comment #7)
> Hi Ricardo,
> Just to let you know, the ajdt download webpages are now reflecting the 
changes
> I  made. The links to the dev build zip files are now up to date and contain 
the
> fix you need.
> Thanks again, Helen

Hi Helen,

I'll be getting the latest build soon. Thanks for the update and the fix.