I encounter similar problems and have worked around it by manually editing the sub-directories to be included as 'source folders' so that the eventual structure matches the package declaration. Excluding pigmix, piggybank, etc is of course possible but at times classes from these are needed for some tests. I'm sure other devs must be doing something better than my manual approach and I'd be grateful to know.
Mona Chitnis On Thursday, May 22, 2014 11:57 AM, Daniel Dai <[email protected]> wrote: I usually exclude pigmix classes in my eclipse. Try this patch: Index: build.xml =================================================================== --- build.xml (revision 1596935) +++ build.xml (working copy) @@ -312,7 +312,7 @@ <source path="${src.shims.dir}"/> <source path="${src.shims.test.dir}"/> <source path="tutorial/src"/> - <source path="${test.src.dir}" excluding="e2e/pig/udfs/java/|resources/"/> + <source path="${test.src.dir}" excluding="e2e/pig/udfs/java/|perf/|resources/"/> <output path="${build.dir.eclipse-main-classes}" /> <library pathref="eclipse.classpath" exported="true" /> <!--library pathref="classpath" exported="false"/--> Thanks, Daniel On Thu, May 22, 2014 at 4:12 AM, Kyungho Jeon <[email protected]> wrote: > Hello, > > I am following this document: > https://cwiki.apache.org/confluence/display/PIG/How+to+set+up+Eclipse+environment > > Eclipse shows errors like this: > Description Resource Path Location Type > The declared package "org.apache.pig.test.pigmix.datagen" does not > match the expected package > "perf.pigmix.src.java.org.apache.pig.test.pigmix.datagen" > DataGenerator.java > /pig/test/perf/pigmix/src/java/org/apache/pig/test/pigmix/datagen line > 18 Java Problem > > I guess this is because Eclipse tries to match the file system > directory hierarchy with the package name. But how can I fix this? I'd > like to run JUnit test in Eclipse... > > Thanks, > Kyungho. -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.
