[
https://issues.apache.org/jira/browse/ARCHETYPE-409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed ARCHETYPE-409.
------------------------------------
Resolution: Auto Closed
This issue has been auto closed because it has been inactive for a long period
of time. If you think this issue still applies, retest your problem with the
most recent version of Maven and the affected component, reopen and post your
results.
> IntegrationTestMojo deletes project folder before test.
> -------------------------------------------------------
>
> Key: ARCHETYPE-409
> URL: https://issues.apache.org/jira/browse/ARCHETYPE-409
> Project: Maven Archetype
> Issue Type: Bug
> Components: Plugin
> Affects Versions: 2.2
> Reporter: Jared Roberts
> Attachments: partial-archetype-example.zip
>
>
> I am attempting to integration test a "partial" archetype by including a
> valid POM inside the test project. The test fails to generate the expected
> output because prior to running the test, a call to
> FileUtils.deleteDirectory() is made to delete all files in the test basedir.
> I believe the intent of performing the deletion is to clean up prior test
> runs, but this makes testing partial archetypes impossible with the
> maven-archetype-plugin.
> A couple possible solutions exist. The first would be to stop deleting the
> basedir before testing. This might be surprising if someone forgets to clean
> between tests, but is that really a valid use-case? The second option that I
> can think of would be to add a new conventional directory ("expected"?) where
> the test project files can be placed and the Archetype plugin will check if
> that directory exists and copy the contents to the "project" folder after
> cleaning up. This option seems like a good compromise because it allows tests
> to succeed without an explicit "clean" between and also allows testing of
> partial archetypes.
> I've attached an example archetype that demonstrates the behavior I'm
> describing. Notice that the output from both the "empty" and "existing"
> projects are the same.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)