2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Bluemix libertyアプリ用のmaven構成 (ローカルにwas-libertyがない場合)

Posted at

自動生成されるアプリにeclipseプロジェクト構成も含まれるが(JavaEE5になってるっぽい…)、サーバーランタイムが無いのではunboundになっている。
ローカルのWAS liberty profileなどbluemix以外にテストサーバーを構成していない場合、サーバー・ランタイムがないのでeclipseとかでビルドすると怒られる。

pom.xmlに以下を追加してやれば、mavenがWAS liberty profileで依存しているjarをライブラリに追加してくれるので、JavaEE7構成でビルドしても怒られない。
(2016年1月現在)

pom.xml
<project>
	<repositories>
		<!-- Configure WASdev repository -->
		<repository>
			<id>WASdev</id>
			<name>WASdev Repository</name>
			<url>http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.ibm.tools.target</groupId>
			<artifactId>was-liberty</artifactId>
			<version>8.5.x.5</version>
			<type>pom</type>
			<scope>provided</scope>
		</dependency>
	</dependencies>
</project>
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?