This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 202840 - JUnit tests makes svn commit to fail
Summary: JUnit tests makes svn commit to fail
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.1
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 198033 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-29 18:09 UTC by mago_ebon
Modified: 2011-10-07 15:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ignore list (30.88 KB, image/png)
2011-10-03 16:02 UTC, mago_ebon
Details
Directory with .svn subdirectory (77.50 KB, image/png)
2011-10-05 06:44 UTC, mago_ebon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mago_ebon 2011-09-29 18:09:15 UTC
I am testing a Web project. Whenever I test it, it puts some files in my build directory. The build directory is supposed to be ignored, but then the project is marked as with changes from the files saved there. When I try to commit, it fails because it has no previous activity in the build/ path and have to delete the directory prior to commit.
Comment 1 mago_ebon 2011-09-29 18:12:33 UTC
Forgot to say, I have to delete the files externally and then restart my IDE.
Comment 2 Ondrej Vrabec 2011-10-02 06:09:03 UTC
> The build directory is supposed to be ignored
Is it 'svn ignored'? i.e. is the folder ignored with svn:ignore property?
What NetBeans build do you use?
Comment 3 mago_ebon 2011-10-03 16:02:33 UTC
Created attachment 111433 [details]
Ignore list
Comment 4 mago_ebon 2011-10-03 16:03:07 UTC
The directory is on the svn:ignore list just as default.

The build I'm using is netbeans-trunk-nightly-201109230601-ml-windows. Today I'm installing netbeans-trunk-nightly-201110020601-ml-windows.exe and will test again.
Comment 5 Ondrej Vrabec 2011-10-04 16:16:46 UTC
Can you browse the build folder and look for .svn folder? What is the first folder under build that contains the .svn metadata? Start in the folder with the modified file and go up.
Comment 6 mago_ebon 2011-10-05 06:44:00 UTC
Created attachment 111497 [details]
Directory with .svn subdirectory

The first folder containing the .svn directory is build\test\classes.
Comment 7 mago_ebon 2011-10-05 06:45:04 UTC
This is an exception I saw today:

C:\Users\oso\.netbeans\dev\var\cache\executor-snippets\junit-debug.xml:107: 
java.io.IOException: Cannot create folder: N:\NWM\sources\Servicios\build\web\WEB-INF\classes\com\.svn\tmp\text-base
	at org.netbeans.modules.java.source.usages.BuildArtifactMapperImpl.copyRecursively(BuildArtifactMapperImpl.java:509)
	at org.netbeans.modules.java.source.usages.BuildArtifactMapperImpl.copyRecursively(BuildArtifactMapperImpl.java:527)
	at org.netbeans.modules.java.source.usages.BuildArtifactMapperImpl.copyRecursively(BuildArtifactMapperImpl.java:527)
	at org.netbeans.modules.java.source.usages.BuildArtifactMapperImpl.copyRecursively(BuildArtifactMapperImpl.java:527)
	at org.netbeans.modules.java.source.usages.BuildArtifactMapperImpl.copyRecursively(BuildArtifactMapperImpl.java:527)
	at org.netbeans.modules.java.source.usages.BuildArtifactMapperImpl.ensureBuilt(BuildArtifactMapperImpl.java:286)
	at org.netbeans.modules.java.source.ant.TranslateClassPath.translateEntry(TranslateClassPath.java:149)
	at org.netbeans.modules.java.source.ant.TranslateClassPath.translate(TranslateClassPath.java:112)
	at org.netbeans.modules.java.source.ant.TranslateClassPath.execute(TranslateClassPath.java:94)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor285.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:390)
	at org.apache.tools.ant.Target.performTasks(Target.java:411)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:285)
	at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 0 seconds)
Comment 8 Ondrej Vrabec 2011-10-05 08:34:12 UTC
*** Bug 198033 has been marked as a duplicate of this bug. ***
Comment 9 Ondrej Vrabec 2011-10-05 08:40:45 UTC
BuildArtifactMapperImpl copies recursively all files and folders with no exception along with subversion metadata (.svn folder), which should not be copied at all but should be left unnoticed. Can only visible files (via VisibilityQuery) be copied (or as a WA this close to release exclude ".svn" from the copy)?
see org.netbeans.modules.java.source.usages.BuildArtifactMapperImpl.copyRecursively
Comment 10 Quality Engineering 2011-10-07 14:33:55 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/64c186feee73
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #202840: while BuildArtifactsMapperImpl copies the resources, it must ignore invisible files.
Comment 11 Jan Lahoda 2011-10-07 15:40:33 UTC
Only visible resources are copied after the above commit.