Skip to content

Commit

Permalink
fix maven export
Browse files Browse the repository at this point in the history
  • Loading branch information
djeang committed Nov 13, 2023
1 parent 4dac6c6 commit 2e4e698
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 28 deletions.
7 changes: 4 additions & 3 deletions .idea/openapi-plugin.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 9 additions & 17 deletions jeka/def/Build.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import dev.jeka.core.api.crypto.gpg.JkGpg;
import dev.jeka.core.api.depmanagement.JkRepo;
import dev.jeka.core.api.depmanagement.JkRepoSet;
import dev.jeka.core.api.depmanagement.publication.JkNexusRepos;
import dev.jeka.core.api.file.JkPathTree;
Expand All @@ -12,7 +11,6 @@
import dev.jeka.core.tool.JkJekaVersionCompatibilityChecker;
import dev.jeka.core.tool.builtins.git.JkVersionFromGit;
import dev.jeka.core.tool.builtins.project.ProjectJkBean;
import dev.jeka.core.tool.builtins.repos.NexusJkBean;

@JkInjectClasspath("org.projectlombok:lombok:1.18.24")
class Build extends JkBean {
Expand All @@ -26,10 +24,7 @@ class Build extends JkBean {
@JkInjectProperty("JEKA_GPG_PASSPHRASE")
public String secretRingPassword;

Build() {
getBean(ProjectJkBean.class).lately(this::configure);
getBean(NexusJkBean.class); // load Nexus KBean to handle Nexus repo
}
final ProjectJkBean projectJkBean = getBean(ProjectJkBean.class).lately(this::configure);

private void configure(JkProject project) {
JkPathTreeSet sources = JkPathTree.of(this.getBaseDir().resolve("jeka/def"))
Expand All @@ -44,6 +39,12 @@ private void configure(JkProject project) {
.minus(JkLocator.getJekaJarPath())
.minus("org.projectlombok:lombok")
);

JkJekaVersionCompatibilityChecker.setCompatibilityRange(project.packaging.manifest,
"0.10.38",
"https://raw.githubusercontent.com/jeka-dev/openapi-plugin/master/breaking_versions.txt");

// Publish on ossrh
project.publication.maven
.setModuleId("dev.jeka:openapi-plugin")
.setPublishRepos(publishRepos())
Expand All @@ -55,20 +56,11 @@ private void configure(JkProject project) {
.addApache2License();
JkVersionFromGit.of().handleVersioning(project);
JkNexusRepos.handleAutoRelease(project);

JkJekaVersionCompatibilityChecker.setCompatibilityRange(project.packaging.manifest,
"0.10.37",
"https://raw.githubusercontent.com/jeka-dev/openapi-plugin/master/breaking_versions.txt");
}

private JkRepoSet publishRepos() {
JkRepo snapshotRepo = JkRepo.ofMavenOssrhDownloadAndDeploySnapshot(ossrhUser, ossrhPwd);
JkGpg gpg = JkGpg.ofSecretRing(getBaseDir().resolve("jeka/secring.gpg"), secretRingPassword);

JkRepo releaseRepo = JkRepo.ofMavenOssrhDeployRelease(ossrhUser, ossrhPwd, gpg.getSigner(""));
releaseRepo.publishConfig.setVersionFilter(version -> !version.isSnapshot());

return JkRepoSet.of(snapshotRepo, releaseRepo);
JkGpg gpg = JkGpg.ofStandardProject(getBaseDir());
return JkRepoSet.ofOssrhSnapshotAndRelease(ossrhUser, ossrhPwd, gpg.getSigner(""));
}

}
4 changes: 2 additions & 2 deletions jeka/wrapper/wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# The distribution will be downloaded from a Maven repository according the pattern [REPO URL]/dev/jeka/jeka-core/[jeka.version]/jeka-core-[jeka.version]-distrib.zip .
# By default [REPO URL] is https://repo.maven.apache.org/maven2 . You can switch to another repository by editing repo.download.url property
# located in [JEKA USER HOME DIR]/options.properties file. By default [JEKA USER HOME DIR] is [USER HOME]/.jeka .
#jeka.version=0.10.28
jeka.version=0.10.38

# By default, Jeka distribution are fetched from maven central repo. The central repo contains only official releases.
# It's possible to use another repository to fetch Jeka distribution using following property as:
Expand All @@ -18,5 +18,5 @@

# The filesystem location of Jeka distribution to be used by the wrapper. This feature is only useful in very special cases.
# When this property is set, jeka.version is ignored. It can be absolute or relative path to the root of the project to build.
jeka.distrib.location=/Users/jerome/IdeaProjects/jeka/dev.jeka.core/jeka/output/distrib
#jeka.distrib.location=/Users/jerome/IdeaProjects/jeka/dev.jeka.core/jeka/output/distrib

6 changes: 3 additions & 3 deletions sample-prog/.idea/sample-prog.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions sample-props/.idea/sample-props.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2e4e698

Please sign in to comment.