You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2024/04/14 22:27:58 UTC

(maven-archetype) branch dependabot/maven/org.codehaus.plexus-plexus-velocity-2.1.0 updated (a43f19fa -> 73c70241)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch dependabot/maven/org.codehaus.plexus-plexus-velocity-2.1.0
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git


    omit a43f19fa Bump org.codehaus.plexus:plexus-velocity from 1.2 to 2.1.0
     add 369eb1c6 (doc) remove warning as modello parameter useJava5 no longer exists
     add 37b76016 (doc) correct link to Jenkins
     add fabc7631 Bump jdom2 from 2.0.6 to 2.0.6.1
     add efb9a6e9 Bump org.apache.maven.plugins:maven-docck-plugin from 1.1 to 1.2 (#181)
     add 8c78db15 Bump org.codehaus.plexus:plexus-component-annotations (#180)
     add 80edcbca Bump org.codehaus.plexus:plexus-component-metadata from 2.0.0 to 2.2.0 (#179)
     add a57ffc9f Bump org.codehaus.modello:modello-maven-plugin from 2.1.0 to 2.1.2 (#178)
     add 06dc3b20 Bump org.easymock:easymock from 3.6 to 5.2.0 (#177)
     add ff59d894 Bump org.apache.maven:maven-parent from 39 to 41
     add 77597e63 Correct reporting -  maven-plugin-report-plugin
     add 2b58aebf [ARCHETYPE-652] Added system requirements history
     add 3a2b7251 Bump org.apache.maven.plugins:maven-antrun-plugin from 3.0.0 to 3.1.0 (#184)
     add 8b3bdb6f [ARCHETYPE-654] Clarify used repository/server ids for catalog "remote" (#185)
     add 0bbc4c28 Fix debug logs in IntegrationTestMojo.java
     add 70a6cc57 Bump org.codehaus.modello:modello-maven-plugin from 2.1.2 to 2.3.0
     new 6705552e Bump org.codehaus.plexus:plexus-velocity from 1.2 to 2.1.0
     new 73c70241 wip

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (a43f19fa)
            \
             N -- N -- N   refs/heads/dependabot/maven/org.codehaus.plexus-plexus-velocity-2.1.0 (73c70241)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 archetype-common/pom.xml                           |  6 +-
 .../DefaultFilesetArchetypeGenerator.java          | 15 ++++-
 archetype-common/src/site/apt/internal.apt         | 17 +----
 .../apache/maven/archetype/old/ArchetypeTest.java  |  5 +-
 archetype-models/pom.xml                           |  1 -
 maven-archetype-plugin/pom.xml                     | 75 ++++++++++++++++++----
 .../mojos/CreateProjectFromArchetypeMojo.java      | 23 ++++---
 .../maven/archetype/mojos/IntegrationTestMojo.java |  2 +-
 maven-archetype-plugin/src/site/fml/faq.fml        | 13 ++--
 pom.xml                                            | 45 ++-----------
 10 files changed, 113 insertions(+), 89 deletions(-)


(maven-archetype) 02/02: wip

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch dependabot/maven/org.codehaus.plexus-plexus-velocity-2.1.0
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git

commit 73c7024103b4a1e16d0f75b7f325f2c40b91bddd
Author: Sylwester Lachiewicz <sl...@gmail.com>
AuthorDate: Wed Jan 3 21:12:49 2024 +0100

    wip
---
 archetype-common/pom.xml                            |  4 ----
 .../generator/DefaultFilesetArchetypeGenerator.java | 15 +++++++++++++--
 .../apache/maven/archetype/old/ArchetypeTest.java   |  5 ++++-
 maven-archetype-plugin/pom.xml                      |  4 ----
 pom.xml                                             | 21 +--------------------
 5 files changed, 18 insertions(+), 31 deletions(-)

diff --git a/archetype-common/pom.xml b/archetype-common/pom.xml
index bfaccc57..63342088 100644
--- a/archetype-common/pom.xml
+++ b/archetype-common/pom.xml
@@ -129,10 +129,6 @@
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-velocity</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.velocity</groupId>
-      <artifactId>velocity</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-provider-api</artifactId>
diff --git a/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java b/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
index 3f5095b0..a8617a84 100644
--- a/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
+++ b/archetype-common/src/main/java/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.java
@@ -62,6 +62,8 @@ import org.apache.maven.archetype.metadata.RequiredProperty;
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.Velocity;
 import org.apache.velocity.context.Context;
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.velocity.exception.ResourceNotFoundException;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
@@ -698,8 +700,8 @@ public class DefaultFilesetArchetypeGenerator extends AbstractLogEnabled impleme
 
         String localTemplateFileName = templateFileName.replace('/', File.separatorChar);
         if (!templateFileName.equals(localTemplateFileName)
-                && !velocity.getEngine().templateExists(templateFileName)
-                && velocity.getEngine().templateExists(localTemplateFileName)) {
+                && !templateExists(templateFileName)
+                && templateExists(localTemplateFileName)) {
             templateFileName = localTemplateFileName;
         }
 
@@ -746,6 +748,15 @@ public class DefaultFilesetArchetypeGenerator extends AbstractLogEnabled impleme
         return true;
     }
 
+    private boolean templateExists(String templateName) {
+        try {
+            velocity.getEngine().getTemplate(templateName);
+            return true;
+        } catch (ResourceNotFoundException | ParseErrorException e) {
+            return false;
+        }
+    }
+
     private void processTemplates(
             String packageName,
             File outputDirectoryFile,
diff --git a/archetype-common/src/test/java/org/apache/maven/archetype/old/ArchetypeTest.java b/archetype-common/src/test/java/org/apache/maven/archetype/old/ArchetypeTest.java
index 0f08962e..8493d591 100644
--- a/archetype-common/src/test/java/org/apache/maven/archetype/old/ArchetypeTest.java
+++ b/archetype-common/src/test/java/org/apache/maven/archetype/old/ArchetypeTest.java
@@ -151,7 +151,10 @@ public class ArchetypeTest extends PlexusTestCase {
 
             velocity.getEngine()
                     .mergeTemplate(
-                            OldArchetype.ARCHETYPE_RESOURCES + "/" + OldArchetype.ARCHETYPE_POM, context, writer);
+                            OldArchetype.ARCHETYPE_RESOURCES + "/" + OldArchetype.ARCHETYPE_POM,
+                            "UTF-8",
+                            context,
+                            writer);
         } finally {
             Thread.currentThread().setContextClassLoader(old);
         }
diff --git a/maven-archetype-plugin/pom.xml b/maven-archetype-plugin/pom.xml
index ff14be41..67e5efc3 100644
--- a/maven-archetype-plugin/pom.xml
+++ b/maven-archetype-plugin/pom.xml
@@ -144,10 +144,6 @@
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-velocity</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.velocity</groupId>
-      <artifactId>velocity</artifactId>
-    </dependency>
     <dependency>
       <groupId>commons-collections</groupId>
       <artifactId>commons-collections</artifactId>
diff --git a/pom.xml b/pom.xml
index 8ddfa2ff..4c04d476 100644
--- a/pom.xml
+++ b/pom.xml
@@ -174,31 +174,12 @@
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-velocity</artifactId>
         <version>2.1.0</version>
-        <exclusions>
-          <exclusion>
-            <groupId>velocity</groupId>
-            <artifactId>velocity</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>velocity</groupId>
-            <artifactId>velocity-api</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.codehaus.plexus</groupId>
-            <artifactId>plexus-container-default</artifactId>
-          </exclusion>
-        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.jdom</groupId>
         <artifactId>jdom2</artifactId>
         <version>2.0.6.1</version>
       </dependency>
-      <dependency>
-        <groupId>org.apache.velocity</groupId>
-        <artifactId>velocity</artifactId>
-        <version>1.7</version>
-      </dependency>
       <dependency>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections</artifactId>
@@ -212,7 +193,7 @@
       <dependency>
         <groupId>org.apache.maven.plugin-testing</groupId>
         <artifactId>maven-plugin-testing-harness</artifactId>
-        <version>2.1</version>
+        <version>3.3.0</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven.wagon</groupId>


(maven-archetype) 01/02: Bump org.codehaus.plexus:plexus-velocity from 1.2 to 2.1.0

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch dependabot/maven/org.codehaus.plexus-plexus-velocity-2.1.0
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git

commit 6705552ecf87f556b71621c5dbc89772437da04e
Author: dependabot[bot] <49...@users.noreply.github.com>
AuthorDate: Tue Jan 2 21:10:30 2024 +0000

    Bump org.codehaus.plexus:plexus-velocity from 1.2 to 2.1.0
    
    Bumps [org.codehaus.plexus:plexus-velocity](https://github.com/codehaus-plexus/plexus-velocity) from 1.2 to 2.1.0.
    - [Release notes](https://github.com/codehaus-plexus/plexus-velocity/releases)
    - [Commits](https://github.com/codehaus-plexus/plexus-velocity/compare/plexus-velocity-1.2...plexus-velocity-2.1.0)
    
    ---
    updated-dependencies:
    - dependency-name: org.codehaus.plexus:plexus-velocity
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <su...@github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 8baad5f5..8ddfa2ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -173,7 +173,7 @@
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-velocity</artifactId>
-        <version>1.2</version>
+        <version>2.1.0</version>
         <exclusions>
           <exclusion>
             <groupId>velocity</groupId>