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

[Java] Fix: version.txt not found #213

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ JAVA_GEN_VERSION := v0.15.0
TFGEN := pulumi-tfgen-${PACK}
PROVIDER := pulumi-resource-${PACK}
VERSION := $(shell pulumictl get version)
JAVA_GROUP_ID := com.ovhcloud.pulumi
JAVA_GROUP_ID := com.ovhcloud.pulumi.ovh
JAVA_ARTIFACT_ID := ${ORG}

PLATFORM := linux-amd64
Expand Down Expand Up @@ -108,7 +108,6 @@ build_go:: install_plugins tfgen # build the go sdk
build_java:: PACKAGE_VERSION := $(shell pulumictl get version --language generic)
build_java:: bin/pulumi-java-gen
$(WORKING_DIR)/bin/$(JAVA_GEN) generate --schema provider/cmd/$(PROVIDER)/schema.json --out sdk/java --build gradle-nexus
rm -f ./provider/cmd/$(PROVIDER)/schema-java.json

echo "update java version in build.gradle" && cd ./sdk/java/ && ${SED} -e 's/of(11)/of(21)/g' build.gradle
echo "update inceptionYear in build.gradle" && cd ./sdk/java/ && ${SED} -e 's/inceptionYear = .*/inceptionYear = "2024"/g' build.gradle
Expand All @@ -121,7 +120,6 @@ build_java:: bin/pulumi-java-gen

echo "update rootProject in settings.gradle" && cd ./sdk/java && ${SED} -e 's/rootProject.name = .*/rootProject.name = "$(JAVA_GROUP_ID)"/g' settings.gradle


cd sdk/java/ && \
echo "module fake_java_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
gradle --console=plain build
Expand Down
2 changes: 1 addition & 1 deletion provider/cmd/pulumi-resource-ovh/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"generateExtraInputTypes": true
},
"java": {
"basePackage": "com.ovh",
"basePackage": "com.ovhcloud.pulumi",
"buildFiles": "",
"gradleNexusPublishPluginVersion": "",
"gradleTest": ""
Expand Down
3 changes: 2 additions & 1 deletion provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,8 @@ func Provider() tfbridge.ProviderInfo {
},
},
Java: &tfbridge.JavaInfo{
BasePackage: "com.ovh",
//BasePackage: "com.ovh",
BasePackage: "com.ovhcloud",
},
}

Expand Down
4 changes: 2 additions & 2 deletions sdk/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}

group = "com.ovhcloud.pulumi"
group = "com.ovhcloud.pulumi.ovh"

def resolvedVersion = System.getenv("PACKAGE_VERSION") ?:
(project.version == "unspecified"
Expand Down Expand Up @@ -82,7 +82,7 @@ jar.configure {
publishing {
publications {
mainPublication(MavenPublication) {
groupId = "com.ovhcloud.pulumi"
groupId = "com.ovhcloud.pulumi.ovh"
artifactId = "ovh"
version = resolvedVersion
from components.java
Expand Down
2 changes: 1 addition & 1 deletion sdk/java/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ pluginManagement {
}
}

rootProject.name = "com.ovhcloud.pulumi"
rootProject.name = "com.ovhcloud.pulumi.ovh"
include("lib")
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.Cloud;
package com.ovhcloud.pulumi.ovh.Cloud;

import com.ovh.ovh.Cloud.inputs.GetProjectArgs;
import com.ovh.ovh.Cloud.inputs.GetProjectPlainArgs;
import com.ovh.ovh.Cloud.outputs.GetProjectResult;
import com.ovh.ovh.Cloud.outputs.GetProjectsResult;
import com.ovh.ovh.Utilities;
import com.ovhcloud.pulumi.ovh.Cloud.inputs.GetProjectArgs;
import com.ovhcloud.pulumi.ovh.Cloud.inputs.GetProjectPlainArgs;
import com.ovhcloud.pulumi.ovh.Cloud.outputs.GetProjectResult;
import com.ovhcloud.pulumi.ovh.Cloud.outputs.GetProjectsResult;
import com.ovhcloud.pulumi.ovh.Utilities;
import com.pulumi.core.Output;
import com.pulumi.core.TypeShape;
import com.pulumi.deployment.Deployment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.Cloud.inputs;
package com.ovhcloud.pulumi.ovh.Cloud.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.Cloud.inputs;
package com.ovhcloud.pulumi.ovh.Cloud.inputs;

import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.Cloud.outputs;
package com.ovhcloud.pulumi.ovh.Cloud.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.Cloud.outputs;
package com.ovhcloud.pulumi.ovh.Cloud.outputs;

import com.ovh.ovh.Cloud.outputs.GetProjectIam;
import com.ovhcloud.pulumi.ovh.Cloud.outputs.GetProjectIam;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.Cloud.outputs;
package com.ovhcloud.pulumi.ovh.Cloud.outputs;

import com.ovh.ovh.Cloud.outputs.GetProjectsProjectIam;
import com.ovhcloud.pulumi.ovh.Cloud.outputs.GetProjectsProjectIam;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.Cloud.outputs;
package com.ovhcloud.pulumi.ovh.Cloud.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.Cloud.outputs;
package com.ovhcloud.pulumi.ovh.Cloud.outputs;

import com.ovh.ovh.Cloud.outputs.GetProjectsProject;
import com.ovhcloud.pulumi.ovh.Cloud.outputs.GetProjectsProject;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.CloudProject;
package com.ovhcloud.pulumi.ovh.CloudProject;

import com.ovh.ovh.CloudProject.AlertingArgs;
import com.ovh.ovh.CloudProject.inputs.AlertingState;
import com.ovh.ovh.CloudProject.outputs.AlertingFormattedMonthlyThreshold;
import com.ovh.ovh.Utilities;
import com.ovhcloud.pulumi.ovh.CloudProject.AlertingArgs;
import com.ovhcloud.pulumi.ovh.CloudProject.inputs.AlertingState;
import com.ovhcloud.pulumi.ovh.CloudProject.outputs.AlertingFormattedMonthlyThreshold;
import com.ovhcloud.pulumi.ovh.Utilities;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.ovh.ovh.CloudProject;
package com.ovhcloud.pulumi.ovh.CloudProject;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
Expand Down
Loading