Issues with maven test

1 view
Skip to first unread message

kobica

unread,
Jun 11, 2008, 7:55:51 PM6/11/08
to Masa Developers
Hi Folks,

I'm using the latest version of masa-plugin.

I've issues when trying to execute mvn test

It fails in DxMojo.java in line 75 (exception)
69 File outputDirectory = new
File(project.getBuild().getDirectory(), "android-classes");
70 for (Artifact artifact : (List<Artifact>)
project.getCompileArtifacts()) {
71 if (artifact.getGroupId().equals("android")) {
72 continue;
73 }
74 try {
75 unjar(new JarFile(artifact.getFile()),
outputDirectory);
76 } catch (IOException e) {
77 throw new MojoExecutionException("", e);
78 }
79 }

Caused by: java.util.zip.ZipException: Is a directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:203)
at java.util.jar.JarFile.<init>(JarFile.java:132)
at java.util.jar.JarFile.<init>(JarFile.java:97)
at org.jvending.masa.plugin.dx.DxMojo.execute(DxMojo.java:75)

What should be the value of outputDirectory? I don't recall having
<Directory> under build.

Do you have any idea what's the cause of that exception ?

Thanks,
Kobi.

Shane Isbell

unread,
Jun 11, 2008, 8:11:37 PM6/11/08
to masa-de...@googlegroups.com
HI Kobi,
 
It's a bit odd: one of your compile dependencies is a directory not a file. I added an additional exception check and better exception messages into the DxPlugin. Try rebuilding masa from trunk and run 'mvn test' on your project again. That will help track down what the problem is.
 
Thanks,
Shane

kobica

unread,
Jun 12, 2008, 12:18:57 AM6/12/08
to Masa Developers
Hi Shane,

Thanks for your reply. I'm getting:

[INFO] Dependent artifact is directory: Directory = /opt/data/OurRoot/
scratch/target/classes

I have no idea why I'm receiving that. I'll dig in our pom.xml's

Thanks,
Kobi.

kobica

unread,
Jun 12, 2008, 12:36:21 AM6/12/08
to Masa Developers
BTW,

The interesting part is that executing "mvn package", doesn't have any
issue.
dx is performed w/o errors and even tests are "passed"


-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0


The relevant part of the pom.xml is:

<dependency>
<groupId>com.qualcomm.crd</groupId>
<artifactId>genie-scratch</artifactId>
<version>${project.projectVersion}</version>
</dependency>

But then again, the issue is only with "test" phase/goal.

Thanks,
Kobi.

kobica

unread,
Jun 12, 2008, 1:54:00 PM6/12/08
to Masa Developers
Hi Folks,

If we continue when we have such "Directory" dependencies, than it
seems fine and everything is built.

I still don't understand why Maven is listing a directory as a
Dependency.

Thanks,
Kobi.

Shane Isbell

unread,
Jun 12, 2008, 1:56:00 PM6/12/08
to masa-de...@googlegroups.com
What version of maven are you using?
 
Thanks,
Shane

kobica

unread,
Jun 12, 2008, 2:30:08 PM6/12/08
to Masa Developers
On Jun 12, 10:56 am, "Shane Isbell" <shane.isb...@gmail.com> wrote:
> What version of maven are you using?

Maven version: 2.0.9
Java version: 1.5.0_11

Thanks,
Kobi.

Shane Isbell

unread,
Jun 12, 2008, 2:34:36 PM6/12/08
to masa-de...@googlegroups.com
Thanks. I need to get a sample project that reproduces the problem; then I can track it down. You can attach this in the issue tracker. Also are you using any additional plugins within your pom?
 
Thanks,
Shane 

kobica

unread,
Jun 12, 2008, 2:42:23 PM6/12/08
to Masa Developers


On Jun 12, 11:34 am, "Shane Isbell" <shane.isb...@gmail.com> wrote:
> Thanks. I need to get a sample project that reproduces the problem; then I
> can track it down. You can attach this in the issue tracker. Also are you
> using any additional plugins within your pom?
>

OK. I'll try to have it done. There are no other additional plugins in
our pom.xml.
Just 2 dependencies.

Thanks,
Kobi.

kobica

unread,
Jun 12, 2008, 4:45:19 PM6/12/08
to Masa Developers
OK.

I was lucky enough to have a very small example that reproduce it. I'm
uploading the tar.gz to the bug tracker.

Thanks for your help, highly appreciated,
Kobi.
Reply all
Reply to author
Forward
0 new messages