我目前正在清理项目和相关的错误/警告。每次我将Maven项目部署到JBoss AS 7.1.1.Final时,都会收到很多警告。

我发现了很多帖子/评论,它们只是忽略或隐藏了这些警告。

好的,警告只是警告,但是应该可以解决警告的原因,而不仅仅是隐藏或忽略这些警告(因为我认为:现在是什么警告,在其他时候可能会成为错误)

09:51:55,145 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "oce2.war"
09:51:56,241 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.ConfigurableArchiveImpl' for service type 'org.jboss.shrinkwrap.spi.Configurable'
09:51:56,242 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.GenericArchiveImpl' for service type 'org.jboss.shrinkwrap.api.GenericArchive'
09:51:56,244 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.jar' for service type 'org.jboss.shrinkwrap.api.GenericArchive'
09:51:56,245 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'archiveFormat=UNKNOWN' for service type 'org.jboss.shrinkwrap.api.GenericArchive'
09:51:56,246 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.serialization.ZipSerializableViewImpl' for service type 'org.jboss.shrinkwrap.api.serialization.SerializableView'
09:51:56,248 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.spec.JavaArchiveImpl' for service type 'org.jboss.shrinkwrap.api.spec.JavaArchive'
09:51:56,249 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.jar' for service type 'org.jboss.shrinkwrap.api.spec.JavaArchive'
09:51:56,250 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'archiveFormat=ZIP' for service type 'org.jboss.shrinkwrap.api.spec.JavaArchive'
09:51:56,251 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.exporter.tar.TarExporterImpl' for service type 'org.jboss.shrinkwrap.api.exporter.TarExporter'
09:51:56,253 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.tar' for service type 'org.jboss.shrinkwrap.api.exporter.TarExporter'
09:51:56,254 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.importer.zip.ZipImporterImpl' for service type 'org.jboss.shrinkwrap.api.importer.ZipImporter'
09:51:56,255 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.jar' for service type 'org.jboss.shrinkwrap.api.importer.ZipImporter'
09:51:56,256 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.importer.tar.TarImporterImpl' for service type 'org.jboss.shrinkwrap.api.importer.TarImporter'
09:51:56,258 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.tar' for service type 'org.jboss.shrinkwrap.api.importer.TarImporter'
09:51:56,259 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.spec.WebArchiveImpl' for service type 'org.jboss.shrinkwrap.api.spec.WebArchive'
09:51:56,260 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.war' for service type 'org.jboss.shrinkwrap.api.spec.WebArchive'
09:51:56,261 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'archiveFormat=ZIP' for service type 'org.jboss.shrinkwrap.api.spec.WebArchive'
09:51:56,262 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.exporter.tar.TarGzExporterImpl' for service type 'org.jboss.shrinkwrap.api.exporter.TarGzExporter'
09:51:56,264 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.tar.gz' for service type 'org.jboss.shrinkwrap.api.exporter.TarGzExporter'
09:51:56,265 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.serialization.ZipSerializableViewImpl' for service type 'org.jboss.shrinkwrap.api.serialization.ZipSerializableView'
09:51:56,266 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.importer.ExplodedImporterImpl' for service type 'org.jboss.shrinkwrap.api.importer.ExplodedImporter'
09:51:56,268 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.exporter.ExplodedExporterImpl' for service type 'org.jboss.shrinkwrap.api.exporter.ExplodedExporter'
09:51:56,270 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.spec.EnterpriseArchiveImpl' for service type 'org.jboss.shrinkwrap.api.spec.EnterpriseArchive'
09:51:56,271 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.ear' for service type 'org.jboss.shrinkwrap.api.spec.EnterpriseArchive'
09:51:56,272 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'archiveFormat=ZIP' for service type 'org.jboss.shrinkwrap.api.spec.EnterpriseArchive'
09:51:56,274 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.spec.ResourceAdapterArchiveImpl' for service type 'org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive'
09:51:56,276 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.rar' for service type 'org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive'
09:51:56,278 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'archiveFormat=ZIP' for service type 'org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive'
09:51:56,279 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.importer.tar.TarGzImporterImpl' for service type 'org.jboss.shrinkwrap.api.importer.TarGzImporter'
09:51:56,280 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'extension=.tar.gz' for service type 'org.jboss.shrinkwrap.api.importer.TarGzImporter'
09:51:56,281 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'implementingClassName=org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl' for service type 'org.jboss.shrinkwrap.api.exporter.ZipExporter'

编辑:

我已经找到了解决方案-只是总是忘记保存pom文件,并认为它不起作用。

我将收缩包装依赖项添加到pom文件中:
<dependency>
    <groupId>org.jboss.shrinkwrap</groupId>
    <artifactId>shrinkwrap-api</artifactId>
</dependency>
<dependency>
    <groupId>org.jboss.shrinkwrap</groupId>
    <artifactId>shrinkwrap-impl-base</artifactId>
    <scope>test</scope>
</dependency>

最佳答案

在我的情况下,大多数警告“JBAS015893:遇到无效的类名...”在我将与Arquillian和收缩包装有关的所有依赖项的正确范围都设置为“测试”之后就消失了,例如

<dependency>
 <groupId>org.jboss.shrinkwrap.descriptors</groupId>
 <artifactId>shrinkwrap-descriptors-spi</artifactId>
 <scope>test</scope>
</dependency>

07-25 23:48