Last active
October 22, 2024 02:44
-
-
Save unclebean/4d1b5c1cf836e30304215ac7953dce96 to your computer and use it in GitHub Desktop.
add repo config in pom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
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>com.example</groupId> | |
<artifactId>my-app</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<!-- Add repositories for dependencies --> | |
<repositories> | |
<repository> | |
<id>central</id> | |
<url>https://repo.maven.apache.org/maven2</url> | |
</repository> | |
<repository> | |
<id>my-custom-repo</id> | |
<url>https://example.com/maven-repo</url> | |
</repository> | |
</repositories> | |
<!-- Add repositories for plugins --> | |
<pluginRepositories> | |
<pluginRepository> | |
<id>central-plugins</id> | |
<url>https://repo.maven.apache.org/maven2</url> | |
</pluginRepository> | |
<pluginRepository> | |
<id>my-custom-plugin-repo</id> | |
<url>https://example.com/maven-plugins</url> | |
</pluginRepository> | |
</pluginRepositories> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.8.1</version> | |
<configuration> | |
<!-- If JDK 9 or above --> | |
<release>11</release> | |
<!-- Or for older JDK versions --> | |
<source>1.8</source> | |
<target>1.8</target> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>3.2.0</version> | |
<configuration> | |
<archive> | |
<manifestEntries> | |
<Implementation-Version>${artifactVersion}</Implementation-Version> | |
</manifestEntries> | |
</archive> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment