我正在使用maven-assembly-plugin在构建项目时创建项目的zip文件.它很成功.现在我想要的是只压缩项目中的特定目录.
这是我之前用过的pom插件的代码.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make shared resources</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>resource.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
resource.xml文件如下.
<assembly>
<id>resources</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<!-- Since it bundles all the units -->
<directory></directory>
<outputDirectory>/project</outputDirectory>
<excludes>
<exclude>pom.xml</exclude>
<exclude>*.iml</exclude>
<exclude>*.jar</exclude>
<exclude>**/src/**</exclude>
<exclude>**/target/**</exclude>
<exclude>resource.xml</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
Run Code Online (Sandbox Code Playgroud)
我想只在maven构建中压缩项目的一些目录.
作为一个例子,我在项目中有以下文件夹结构.
project
|_directories
|_dir1
|_ ....
|_dir2
|_ ....
|_dir3
|_ ....
|_pom.xml
Run Code Online (Sandbox Code Playgroud)
我想要的是制作只包含目录文件夹的zip文件.解压缩我的zip文件时应该只包含其中的四个目录.
我怎样才能做到这一点?maven-assembly-plugin是否足以完成此操作或者我应该创建一个mojo?
我有一个 git 克隆,它被添加的新文件、删除的文件和两个修改的文件弄乱了。我需要一种方法来以节省时间的方式清理它。
由于起源上的冲突,当我向上游拉动时,它给出了 2000 多个冲突。谁能告诉我如何清理我的原点并使原点与上游保持同步?
我已在本地计算机中配置了 minikube,并将在外部使用 kubernetes。我已经在 kubernetes 中创建了一个服务帐户,并使用它的秘密我可以使用以下命令获取访问令牌。
kubectl get secret <service-account-secret> -o yaml -n mynamespace
Run Code Online (Sandbox Code Playgroud)
我的问题是如何在运行时使用 Fabric8 Java 客户端来做到这一点?我想要的是通过将服务帐户的秘密作为参数来获取访问令牌。
我正在启动配置,如下所示。
Config config = new ConfigBuilder().withMasterUrl(masterURL)
.withClientCertFile(certFile).withOauthToken(serviceAccountAccessToken).build();
Run Code Online (Sandbox Code Playgroud)
我可以知道如何使用fabric8 java客户端获取如上所述的serviceAccountAccessToken吗?
我已经使用./wso2server.sh启动了WSO2 ESB服务器,但是没有停止服务器的脚本?
有人可以告诉命令停止服务器吗?
谢谢苏雷什