[syncope-dev] Issue 150 in syncope: building archetype ignores content.xml

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[syncope-dev] Issue 150 in syncope: building archetype ignores content.xml

syncope
Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 150 by [hidden email]: building archetype ignores content.xml
http://code.google.com/p/syncope/issues/detail?id=150

Building the archetype from a clean checkout will not include the  
content.xml from core's test resources.

However, somewhere during the first 'mvn clean install', the copied  
content.xml from the core module is indeed copied to  
src/main/archetype-resources. This has the effect that the second and  
subsequent times the built archetype does have the content.xml included.

Another side effect: because content.xml is copied to src/main/resources,  
SVN clients will see it as unversioned file.

I'm afraid this is caused by rev 1151, "Linking archetype's content.xml to  
core's".

I'm sorry, but could not yet envision a fix for this, other than reverting  
1151 :-(
It seems there's no official postprocess-hook for an archetype's resources  
where this could belong.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[syncope-dev] Re: Issue 150 in syncope: building archetype ignores content.xml

syncope

Comment #1 on issue 150 by [hidden email]: building archetype  
ignores content.xml
http://code.google.com/p/syncope/issues/detail?id=150

Prior to issue 1151,  
archetype/src/main/resources/archetype-resources/core/src/test/resource.xml  
was a separate file from core/src/test/resources/content.xml.

Since Syncope core's source code is evolving quickly - especially these  
days - and since the data in core/src/test/resources/content.xml is likely  
to change (almost) at every commit, we thought it was cleaner to make the  
archetype building process itself to copy content.xml from its "main"  
location to archetype's.

Maven archetypes are meant to be installed and then retrieved from local or  
remote maven repository and the current procedure should respect this  
requirement.

I have just tried this:

mvn archetype:generate \
     -DarchetypeGroupId=org.syncope \
     -DarchetypeArtifactId=syncope-archetype \
     -DarchetypeRepository=http://oss.sonatype.org/content/groups/public \
     -DarchetypeVersion=0.7-SNAPSHOT

and resulting project contains core/src/test/resources/content.xml.

About the SVN side effect, it would suffice to put that file in svn:ignore:  
I'll do that right now.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[syncope-dev] Re: Issue 150 in syncope: building archetype ignores content.xml

syncope

Comment #2 on issue 150 by [hidden email]: building archetype ignores  
content.xml
http://code.google.com/p/syncope/issues/detail?id=150

I'm  sorry, I think my description of the issue is not clear.
I do know that archetypes are meant to be downloaded and used 'as is',  
without building them yourselves.

However, when you, as a syncope-developer, would build and deploy the  
snapshot archetype from a clean checkout, then content.xml will not be  
included. (probably because the copying is done too late)
Only after having built the archetype once, content.xml is included.

To reproduce:
svn co https://syncope.googlecode.com/svn/trunk syncope-trunk-test
cd syncope-trunk-test
mvn clean install
open archetype/target/syncope-archetype-0.7-SNAPSHOT.jar
check directory archetype-resources/core/src/test/resources/ (no  
content.xml)

As an example, see a snapshot jar deployed on 31 aug.:
https://oss.sonatype.org/content/groups/public/org/syncope/syncope-archetype/0.7-SNAPSHOT/syncope-archetype-0.7-20110831.144631-12.jar
This one does not contain the content.xml file in  
archetype-resources/core/src/test/resources/

To rephrase the issue another way: content.xml is only included in a  
(deployed or not) archetype jar if it's built twice or more from a clean  
checkout.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[syncope-dev] Re: Issue 150 in syncope: building archetype ignores content.xml

syncope
Updates:
        Status: Started

Comment #3 on issue 150 by [hidden email]: building archetype  
ignores content.xml
http://code.google.com/p/syncope/issues/detail?id=150

Ah ok, got it :-)
The problem is that the copy is currently done in process-test-resources:  
it should be enough to move it to validate, for example.

Thanks!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[syncope-dev] Re: Issue 150 in syncope: building archetype ignores content.xml

syncope
Updates:
        Owner: [hidden email]
        Labels: Milestone-Release-201112 Source-trunk

Comment #4 on issue 150 by [hidden email]: building archetype  
ignores content.xml
http://code.google.com/p/syncope/issues/detail?id=150

(No comment was entered for this change.)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[syncope-dev] Re: Issue 150 in syncope: building archetype ignores content.xml

syncope
Updates:
        Status: Fixed

Comment #5 on issue 150 by [hidden email]: building archetype  
ignores content.xml
http://code.google.com/p/syncope/issues/detail?id=150

This issue was closed by revision r1155.

Loading...