org.yes.tools.generator.TestMojo Maven / Gradle / Ivy
package org.yes.tools.generator;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
/**
* @author Co.
* @name TestMojo
* @date 2023/3/31 14:35
*/
@Mojo(name = "generator-apiFeign")
public class TestMojo extends AbstractMojo {
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
System.out.println("sssss");
}
public static void main(String[] args) {
int[] arr = {5, 2, 8, 12, 7,123,123,55,1,34};
int temp = 0;
for (int i = 0; i < arr.length; i++) {
for (int j = 1; j < (arr.length - i); j++) {
if (arr[j - 1] > arr[j]) {
// swap elements
temp = arr[j - 1];
arr[j - 1] = arr[j];
arr[j] = temp;
}
}
}
// print sorted array
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i] + " ");
}
}
}