Maven 1.x Eclipse Plugin

Only create .classpath and javabuilder if sources are present

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.10
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

Only create .classpath and javabuilder if sources are present

Activity

Hide
Felipe Leme added a comment -

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

Show
Felipe Leme added a comment - 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
Hide
David Eric Pugh added a comment -

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

Show
David Eric Pugh added a comment - 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
Hide
Archimedes Trajano added a comment -

Is there any documentation on how to create non-java plugin test cases? I am still confused on how to write them.

Show
Archimedes Trajano added a comment - Is there any documentation on how to create non-java plugin test cases? I am still confused on how to write them.
Hide
David Eric Pugh added a comment -

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

Show
David Eric Pugh added a comment - 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
Hide
Felipe Leme added a comment -

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

Show
Felipe Leme added a comment - 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
Hide
David Eric Pugh added a comment -

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.

Show
David Eric Pugh added a comment - 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.
Hide
David Eric Pugh added a comment -

Okay, it is now part of 1.10

Show
David Eric Pugh added a comment - Okay, it is now part of 1.10

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: