qiuwei / jing-trang

Automatically exported from code.google.com/p/jing-trang
Other
1 stars 1 forks source link

Mavenize project and add deploying binary/source/javadocs artifacts to the maven central #98

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Here is free (for open-source projects) repository manager hosting and
maven central synchronization:
http://nexus.sonatype.org/oss-repository-hosting.html

Original issue reported on code.google.com by plokhotn...@gmail.com on 18 Dec 2009 at 1:16

GoogleCodeExporter commented 8 years ago

Original comment by jjc.jclark.com on 18 Dec 2009 at 1:29

GoogleCodeExporter commented 8 years ago
Very good suggestion! Would make it easier to use the lib for anyone using a 
build tool that has dependency management that works with maven repos.

Original comment by anders.g...@gmail.com on 10 Dec 2010 at 10:30

GoogleCodeExporter commented 8 years ago

Original comment by jjc.jclark.com on 10 Dec 2010 at 1:33

GoogleCodeExporter commented 8 years ago
Hi,

Here is a first patch to mavenize the project. This patch provides all pom.xml 
to:
- generate the sources (with javacc) and the resources (like Version.properties)
- compile the classes
- run the unit tests with TestNG or Ant (apart from the "validate" test... i 
think we'll need a module "integration-test" to avoid cyclic dependencies)
- generate jar for each module (that you can upload on a public maven repository
- generate executable jars (dtdinst, jing, trang)
- generate agregate javadocs (the generating sources are still missing to fix 
the issue 107)

Before running maven, you have to install the isorelax dependency into your 
local repository:
- "cd" into "lib"
- run: mvn install:install-file -Dfile=isorelax.jar -DgroupId=isorelax 
-DartifactId=isorelax -Dversion=20041111 -Dpackaging=jar

Now you can go into the "mod" directory and run "mvn install"

Warning, to now:
- the executable jars are not tested (i did not yet check the "Class-Path" 
Manifest entry)
- the "validate" ant target is not ported (and the Ant task is not tested)

This patch contains some heavy pom.xml files because the current file hierarchy 
does not match the maven conventions.

If you accept this first patch, the next steps could be (in a specific SVN 
branch?):
- making the hierarchy more "maven conventionnal"
- cleaning the pom.xml files to use the maven convention (eg. having a 
'resources' directory and a 'java' directory, etc)
- cleaning some tests to use a temporary directory (eg. the rng-jaxp tests 
generates files into the current dir, they should live into the target 
directory or so)
- removing unused jar from the 'lib' dir, since maven handles the dependencies 
(except isorelax which seems non-existent on a public maven repo with this 
specific version 20041111)
- moving some resources (rng schema and xml files for testing purposes) into a 
integration-test module
- other suggestions from people?
- removing the current And build

Let me know if you're ok to go on

Original comment by vincent....@gmail.com on 16 Dec 2013 at 9:33

Attachments:

GoogleCodeExporter commented 8 years ago
Oops, i forgot to say i tested these pom.xml on:
$ mvn -version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
17:22:22+0200)
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "3.11-2-amd64", arch: "amd64", family: "unix"

Original comment by vincent....@gmail.com on 16 Dec 2013 at 9:35

GoogleCodeExporter commented 8 years ago
I completed my previous patch.

All files cannot be uploaded here, so i put the "mavenized" jing-trang here:
https://github.com/ghostd/jing-trang

To install the dependencies (which are unavailable with the maven repo):
* in the 'lib' directory, run "install-deps.sh"

To compile/test/package/install jing-trang:
* in the 'mod' directory, run "mvn install" 

To generate the web site (some links still need to be fixed), documentation, 
javadoc:
* in the 'mod' directory, run "mvn site post-site && mvn site:stage 
-DstagingDirectory=/tmp/jing-trang-site"

With that, you can now deploy jing-trang onto the maven central repository

Original comment by vincent....@gmail.com on 22 Feb 2014 at 3:46