让 Maven 同时使用 Jboss 和 Apache Maven 的库

需要在配置文件中添加从下面的内容。<profile> <id>jboss.repositories</id> <activation> <property> <name>!jboss.repository.off</name> </property> </activation> <repositories> <repository> <id>jboss-releases</id> <url>http://repository.jboss.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>jboss-snapshots</id> <url>http://snapshots.jboss.org/maven2</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-releases</id> <url>http://repository.jboss.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> <pluginRepository> <id>jboss-snapshots</id> <url>http://snapshots.jboss.org/maven2</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> <profile> <id>local-properties</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <ydoc.home>${user.home}/ydoc</ydoc.home> <java14_home>C:\\Program Files\\Java\\jre6</java14_home> <jbossretro.site.root>${user.home}/projects/jbossretro-site/freezone</jbossretro.site.root> <maven-jdocbook-plugin.site.root>${user.home}/projects/maven-jdocbook-plugin-site/freezone</maven-jdocbook-plugin.site.root> </properties> </profile>注意,你需要将上面的 JDK 路径替换掉你本地的 JDK 路径。