maven

  1. start using maven
  2. executable jar

maven diversous

Skipping Unit Test
-Dmaven.test.skip=true
specify pom.xml
mvn -f pomrec.xml

combo

mvn -f pomrec.xml jar:jar -Dmaven.test.skip=true
don't archive specific files AND let jar executable

running code

			<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.3.1</version>
					<configuration>
							<excludes>
									<exclude>**/Cl*.class</exclude>
							</excludes>
							<archive>
								<manifest>
									<mainClass>tiddsite.tiddsite.Tsr</mainClass>
								</manifest>
							</archive>
					</configuration>
			</plugin>

普通のホームページスペースにmavenレポジトリを作成する

ここではfc2ホームページスペースを使う。
ホームページスペースによっては.html,.cssしか受け付けなかったりするため要確認

~/.m2/settings.xml

  <servers>
    <server>
      <id>dachoh.web.fc2.com</id>
      <username>dachoh</username>
      <password>秘密である</password>
    </server>
  </servers>

pom.xml

  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ftp</artifactId>
        <version>1.0-alpha-6</version>
      </extension>
    </extensions>
  </build>
  <distributionManagement>
<!--    <repository>-->
<!--      <id>deploy-repository</id>-->
<!--      <name>deployRepository</name>-->
<!--      <url>file:///home/r/.m2/repository/deployRepository</url>-->
<!--    </repository>-->
	<repository>
      		<id>dachoh.web.fc2.com</id>
      		<url>ftp://dachoh.web.fc2.com/mvn</url>
	</repository>
  </distributionManagement>

なお、mvnフォルダはアップロード先に予めgftp等なんででも構わないから作っておく必要がある

結果

[INFO] [jar:jar {execution: default-jar}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing /home/r/workspace20130706/parser/target/parser-0.0.1-SNAPSHOT.jar to /home/r/.m2/repository/tiddlywiki/syntax/parser/parser/0.0.1-SNAPSHOT/parser-0.0.1-SNAPSHOT.jar
[INFO] [deploy:deploy {execution: default-deploy}]
[INFO] Retrieving previous build number from dachoh.web.fc2.com
[INFO] repository metadata for: 'snapshot tiddlywiki.syntax.parser:parser:0.0.1-SNAPSHOT' could not be found on repository: dachoh.web.fc2.com, so will be created
Uploading: ftp://dachoh.web.fc2.com/mvn/tiddlywiki/syntax/parser/parser/0.0.1-SNAPSHOT/parser-0.0.1-20130717.132543-1.jar
64K uploaded  (parser-0.0.1-20130717.132543-1.jar)
[INFO] Retrieving previous metadata from dachoh.web.fc2.com
[INFO] repository metadata for: 'artifact tiddlywiki.syntax.parser:parser' could not be found on repository: dachoh.web.fc2.com, so will be created
[INFO] Uploading repository metadata for: 'artifact tiddlywiki.syntax.parser:parser'
[INFO] Uploading project information for parser 0.0.1-20130717.132543-1
[INFO] Retrieving previous metadata from dachoh.web.fc2.com
[INFO] repository metadata for: 'snapshot tiddlywiki.syntax.parser:parser:0.0.1-SNAPSHOT' could not be found on repository: dachoh.web.fc2.com, so will be created
[INFO] Uploading repository metadata for: 'snapshot tiddlywiki.syntax.parser:parser:0.0.1-SNAPSHOT'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 9 seconds
[INFO] Finished at: Wed Jul 17 22:26:48 JST 2013
[INFO] Final Memory: 16M/39M
[INFO] ------------------------------------------------------------------------

maven:このjava tiddlywikiパーサを組み込むには

    last modified: 20 July 2013 [ View wiki source Close ]
     
SEARCH DIFFERENCE ATTACHMENT RECENT POST