【发布时间】:2011-03-08 14:27:21
【问题描述】:
昨天,我阅读了 glassfish 嵌入示例,这个地址是: http://weblogs.java.net/blog/arungupta/archive/2008/11/totd_56_simple.html
但我运行命令 glassfish:run 时出现错误消息
No plugin found for prefix 'glassfish' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories
我的 pom.xml 是
<dependencies>
<dependency>
<groupId>org.glassfish.distributions</groupId>
<artifactId>web-all</artifactId>
<version>10.0-SNAPSHOT</version>
<type>jar</type>
<classifier>build</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.glassfish.embedded</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.0-Prelude-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
</plugin>
</plugins>
<finalName>SSH2Maven</finalName>
</build>
<pluginRepositories>
<pluginRepository>
<id>ocean glassfish</id>
<url>http://maven.ocean.net.au/snapshot</url>
<releases>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>glassfish repo</id>
<url>http://maven.glassfish.org/content/groups/glassfish</url>
</repository>
</repositories>
为什么?请给我一个完整的 pom.xml 示例,谢谢。
【问题讨论】:
标签: java maven-2 jakarta-ee glassfish