:wave: Hello, team! i am new to pulumi. I am tryin...
# aws
f
👋 Hello, team! i am new to pulumi. I am trying to run Pulumi java from Temporal Worker as jar. But getting class not found exceptin
q
What class can't be found? How are you building the jar?
f
I am having 2 modules. 1. pulumi 2. Temporal. In Temporal POM i have added pulumi as dependency. Then i am using
Copy code
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>3.3.0</version>
    <configuration>
        <archive>
            <manifest>
                <mainClass>com.gusto.WorkerPoolStarter</mainClass>

            </manifest>
        </archive>
        <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
    </configuration>
    <executions>
        <execution>
            <id>make-my-jar-with-dependencies</id>
            <phase>package</phase>
            <goals>
                <goal>single</goal>
            </goals>
        </execution>
    </executions>
</plugin>
to build Temporal jar. When i run temporal jar its not able to load the pulumi main class which is defined in pulumi exec java plugin
q
Ah, so you're trying to invoke a pulumi java program without the Pulumi CLI?
f
I am calling pulumi cli command from java processbuilder
q
And what class can't be found? Have you checked whether that class is present in the jar? What you're trying to achieve is essentially what Pulumi Automation API providers. But that feature is not available for Java yet: https://github.com/pulumi/pulumi-java/issues/965 I haven't run the Pulumi CLI through Java itself, how are you invoking your java program in that case? What does the Pulumi.yaml look like? It would be great if you could create a minimal repro to share with me so I can dig deeper.
f
ok