Dirk Tschentscher created SLING-13110:
-----------------------------------------

             Summary: Sling Project Archetype: groovy post-generation script 
fails with current maven-archetype-plugin 3.4.1
                 Key: SLING-13110
                 URL: https://issues.apache.org/jira/browse/SLING-13110
             Project: Sling
          Issue Type: Bug
          Components: Maven Plugins and Archetypes
    Affects Versions: Project Archetype 1.0.14
            Reporter: Dirk Tschentscher


For unit-testing this archetype, plugin version 3.3.1 is used and that 
determines the groovy version. However when creating a project, the script   
    {{src/main/resources/META-INF/archetype-post-generate.groovy}}  
is also running at the end with latest plugin version. Build fails:  

 

{{groovy.lang.GroovyRuntimeException: Conflicting module versions. Module 
[groovy-xml is loaded in version 4.0.28 and you are trying to load version 
4.0.23}}

 

Output project is usable though.
Workaround it to nail the version when generating a new project:
{code:bash}
mvn archetype:3.3.1:generate) \
   -DarchetypeGroupId=org.apache.sling \
   -DarchetypeArtifactId=sling-project-archetype \
   -DarchetypeVersion=1.0.14  
{code}
The old plugin does not like Java25, so it's probably best to lift the plugin 
in archetype to 3.4.1 and in the script to 4.0.28



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to