Skip to content

Commit

Permalink
[build] Introduce a parent pom (langchain4j#15)
Browse files Browse the repository at this point in the history
Have a parent pom that contains most/all common things for the
sub-projects.

Note that it is separate from the root aggregator pom: not mixing the
aggregator and the parents makes things slightly easier.

If this change makes it harder to do releases, there might be a
possibility to generate the effective poms for each subproject, but on
the other hand releasing everything should not be too problematic.
  • Loading branch information
Shastick authored Jul 13, 2023
1 parent 7ba1723 commit c451a22
Show file tree
Hide file tree
Showing 6 changed files with 370 additions and 659 deletions.
189 changes: 14 additions & 175 deletions langchain4j-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,217 +4,56 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>dev.langchain4j</groupId>
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.11.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

<artifactId>langchain4j-core</artifactId>
<version>0.11.0</version>
<packaging>jar</packaging>

<name>langchain4j-core</name>
<description>Core classes and interfaces of langchain4j</description>
<url>https://github.com/langchain4j/langchain4j</url>

<licenses>
<license>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>

<scm>
<url>https://github.com/langchain4j/langchain4j</url>
<connection>scm:git:git://github.com/langchain4j/langchain4j.git</connection>
<developerConnection>scm:git:git@github.com:langchain4j/langchain4j.git</developerConnection>
</scm>

<developers>
<developer>
<id>deep-learning-dynamo</id>
<email>deeplearningdynamo@gmail.com</email>
<url>https://github.com/deep-learning-dynamo</url>
</developer>
<developer>
<id>kuraleta</id>
<email>digital.kuraleta@gmail.com</email>
<url>https://github.com/kuraleta</url>
</developer>
</developers>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.9.3</junit.version>
</properties>

<dependencies>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>

<dependency>
<groupId>com.github.spullara.mustache.java</groupId>
<artifactId>compiler</artifactId>
<version>0.9.10</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.24.2</version>
<scope>test</scope>
</dependency>

</dependencies>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
</plugin>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>

<profiles>

<profile>
<id>sign</id>
<activation>
<property>
<name>sign</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>compliance</id>
<activation>
<property>
<name>compliance</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.honton.chas</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>0.0.3</version>
<executions>
<execution>
<goals>
<goal>compliance</goal>
</goals>
</execution>
</executions>
<configuration>
<scopes>compile,runtime,provided,test</scopes>
<acceptableLicenses>
<license>
<name>(Apache License, Version 2\.0)|(Apache-2\.0)</name>
<url>https?://www\.apache\.org/licenses/LICENSE-2\.0</url>
</license>
<license>
<name>(The MIT License|MIT License)</name>
<url>(https?://opensource.org/licenses/MIT|https://projectlombok.org/LICENSE)</url>
</license>
<license>
<name>Eclipse Public License v2.0</name>
<url>https?://www.eclipse.org/legal/epl-v20\.html</url>
</license>
</acceptableLicenses>
</configuration>
</plugin>
</plugins>
</build>
</profile>

</profiles>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>
Loading

0 comments on commit c451a22

Please sign in to comment.