Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve maven-ization of dcat files #32

Open
1 task done
Aklakan opened this issue Dec 9, 2023 · 1 comment
Open
1 task done

Improve maven-ization of dcat files #32

Aklakan opened this issue Dec 9, 2023 · 1 comment

Comments

@Aklakan
Copy link
Member

Aklakan commented Dec 9, 2023

The commands dcat mvnize metadata and dcat mvnize content currently always creates a dummy parent pom which includes:

  • the deployment settings (based on a user provided template.pom.xml).
  • references to all things to deploy as child modules

With the current approach, each deployment of metadata or content also attempts to deploy the dummy parent. This means that adding a revision requires adding a new parent version.

Instead, there should be only a single 'bom'-like parent with the deployment settings that a user deploys infrequently when settings need to change. A specific version of this bom is then used as the parent across several dataset/metadata deployments.

The advantage of the dummy parent is, that all child modules can be deployed using a single mvn deploy command.

  • Clarify: Is it possible to have a dummy project which references several child modules, whereas the child modules themselves have the bom as their parent? (i.e. the children do not link back to the dummy parent)
pom.xml # refererences child1 and child2 module but children don't reference back
child1/pom # references global bom
child2/pom # references global bom
@Aklakan
Copy link
Member Author

Aklakan commented Dec 9, 2023

Looks like it is possible to have a 'convenience' parent in order to deploy a batch of child modules (where each child may point to a different parent) - with a dummy pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>dummy</groupId>
  <artifactId>dummy</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>pom</packaging>
  <modules>
    <module>my-dataset1</module>
    <module>my-dataset2</module>
  </modules>
  <build>
    <plugins>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.1.1</version>
          <configuration>
		<skip>true</skip>
	  </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.1</version>
          <configuration>
		<skip>true</skip>
	  </configuration>
        </plugin>
    </plugins>
  </build>
</project>

The only caveat so far is, that children need to have an empty relativePath to disable resolution against the parent folder - and thus to get rid of a warning:

<!-- In my-dataset1 -->
<parent>
  <groupId>org.aksw.dcat-suite</groupId>
  <artifactId>aksw-deployment-bom</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <relativePath></relativePath>
</parent>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant