Bug 123212 - Skip subversion resources when copying files from input to output folders
Summary: Skip subversion resources when copying files from input to output folders
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 1.5.1   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-10 04:12 EST by Stéphane Chomat CLA
Modified: 2006-02-10 05:45 EST (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 Stéphane Chomat CLA 2006-01-10 04:12:29 EST
Exception when compile a project under svn.

java.io.FileNotFoundException
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.aspectj.util.FileUtil.makeOutputStream(FileUtil.java:1258)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.writeResource(AjBuildManager.java:466)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.copyResourcesFromFile(AjBuildManager.java:444)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.copyResourcesToDestination(AjBuildManager.java:386)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:298)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:185)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:163)
at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:117)
at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)

FileNotFoundException thrown: /home/chomats/Fede/svn/fede-repos/Tool.Product.ProductServer/classes/.svn/format (Permission non accordée)
Comment 1 Andrew Clement CLA 2006-01-11 04:16:28 EST
I presume svn is subversion.

the compiler appears to be failing to copy a resource from input to output because of a permissions problem.  Are the permissions on that file set such that the compiler should be able to access it?
Comment 2 Andrew Clement CLA 2006-02-09 08:42:18 EST
Comment from Stephane that didnt get on the bug:

> Yes,the project is under subversion control but in this cas, svn
> plugin is not installed. The file 'format' is read only. but it's
> allready present in output folder.
> -r--r--r--  1 chomats users   2 d?c 23 11:11 format
> The aspecj compiler must not copy the .svn resource form input to
> output.

It looks like I just need to augment our ignore list with svn information, it currently reads that we ignore:

(resourceName.startsWith("CVS/")) ||
(resourceName.indexOf("/CVS/") != -1) ||
(resourceName.endsWith("/CVS")) ||
(resourceName.endsWith(".class")) ||			(resourceName.toUpperCase().equals(MANIFEST_NAME))
		    
can you tell me if there is a suitable pattern for svn files, are they always in a .svn directory? in which case this will work:

resourceName.indexOf("/.svn/") != -1) ||
resourceName.indexOf(".svn/") != -1) ||
resourceName.indexOf("/.svn") != -1) ||
Comment 3 Adrian Colyer CLA 2006-02-09 11:35:31 EST
SVN uses directories named ".svn" (with a whole bunch of files and folders underneath them).
Comment 4 Andrew Clement CLA 2006-02-10 02:54:24 EST
thx Adrian.  Proposed fix committed. waiting on build.
Comment 5 Andrew Clement CLA 2006-02-10 05:45:28 EST
fix available in latest AspectJ build - will be in AJDT shortly.