Issue Details (XML | Word | Printable)

Key: MPECLIPSE-56
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: David Eric Pugh
Reporter: Archimedes Trajano
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Eclipse Plugin

Only create .classpath and javabuilder if sources are present

Created: 10/Nov/04 02:13 AM   Updated: 16/Nov/04 05:55 AM
Component/s: None
Affects Version/s: 1.9
Fix Version/s: 1.10

Time Tracking:
Not Specified

File Attachments: 1. Text File checksources.patch (2 kB)



 Description  « Hide
Only create .classpath and javabuilder if sources are present

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Felipe Leme added a comment - 11/Nov/04 08:23 AM
Archimedes/Eric,

I'd like to add a test case for this fix. The test case per se wouldn't be hard, but it would require a new project.xml (without a source), which would in turn require that we break the test cases structure into multi-project.

So, any better idea on how to test it?

– Felipe


David Eric Pugh added a comment - 11/Nov/04 08:31 AM
to be honest, we need to make it a multiproject setup anyway for the tests.. there are too many different project.xml structures, our tests are becoming more and more intertwined.. For instance, if you have cactus plugin or not..

Feel free to break them up (see hibernate plugin for an example).

Eric


Archimedes Trajano added a comment - 11/Nov/04 09:55 AM
Is there any documentation on how to create non-java plugin test cases? I am still confused on how to write them.

David Eric Pugh added a comment - 11/Nov/04 10:54 AM
It's mostly a matter of learning by example. If you look at maven-plugins/hibernate/src/test-plugin/ there is a good example of using multiproject to test a collection of seperate projects and testcases. Most of the plugins have testcases to look at in maven-plugins/[PLUGIN]/src/test-plugin.

Eric


Felipe Leme added a comment - 11/Nov/04 11:24 PM
Archimedes,

Basically, what you have to do in this case is setup a project that doesn't have the source defined, run the eclipse goal and then parse the generated .classpath/.project to see if it was generated correctly (and failing if it doesn't).

As Eric mentioned, the best way to understand how to achieve that is looking through other testcases. Also, you would need to create a new directory for this testcase, as it would require changing the current testcases POM.

– Felipe


David Eric Pugh added a comment - 16/Nov/04 05:53 AM
I have applied the patch, and refactored the unit tests to use multiproject, so eclipse is now a good example! I also added some tests for this patch.

David Eric Pugh added a comment - 16/Nov/04 05:55 AM
Okay, it is now part of 1.10