<excludes>
时间: 2024-09-24 07:17:45 浏览: 73
在Struts2的配置文件中,`<excludes>`标签通常用于`<interceptors>`或`<filters>`元素中,它的作用是用来排除某些拦截器或过滤器对特定的请求或动作进行处理。当你希望某个拦截器或过滤器只在特定条件下应用,或者不想让它影响到特定的操作时,就可以使用`<excludes>`。
例如,在一个`<interceptors>`块中:
```xml
<interceptors>
<interceptor name="loggerInterceptor" class="com.example.LoggerInterceptor">
<exclude name="loginAction" /> <!-- 排除名为"loginAction"的动作 -->
<exclude path="/admin/**" /> <!-- 排除非"/admin/"路径下的所有请求 -->
</interceptor>
</interceptors>
```
这表示名为`loggerInterceptor`的拦截器不会应用于名为`loginAction`的动作以及所有以"/admin/"开头的URL。
相关问题
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <excludes> <exclude> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </exclude> </excludes> </configuration> </plugin> </plugins> </build>Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found
这个错误提示看起来是 Maven 找不到 `org.springframework.boot:spring-boot-maven-plugin` 插件。你可以尝试在 Maven 的 settings.xml 文件中添加阿里云镜像的配置,如下所示:
```
<mirrors>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>Aliyun Maven Mirror</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>
```
然后重新执行 Maven 命令,看看是否能够正常下载插件。如果还是有问题,可以检查一下你的网络连接和 Maven 的配置是否正确。
<publishers> <hudson.tasks.ArtifactArchiver> <artifacts>install-${BUILD_ID}/*.tar.xz</artifacts> <allowEmptyArchive>false</allowEmptyArchive> <onlyIfSuccessful>true</onlyIfSuccessful> <fingerprint>false</fingerprint> <defaultExcludes>true</defaultExcludes> <caseSensitive>true</caseSensitive> <followSymlinks>false</followSymlinks> </hudson.tasks.ArtifactArchiver> <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup@0.44"> <patterns> <hudson.plugins.ws__cleanup.Pattern> <pattern>build-*/</pattern> <type>INCLUDE</type> </hudson.plugins.ws__cleanup.Pattern> <hudson.plugins.ws__cleanup.Pattern> <pattern>install-*/</pattern> <type>INCLUDE</type> </hudson.plugins.ws__cleanup.Pattern> </patterns> <deleteDirs>true</deleteDirs> <skipWhenFailed>false</skipWhenFailed> <cleanWhenSuccess>true</cleanWhenSuccess> <cleanWhenUnstable>true</cleanWhenUnstable> <cleanWhenFailure>true</cleanWhenFailure> <cleanWhenNotBuilt>true</cleanWhenNotBuilt> <cleanWhenAborted>true</cleanWhenAborted> <notFailBuild>true</notFailBuild> <cleanupMatrixParent>false</cleanupMatrixParent> <externalDelete/> <disableDeferredWipeout>false</disableDeferredWipeout> </hudson.plugins.ws__cleanup.WsCleanup> </publishers> 这是一段Jenkins job的定义,请把它转成对应的JJB的yaml格式配置文件
对应的JJB的yaml格式配置文件如下所示:
```yaml
- publishers:
- artifact-archiver:
hudson.tasks.ArtifactArchiver:
artifacts: "install-${BUILD_ID}/*.tar.xz"
allowEmptyArchive: false
onlyIfSuccessful: true
fingerprint: false
defaultExcludes: true
caseSensitive: true
followSymlinks: false
- ws-cleanup:
ws-cleanup@0.44:
patterns:
- pattern:
pattern: "build-*/"
type: "INCLUDE"
- pattern:
pattern: "install-*/"
type: "INCLUDE"
deleteDirs: true
skipWhenFailed: false
cleanWhenSuccess: true
cleanWhenUnstable: true
cleanWhenFailure: true
cleanWhenNotBuilt: true
cleanWhenAborted: true
notFailBuild: true
cleanupMatrixParent: false
externalDelete: ""
disableDeferredWipeout: false
```
阅读全文