ryomasaber / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Migrate ant-build scripts #385

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I was looking for starting an ihm prototype. After cloning your repository I 
saw the build is delegated to ant scripts. 

Is there any technical reason you don't use maven assemblies to generate 
artifacts?

Original issue reported on code.google.com by huchet.j...@gmail.com on 24 Feb 2014 at 10:08

GoogleCodeExporter commented 8 years ago
Yes, Ant build.xml is called in pom.xml. And may also be called individually.
But, the build is not delegated to ant build.xml. javamelody-core artifacts are 
generated by Maven from 
https://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/pom.xml
and those are then deployed in 
http://search.maven.org/#search|ga|1|a%3A%22javamelody-core%22

The only question which you could ask, is if calling Ant is necessary in 
pom.xml. 
What do you think?

Original comment by evernat@free.fr on 28 Feb 2014 at 9:01

GoogleCodeExporter commented 8 years ago
I agree with you : "javamelody-core artifacts are generated by Maven".
I disagree when you say that "the build is not delegated to ant build.xml". I 
saw <javac/> task invocations here 
https://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/build.x
ml#95, that's why I assumed a part of the build is delegated to ant. But it 
concerns only files uploaded to google code _downloads_ page.

Here is what I understand :
- javamelody-core artifacts generated by maven are deployed to maven-central 
repo ;
- ant build script generates artefacts uploaded to the google code _downloads_ 
page ;
- I see that a second javamelody.jar is uploaded there, it could be the same as 
the one generated by maven (There is a gcupload-maven-plugin 
[http://maven.riedelcastro.org/gcupload-maven-plugin/] you could use to avoid 
building the same jar twice) ;
- Packaging tasks delegated to ant can be done easily using maven assemblies.

I think it's not necessary to invoke ant from maven, am I wrong ?

Storing binary files in the source code repository isn't a good practice. Also 
you have to maintain the coherence between pom.xml descriptor and the binary 
jar files in your source repository.

A solution to remove the ant build script may be setting up the following 
structure :
+ trunk
  - javamelody-core [type jar]
  - javamelody-collector-webapp [type war]
  - javamelody-test-webapp [type war]
  - javamelody-jira [type jar]
  - javamelody-objectfactory [jar]
  - javamelody-package [use specific assembly descriptor to produce the zip package]

You could use an execution of the gcupload-maven-plugin per module to upload 
the artifacts to google code _downloads_ page.

Original comment by huchet.j...@gmail.com on 1 Mar 2014 at 11:26

GoogleCodeExporter commented 8 years ago
What you understand is correct (and there are no maven assemblies today). I 
know well maven assemblies, but they are sometimes overkill compared to ant.

It's currently necessary to invoke ant from maven for the current maven site.
But the maven site could change and it is useless anyway given Jenkins-CI.

About googlecode uploads to the downloads page: there were definitely closed by 
google in January. No new uploads are possible.

Original comment by evernat@free.fr on 1 Mar 2014 at 12:15

GoogleCodeExporter commented 8 years ago
I have removed calling Ant for jar/zip files in pom.xml and I have changed the 
Maven site which doesn't need them anyway.
I keep the ant scripts, because I like them. So this is invalid.

Original comment by evernat@free.fr on 1 Mar 2014 at 5:38