我有个问题。
在 pom.xml 中,依赖项包含在两个地方。一个地方可以在<project>
标签中,另一个地方可以在<plugin>
标签中。
我认为标签中的依赖关系只与插件有关吗?这是正确的吗?
提前致谢 :)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>clustered-queue</artifactId>
<packaging>jar</packaging>
<name>HornetQ JMS Clustered Queue Example</name>
<dependencies>
<dependency>
<groupId>org.hornetq.examples.jms</groupId>
<artifactId>hornetq-jms-examples-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-maven-plugin</artifactId>
<executions>
<execution>
<id>start1</id>
<goals>
<goal>start</goal>
</goals>
<configuration>
<jndiPort>1199</jndiPort>
<jndiRmiPort>1198</jndiRmiPort>
<hornetqConfigurationDir>${basedir}/target/classes/hornetq/server1</hornetqConfigurationDir>
<fork>true</fork>
<systemProperties>
<property>
<name>udp-address</name>
<value>${udp-address}</value>
</property>
</systemProperties>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-server</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
</configuration>
</plugin>
</plugins>
</build>
</project>