You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/05/28 18:17:33 UTC

[maven-doxia] branch DOXIA-652 created (now e1a4b232)

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

michaelo pushed a change to branch DOXIA-652
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git


      at e1a4b232 [DOXIA-652] Drop build-info.properties in favor of default pom.properties

This branch includes the following new commits:

     new e1a4b232 [DOXIA-652] Drop build-info.properties in favor of default pom.properties

The 1 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.



[maven-doxia] 01/01: [DOXIA-652] Drop build-info.properties in favor of default pom.properties

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

michaelo pushed a commit to branch DOXIA-652
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git

commit e1a4b2325956d8e0daa13b725a6e5f12ca65115c
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat May 28 20:17:19 2022 +0200

    [DOXIA-652] Drop build-info.properties in favor of default pom.properties
    
    Remove corresponding test because properties are only available in the
    JAR after the tests have been run.
    
    This closes #102
---
 doxia-core/pom.xml                                     |  7 -------
 .../org/apache/maven/doxia/parser/AbstractParser.java  |  3 ++-
 doxia-core/src/main/resources/build-info.properties    | 18 ------------------
 .../maven/doxia/parser/Xhtml5BaseParserTest.java       |  8 --------
 .../apache/maven/doxia/parser/XhtmlBaseParserTest.java |  8 --------
 5 files changed, 2 insertions(+), 42 deletions(-)

diff --git a/doxia-core/pom.xml b/doxia-core/pom.xml
index c6717ca4..71f10ab4 100644
--- a/doxia-core/pom.xml
+++ b/doxia-core/pom.xml
@@ -97,13 +97,6 @@ under the License.
   </dependencies>
 
   <build>
-    <resources>
-      <resource>
-        <directory>${basedir}/src/main/resources/</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
-
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
index 776ab2f5..2b8b9dc9 100644
--- a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
+++ b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
@@ -62,7 +62,8 @@ public abstract class AbstractParser
     static
     {
         final Properties props = new Properties();
-        final InputStream is = AbstractParser.class.getResourceAsStream( "/build-info.properties" );
+        final InputStream is = AbstractParser.class
+               .getResourceAsStream( "/META-INF/maven/org.apache.maven.doxia/doxia-core/pom.properties" );
 
         if ( is == null )
         {
diff --git a/doxia-core/src/main/resources/build-info.properties b/doxia-core/src/main/resources/build-info.properties
deleted file mode 100644
index e2ed5f58..00000000
--- a/doxia-core/src/main/resources/build-info.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-version=@version@
diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/parser/Xhtml5BaseParserTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/parser/Xhtml5BaseParserTest.java
index e6669aeb..0385de1a 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/parser/Xhtml5BaseParserTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/parser/Xhtml5BaseParserTest.java
@@ -59,14 +59,6 @@ public class Xhtml5BaseParserTest
         sink.reset();
     }
 
-    /** Test Doxia version. */
-    @Test
-    public void testDoxiaVersion()
-    {
-        assertNotNull( XhtmlBaseParser.doxiaVersion() );
-        assertNotEquals( "unknown", XhtmlBaseParser.doxiaVersion() );
-    }
-
     @Test
     public void testHeadingEventsList()
         throws Exception
diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java
index b25a28d8..8a91a014 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java
@@ -62,14 +62,6 @@ public class XhtmlBaseParserTest
         sink.reset();
     }
 
-    /** Test Doxia version. */
-    @Test
-    public void testDoxiaVersion()
-    {
-        assertNotNull( XhtmlBaseParser.doxiaVersion() );
-        assertNotEquals( "unknown", XhtmlBaseParser.doxiaVersion() );
-    }
-
     /** @throws Exception  */
     @Test
     public void testHeadingEventsList()