mavenプロジェクトの作成
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
[[FrontPage]]
#contents
2008/03/10からのアクセス回数 &counter;
* mavenプロジェクトの作成 [#r66f1b45]
** archetypeプラグインを使ったプロジェクトの生成 [#t9fed2...
最初にarchetypeプラグインを使ってjarライブラリをターゲッ...
を作成します。
#pre{{
$ mvn archetype:create -DgroupId=sample.itext.app -Dartif...
}}
** 必要なライブラリの追加 [#m72da741]
ここでは、iTextの例題を実行するため、itextのmavenリポジト...
必要なライブラリは、[[MVNRepository>http://mvnrepository....
#ref(mvnrepository.jpg);
"itext"を入力して、Searchボタンを押すと、
- com.lowagie >> itext
と表示されるので、これをクリックします。
"iText in Action"のバージョンが1.4であり、POM Dependency...
#pre{{
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>1.4</version>
</dependency>
}}
をpom.xmlにコピーします。
残念ながらiTextAsian.jarは検索できませんでしたので、あと...
最後にEclipseのプロジェクトにします。
#pre{{
mvn eclipse:eclipse -DdownloadSources=true
}}
** 必要なjarファイルを別ディレクトリにコピーしたい [#md4b...
依存するjarファイルを[Project-dir]/dist/libにコピーする場...
#pre{{
$ mvn dependency:copy-dependencies -DoutputDirectory=dist...
}}
パッケージをビルドするときに、依存するライブラリのパスをp...
#pre{{
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>jarファイルのメインクラス</mainC...
<packageName>jarファイルのパッケージ名</pac...
<addClasspath>true</addClasspath>
<addExtensions>true</addExtensions>
<classpathPrefix>./lib</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
}}
** コメント [#i0cf0193]
この記事は、
#vote(おもしろかった,そうでもない,わかりずらい)
皆様のご意見、ご希望をお待ちしております。
#comment_kcaptcha
終了行:
[[FrontPage]]
#contents
2008/03/10からのアクセス回数 &counter;
* mavenプロジェクトの作成 [#r66f1b45]
** archetypeプラグインを使ったプロジェクトの生成 [#t9fed2...
最初にarchetypeプラグインを使ってjarライブラリをターゲッ...
を作成します。
#pre{{
$ mvn archetype:create -DgroupId=sample.itext.app -Dartif...
}}
** 必要なライブラリの追加 [#m72da741]
ここでは、iTextの例題を実行するため、itextのmavenリポジト...
必要なライブラリは、[[MVNRepository>http://mvnrepository....
#ref(mvnrepository.jpg);
"itext"を入力して、Searchボタンを押すと、
- com.lowagie >> itext
と表示されるので、これをクリックします。
"iText in Action"のバージョンが1.4であり、POM Dependency...
#pre{{
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>1.4</version>
</dependency>
}}
をpom.xmlにコピーします。
残念ながらiTextAsian.jarは検索できませんでしたので、あと...
最後にEclipseのプロジェクトにします。
#pre{{
mvn eclipse:eclipse -DdownloadSources=true
}}
** 必要なjarファイルを別ディレクトリにコピーしたい [#md4b...
依存するjarファイルを[Project-dir]/dist/libにコピーする場...
#pre{{
$ mvn dependency:copy-dependencies -DoutputDirectory=dist...
}}
パッケージをビルドするときに、依存するライブラリのパスをp...
#pre{{
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>jarファイルのメインクラス</mainC...
<packageName>jarファイルのパッケージ名</pac...
<addClasspath>true</addClasspath>
<addExtensions>true</addExtensions>
<classpathPrefix>./lib</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
}}
** コメント [#i0cf0193]
この記事は、
#vote(おもしろかった,そうでもない,わかりずらい)
皆様のご意見、ご希望をお待ちしております。
#comment_kcaptcha
ページ名:
SmartDoc