Skip to content

Commit

Permalink
highsourceGH-366 : re-enable gh-issue-19 project
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentschoelens committed Sep 12, 2023
1 parent 8256c79 commit 41e665b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
Expand Up @@ -909,6 +909,8 @@ protected CatalogResolver createCatalogResolver() throws MojoExecutionException
catalogManager.setIgnoreMissingProperties(true);
catalogManager.setUseStaticCatalog(false);
if (getRelativeCatalogResolution()) {
getLog().info("Using RelativeCatalogResolution as CatalogManager" +
" (enable resolution of '../' path for REWRITE_SYSTEM in catalog files)");
catalogManager.setCatalogClassName(RelativeCatalog.class.getName());
}
// TODO Logging
Expand Down
Expand Up @@ -11,6 +11,7 @@ public class RelativeCatalog extends Catalog {
public void addEntry(CatalogEntry entry) {
super.addEntry(entry);
if (entry.getEntryType() == REWRITE_SYSTEM) {
catalogManager.debug.message(0, "REWRITE_SYSTEM relativeCatalog checking");
try {
if (entry.getEntryArg(0) != null && entry.getEntryArg(0).startsWith("..")) {
// generate new entry for catalog
Expand All @@ -20,8 +21,8 @@ public void addEntry(CatalogEntry entry) {

CatalogEntry duplicatedEntry = new CatalogEntry(entry.getEntryType(), args);

catalogManager.debug.message(4, "REWRITE_SYSTEM",
duplicatedEntry.getEntryArg(0), duplicatedEntry.getEntryArg(1));
catalogManager.debug.message(0, "REWRITE_SYSTEM adding "
+ duplicatedEntry.getEntryArg(0) + " to " + duplicatedEntry.getEntryArg(1));

catalogEntries.addElement(duplicatedEntry);
}
Expand Down
1 change: 1 addition & 0 deletions maven-plugin/tests/gh-issue-19/b/pom.xml
Expand Up @@ -30,6 +30,7 @@
<artifactId>jaxb-maven-plugin</artifactId>
<configuration>
<useDependenciesAsEpisodes>true</useDependenciesAsEpisodes>
<relativeCatalogResolution>true</relativeCatalogResolution>
<schemaIncludes>
<include>b/b.xsd</include>
</schemaIncludes>
Expand Down
11 changes: 0 additions & 11 deletions maven-plugin/tests/gh-issue-19/pom.xml
Expand Up @@ -23,16 +23,5 @@
</dependencies>
<build>
<defaultGoal>test</defaultGoal>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<configuration>
<relativeCatalogResolution>true</relativeCatalogResolution>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
2 changes: 1 addition & 1 deletion maven-plugin/tests/pom.xml
Expand Up @@ -49,7 +49,7 @@
<module>MAVEN_JAXB2_PLUGIN-86</module>
<module>MAVEN_JAXB2_PLUGIN-87</module>
<module>gh-issue-16</module>
<!-- module>gh-issue-19</module -->
<module>gh-issue-19</module>
<module>gh-issue-22</module>
<module>gh-issue-23</module>
<module>gh-issue-58</module>
Expand Down

0 comments on commit 41e665b

Please sign in to comment.