アットウィキロゴ

Maven

proxy setting


~/build.properties:
maven.proxy.host=proxyhost
maven.proxy.port=proxyport

genapp


$ maven genapp

Enter a project template to use: [default]

Please specify an id for your application: [app]

Please specify a name for your application: [Example Application]

Please specify the package for your application: [example.app]

build:start:

genapp:
   [copy] Copying 1 file to /home/yoshi/src/java/example/app
   [copy] Copying 3 files to /home/yoshi/src/test/example/app
   [copy] Copying 1 file to /home/yoshi
   [copy] Copying 2 files to /home/yoshi
BUILD SUCCESSFUL
Total time: 26 seconds
Finished at: Sun Mar 05 21:53:30 JST 2006


site

[yoshi@localhost maven1]$ maven site

jar

$ maven jar

localize

In project.xml. maven.xml

<?xml version="1.0" encoding="Shift_JIS"

properties:
maven.compile.encoding = ...
javadoc.encoding = ...
maven.docs.outputencoding = ...

config files

project.xml must. source location, test location, lib info
project.properties common properties for entire project
build.properties per user build properties, should not be shared
maven.xml put goals

adding dependency

Add something like below to build.xml

 <dependencies>
   <dependency>
     <id>commons-beanutils</id>
     <version>1.6</version>
   </dependency>
   <dependency>
     <id>commons-collections</id>
     <version>3.1</version>
   </dependency>
   <dependency>
     <id>commons-logging</id>
     <version>1.0.3</version>
   </dependency>
 </dependencies>

adding 'run' to maven

add something like below to maven.xml

<project>
 <goal name="run" prereqs="jar">
   <java classname="example.app.Prop" fork="true">
     <classpath>
       <pathelement location="${maven.build.dest}"/>
     </classpath>
     <classpath refid="maven.dependency.classpath"/>
   </java>
 </goal>
</project>
最終更新:2006年03月06日 02:46
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。