Create a MAVEN project
Add in Pom.xml:
<Build>
<Plugins>
<Plugin>
<GroupId>org.apache.maven.plugins</GroupId>
<Artifactid>maven-shade-plugin</Artifactid>
<Executions>
<Execution>
<Phase>package</Phase>
<Goals>
<Goal>shade</Goal>
</Goals>
<Configuration>
<Transformers>
<TransformerImplementation= "Org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<MainClass>com.test.test</mainClass>
</Transformer>
</Transformers>
</Configuration>
</Execution>
</Executions>
</Plugin>
</Plugins>
</Build>
Specify the main class
Com.test.Test.java:
Package Com.test;
Import Com.netflix.conductor.common.metadata.tasks.TaskDef;
public class Test {
public static void Main (string[] args) {
Taskdef t = new Taskdef ("Test_task");
System. out.println (t.tostring ());
}
}
To import a third-party package:
File-project Structure-modules-dependencies-Plus
Packaging (third-party packages are placed in the Lib folder outside the Project jar package):
File-project Structure-artifacts-
Click "+" To select the jar and select "frommodules with dependencies"
after selecting "Main Class", select Java and change to: D:\workshop\DbUtil\src\main\resources (new folder required)
Right-click Output root to create the Lib folder and drag the third-party package into the Lib folder-
Click the Project jar package to edit the class path:lib/conductor-common-1.7.5.jar-apply
Build-build Artifacts-build/rebuild
IDEA Package Java program