Bug 98663 - Errors during build: Resource /test/bin does not exist.
Summary: Errors during build: Resource /test/bin does not exist.
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.2.1   Edit
Assignee: Sian January CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-07 08:58 EDT by Matthew Webster CLA
Modified: 2005-08-12 10:55 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Webster CLA 2005-06-07 08:58:23 EDT
Using Eclipse 3.1M6 + AJDT 1.2.0.20050518111521

After adding source folder to a new AspectJ without one I get the following 
error popup when building:

Errors during build.
  Errors running builder "AspectJ Builder" on project test.
  Resource /test/bin does not exist.

1. Create new AspectJ project with no source folder i.e. Finish on first page
2. Add source folder from Package Explorer context menu
3. Add package
4. Project builds
5. Errror popup
Comment 1 Helen Beeken CLA 2005-06-07 09:08:33 EDT
This can be reproduced using Eclipse 3.0 and AJDT 1.2.0 rc2.
Comment 2 Helen Beeken CLA 2005-06-07 09:19:05 EDT
The problem is that when the src folder is created in the AspectJ project, a bin
directory is not being created. If you follow the same steps with a purely java
project, then when the src folder is created a bin directory is created at the
same time. Consequently, we fail when we're trying to copy over the folder
(package). 

part of failing stack trace:

org.eclipse.core.internal.resources.ResourceException: Resource /testproject/bin
does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:310)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:178)
at
org.eclipse.core.internal.resources.Folder.assertCreateRequirements(Folder.java:28)
at org.eclipse.core.internal.resources.Folder.create(Folder.java:88)
at org.eclipse.core.internal.resources.Folder.create(Folder.java:119)
at org.eclipse.ajdt.core.builder.AJBuilder.createFolder(AJBuilder.java:565)
at org.eclipse.ajdt.core.builder.AJBuilder.copyResources(AJBuilder.java:460)
at org.eclipse.ajdt.core.builder.AJBuilder.copyResources(AJBuilder.java:418)
at org.eclipse.ajdt.core.builder.AJBuilder.build(AJBuilder.java:151)
...
Comment 3 Helen Beeken CLA 2005-08-12 09:30:47 EDT
I did some initial investigation into this bug. The place where we're going
wrong is AJBuilder.createFolder(IPath packagePath, IContainer outputFolder) and
we're returning because packagePath.isEmpty() is true. The problem is that with
the javabuilder, when packagePath.isEmpty returns true they still copy and
create the bin directory (This code is to do with how we copy over resources -
see bug 78579). I believe there should be another mechanism they (the
javabuilder) uses to create the bin directory other than these methods....other
than that, our code should be the same as when copying resources we mirror their
behaviour.
Comment 4 Sian January CLA 2005-08-12 10:55:55 EDT
Fixed - added a check in AJBuilder that creates the output folder if it does 
not already exist.