Maven build and javadoc

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Maven build and javadoc

Tom Coleman

Hi

I'm trying to build the project using Maven.   2 dumb questions.  Sorry.

How can I generate javadoc from the maven root directory?

mvn javadoc:javadoc just creates an xml file: javadoc-options-javadoc-resources.xml.  Google didn’t really help.

And how can I get a version number into the jars?  Here’s what I get now:

./core/target/pivot-core-@VERSION@.jar

Thanks.





Reply | Threaded
Open this post in threaded view
|

RE: Maven build and javadoc

Roger Whitcomb-2
Hi Tom,
        Welcome to Pivot!

        Two (hopefully helpful) answers:
1. I don't usually use Maven to build Pivot, but if you change the @VERSION@ in the "pom.xml" you will get that version in the file names.
2. I *think* we are missing Javadoc plugin information in the "pom.xml", but I'm stumped (as well) as to how to do it.  Maybe with the <reporting> option?  But, actually I can't even get "mvn install" to build things.  

Can you use "ant" instead??  "ant package" works really well, as does "ant doc"....

Sandro set up the "pom.xml", so hopefully he can help more.

~Roger

-----Original Message-----
From: Tom Coleman [mailto:[hidden email]]
Sent: Tuesday, January 19, 2016 9:12 AM
To: [hidden email]
Subject: Maven build and javadoc


Hi

I'm trying to build the project using Maven.   2 dumb questions.  Sorry.

How can I generate javadoc from the maven root directory?

mvn javadoc:javadoc just creates an xml file: javadoc-options-javadoc-resources.xml.  Google didn't really help.

And how can I get a version number into the jars?  Here's what I get now:

./core/target/pivot-core-@VERSION@.jar

Thanks.





Reply | Threaded
Open this post in threaded view
|

RE: Maven build and javadoc

Roger Whitcomb-2
In reply to this post by Tom Coleman
Actually, I think the biggest problem is that our project directory structures don't conform to the standard Maven conventions (see https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html) and I don't see any project descriptor settings that would change that.

~Roger

-----Original Message-----
From: Tom Coleman [mailto:[hidden email]]
Sent: Tuesday, January 19, 2016 9:12 AM
To: [hidden email]
Subject: Maven build and javadoc


Hi

I'm trying to build the project using Maven.   2 dumb questions.  Sorry.

How can I generate javadoc from the maven root directory?

mvn javadoc:javadoc just creates an xml file: javadoc-options-javadoc-resources.xml.  Google didn't really help.

And how can I get a version number into the jars?  Here's what I get now:

./core/target/pivot-core-@VERSION@.jar

Thanks.





Reply | Threaded
Open this post in threaded view
|

RE: Maven build and javadoc

Sandro Martini

Hi all and sorry for the delay,
as Roger said Pivot maven files was mainly done to be able to generate and publish jar files in main Maven repository  (central).
But all is driven by our Ant build; there is a dedicated task to let Ant maven task (related jar is needed in CLASSPATH in this case) to generate and install maven compatible jars in a local repository.

I know that we should update our build system to maven or gradle, but time is needed to do it because there are other tasks not so simple to migrate/rewrite.

Any  help is welcome :-) .

Tell me if you need more info on this.

Bye,
Sandro

Il 20/Gen/2016 01:39, "Roger Whitcomb" <[hidden email]> ha scritto:
Actually, I think the biggest problem is that our project directory structures don't conform to the standard Maven conventions (see https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html) and I don't see any project descriptor settings that would change that.

~Roger

-----Original Message-----
From: Tom Coleman [mailto:[hidden email]]
Sent: Tuesday, January 19, 2016 9:12 AM
To: [hidden email]
Subject: Maven build and javadoc


Hi

I'm trying to build the project using Maven.   2 dumb questions.  Sorry.

How can I generate javadoc from the maven root directory?

mvn javadoc:javadoc just creates an xml file: javadoc-options-javadoc-resources.xml.  Google didn't really help.

And how can I get a version number into the jars?  Here's what I get now:

./core/target/pivot-core-@VERSION@.jar

Thanks.





Reply | Threaded
Open this post in threaded view
|

RE: Maven build and javadoc

Tom Coleman
In reply to this post by Tom Coleman
Actually, you may be closer to a complete maven build than you think.

(And I was able to build the docs with 'ant doc'. I was just trying to avoid having to set up the ant classpath.)

And the reason I posted here was to try to avoid having to read through the documentation for the maven javadoc plugin.

Personally, I find Maven a complete pain (and you can see how much I know about it from my @VERSION@ question), but then there's something to be said for the simplicity of 'mvn clean install'.

Right now I am wading through the Pivot docs trying to get a handle on them. When the smoke clears I will have a look at the maven build.

You know what they say about projects: "If they can build it they will come."

Thanks,

Tom


Sandro Martini <[hidden email]> wrote:

Hi all and sorry for the delay,
as Roger said Pivot maven files was mainly done to be able to generate and publish jar files in main Maven repository  (central).
But all is driven by our Ant build; there is a dedicated task to let Ant maven task (related jar is needed in CLASSPATH in this case) to generate and install maven compatible jars in a local repository.

I know that we should update our build system to maven or gradle, but time is needed to do it because there are other tasks not so simple to migrate/rewrite.

Any  help is welcome :-) .

Tell me if you need more info on this.

Bye,
Sandro

Il 20/Gen/2016 01:39, "Roger Whitcomb" <[hidden email]> ha scritto:
Actually, I think the biggest problem is that our project directory structures don't conform to the standard Maven conventions (see https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html) and I don't see any project descriptor settings that would change that.

~Roger

-----Original Message-----
From: Tom Coleman [mailto:[hidden email]]
Sent: Tuesday, January 19, 2016 9:12 AM
To: [hidden email]
Subject: Maven build and javadoc


Hi

I'm trying to build the project using Maven.   2 dumb questions.  Sorry.

How can I generate javadoc from the maven root directory?

mvn javadoc:javadoc just creates an xml file: javadoc-options-javadoc-resources.xml.  Google didn't really help.

And how can I get a version number into the jars?  Here's what I get now:

./core/target/pivot-core-@VERSION@.jar

Thanks.





Reply | Threaded
Open this post in threaded view
|

Re: Maven build and javadoc

Sandro Martini
Hi Tom,
note that Pivot build was setup years ago, when Ant was mainstream,
and it's not a project requiring a complex build (so Maven or Gradle
or other aren't strictly required).

Anyway if there is enough interest in the community I'm available to
discuss/implement a new version of our build system for example with
Gradle, but only for some common tasks (and if needed keep others with
Ant, could be a good compromise for now) because there are others not
so simple to migrate but only for the code in trunk 2.1.x (or better
for next major release, 2.5.x).

Anyway, currently if you have ant available and in the CLASSPATH the
ant-maven bridge jar, you have to:

$ ant maven-install

that generates Pivot jars in a format compatible with binary jars,
source jars, javadoc jars, and install them in a local maven
repository.

Note that pom.xml files in our sources are not usable directly because
our build system does a replace of varibles inside (like the @VERSION@
you wrote before).

Last (just for info), some year ago I wrote a Maven archetype (a
near-empty template project) for Pivot, you can find its sources here:

http://svn.apache.org/repos/asf/pivot/skunk/

but it has never been published in maven main repository because we
didn't have a valid vote to release it.
Even for this, is there is enough community interest we can update and
try a vote ...


As always, be free to ask for more info.

Bye,
Sandro


2016-01-20 13:55 GMT+01:00 Tom <[hidden email]>:

> Actually, you may be closer to a complete maven build than you think.
>
> (And I was able to build the docs with 'ant doc'. I was just trying to avoid
> having to set up the ant classpath.)
>
> And the reason I posted here was to try to avoid having to read through the
> documentation for the maven javadoc plugin.
>
> Personally, I find Maven a complete pain (and you can see how much I know
> about it from my @VERSION@ question), but then there's something to be said
> for the simplicity of 'mvn clean install'.
>
> Right now I am wading through the Pivot docs trying to get a handle on them.
> When the smoke clears I will have a look at the maven build.
>
> You know what they say about projects: "If they can build it they will
> come."
>
> Thanks,
>
> Tom
>
>
>
> Sandro Martini <[hidden email]> wrote:
>
> Hi all and sorry for the delay,
> as Roger said Pivot maven files was mainly done to be able to generate and
> publish jar files in main Maven repository  (central).
> But all is driven by our Ant build; there is a dedicated task to let Ant
> maven task (related jar is needed in CLASSPATH in this case) to generate and
> install maven compatible jars in a local repository.
>
> I know that we should update our build system to maven or gradle, but time
> is needed to do it because there are other tasks not so simple to
> migrate/rewrite.
>
> Any  help is welcome :-) .
>
> Tell me if you need more info on this.
>
> Bye,
> Sandro
>
> Il 20/Gen/2016 01:39, "Roger Whitcomb" <[hidden email]> ha
> scritto:
>>
>> Actually, I think the biggest problem is that our project directory
>> structures don't conform to the standard Maven conventions (see
>> https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html)
>> and I don't see any project descriptor settings that would change that.
>>
>> ~Roger
>>
>> -----Original Message-----
>> From: Tom Coleman [mailto:[hidden email]]
>> Sent: Tuesday, January 19, 2016 9:12 AM
>> To: [hidden email]
>> Subject: Maven build and javadoc
>>
>>
>> Hi
>>
>> I'm trying to build the project using Maven.   2 dumb questions.  Sorry.
>>
>> How can I generate javadoc from the maven root directory?
>>
>> mvn javadoc:javadoc just creates an xml file:
>> javadoc-options-javadoc-resources.xml.  Google didn't really help.
>>
>> And how can I get a version number into the jars?  Here's what I get now:
>>
>> ./core/target/pivot-core-@VERSION@.jar
>>
>> Thanks.
>>
>>
>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Maven build and javadoc

Tom Coleman
In reply to this post by Tom Coleman
Oh please; not Gradle.  Especially when you appear to be so very close with Maven.

I know of one C++ project whose complex custom build hasn't changed significantly in 15 years.  The project is a mess and there is no doubt in my mind that the build system has contributed stifling interest in the project.

I'm not suggesting any comparison with Pivot's ant build.  My only point is that builds matter and can impact adoption.

And with that I will get back to reading the Pivot docs.

Thanks,

Tom




Sandro Martini <[hidden email]> wrote:

>Hi Tom,
>note that Pivot build was setup years ago, when Ant was mainstream,
>and it's not a project requiring a complex build (so Maven or Gradle
>or other aren't strictly required).
>
>Anyway if there is enough interest in the community I'm available to
>discuss/implement a new version of our build system for example with
>Gradle, but only for some common tasks (and if needed keep others with
>Ant, could be a good compromise for now) because there are others not
>so simple to migrate but only for the code in trunk 2.1.x (or better
>for next major release, 2.5.x).
>
>Anyway, currently if you have ant available and in the CLASSPATH the
>ant-maven bridge jar, you have to:
>
>$ ant maven-install
>
>that generates Pivot jars in a format compatible with binary jars,
>source jars, javadoc jars, and install them in a local maven
>repository.
>
>Note that pom.xml files in our sources are not usable directly because
>our build system does a replace of varibles inside (like the @VERSION@
>you wrote before).
>
>Last (just for info), some year ago I wrote a Maven archetype (a
>near-empty template project) for Pivot, you can find its sources here:
>
>http://svn.apache.org/repos/asf/pivot/skunk/
>
>but it has never been published in maven main repository because we
>didn't have a valid vote to release it.
>Even for this, is there is enough community interest we can update and
>try a vote ...
>
>
>As always, be free to ask for more info.
>
>Bye,
>Sandro
>
>
>2016-01-20 13:55 GMT+01:00 Tom <[hidden email]>:
>> Actually, you may be closer to a complete maven build than you think.
>>
>> (And I was able to build the docs with 'ant doc'. I was just trying to avoid
>> having to set up the ant classpath.)
>>
>> And the reason I posted here was to try to avoid having to read through the
>> documentation for the maven javadoc plugin.
>>
>> Personally, I find Maven a complete pain (and you can see how much I know
>> about it from my @VERSION@ question), but then there's something to be said
>> for the simplicity of 'mvn clean install'.
>>
>> Right now I am wading through the Pivot docs trying to get a handle on them.
>> When the smoke clears I will have a look at the maven build.
>>
>> You know what they say about projects: "If they can build it they will
>> come."
>>
>> Thanks,
>>
>> Tom
>>
>>
>>
>> Sandro Martini <[hidden email]> wrote:
>>
>> Hi all and sorry for the delay,
>> as Roger said Pivot maven files was mainly done to be able to generate and
>> publish jar files in main Maven repository  (central).
>> But all is driven by our Ant build; there is a dedicated task to let Ant
>> maven task (related jar is needed in CLASSPATH in this case) to generate and
>> install maven compatible jars in a local repository.
>>
>> I know that we should update our build system to maven or gradle, but time
>> is needed to do it because there are other tasks not so simple to
>> migrate/rewrite.
>>
>> Any  help is welcome :-) .
>>
>> Tell me if you need more info on this.
>>
>> Bye,
>> Sandro
>>
>> Il 20/Gen/2016 01:39, "Roger Whitcomb" <[hidden email]> ha
>> scritto:
>>>
>>> Actually, I think the biggest problem is that our project directory
>>> structures don't conform to the standard Maven conventions (see
>>> https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html)
>>> and I don't see any project descriptor settings that would change that.
>>>
>>> ~Roger
>>>
>>> -----Original Message-----
>>> From: Tom Coleman [mailto:[hidden email]]
>>> Sent: Tuesday, January 19, 2016 9:12 AM
>>> To: [hidden email]
>>> Subject: Maven build and javadoc
>>>
>>>
>>> Hi
>>>
>>> I'm trying to build the project using Maven.   2 dumb questions.  Sorry.
>>>
>>> How can I generate javadoc from the maven root directory?
>>>
>>> mvn javadoc:javadoc just creates an xml file:
>>> javadoc-options-javadoc-resources.xml.  Google didn't really help.
>>>
>>> And how can I get a version number into the jars?  Here's what I get now:
>>>
>>> ./core/target/pivot-core-@VERSION@.jar
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>>
>>
Reply | Threaded
Open this post in threaded view
|

RE: Maven build and javadoc

Roger Whitcomb-2
I didn't write Pivot's build script, but to me, it is quite straightforward.  You only need Ant, the JDK and a current JUnit.  Add JUnit to the classpath and do "ant clean package" ...  Probably need ANT_HOME in the path, and JAVA_HOME set, but I think that's it.  That's simpler than my own project's build setup.

Just a comment.

But, of course, a "properly" setup Maven POM would be nice as well -- it's just that few of us like Maven, so ....  But, if you come up with a patch to "fix" our Maven build, I'm quite happy to consider it.  And if you're serious, you could open a JIRA about it.

Thanks,
~Roger

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Wednesday, January 20, 2016 6:29 AM
To: [hidden email]
Subject: Re: Maven build and javadoc

Oh please; not Gradle.  Especially when you appear to be so very close with Maven.

I know of one C++ project whose complex custom build hasn't changed significantly in 15 years.  The project is a mess and there is no doubt in my mind that the build system has contributed stifling interest in the project.

I'm not suggesting any comparison with Pivot's ant build.  My only point is that builds matter and can impact adoption.

And with that I will get back to reading the Pivot docs.

Thanks,

Tom




Sandro Martini <[hidden email]> wrote:

>Hi Tom,
>note that Pivot build was setup years ago, when Ant was mainstream, and
>it's not a project requiring a complex build (so Maven or Gradle or
>other aren't strictly required).
>
>Anyway if there is enough interest in the community I'm available to
>discuss/implement a new version of our build system for example with
>Gradle, but only for some common tasks (and if needed keep others with
>Ant, could be a good compromise for now) because there are others not
>so simple to migrate but only for the code in trunk 2.1.x (or better
>for next major release, 2.5.x).
>
>Anyway, currently if you have ant available and in the CLASSPATH the
>ant-maven bridge jar, you have to:
>
>$ ant maven-install
>
>that generates Pivot jars in a format compatible with binary jars,
>source jars, javadoc jars, and install them in a local maven
>repository.
>
>Note that pom.xml files in our sources are not usable directly because
>our build system does a replace of varibles inside (like the @VERSION@
>you wrote before).
>
>Last (just for info), some year ago I wrote a Maven archetype (a
>near-empty template project) for Pivot, you can find its sources here:
>
>http://svn.apache.org/repos/asf/pivot/skunk/
>
>but it has never been published in maven main repository because we
>didn't have a valid vote to release it.
>Even for this, is there is enough community interest we can update and
>try a vote ...
>
>
>As always, be free to ask for more info.
>
>Bye,
>Sandro
>
>
>2016-01-20 13:55 GMT+01:00 Tom <[hidden email]>:
>> Actually, you may be closer to a complete maven build than you think.
>>
>> (And I was able to build the docs with 'ant doc'. I was just trying
>> to avoid having to set up the ant classpath.)
>>
>> And the reason I posted here was to try to avoid having to read
>> through the documentation for the maven javadoc plugin.
>>
>> Personally, I find Maven a complete pain (and you can see how much I
>> know about it from my @VERSION@ question), but then there's something
>> to be said for the simplicity of 'mvn clean install'.
>>
>> Right now I am wading through the Pivot docs trying to get a handle on them.
>> When the smoke clears I will have a look at the maven build.
>>
>> You know what they say about projects: "If they can build it they
>> will come."
>>
>> Thanks,
>>
>> Tom
>>
>>
>>
>> Sandro Martini <[hidden email]> wrote:
>>
>> Hi all and sorry for the delay,
>> as Roger said Pivot maven files was mainly done to be able to
>> generate and publish jar files in main Maven repository  (central).
>> But all is driven by our Ant build; there is a dedicated task to let
>> Ant maven task (related jar is needed in CLASSPATH in this case) to
>> generate and install maven compatible jars in a local repository.
>>
>> I know that we should update our build system to maven or gradle, but
>> time is needed to do it because there are other tasks not so simple
>> to migrate/rewrite.
>>
>> Any  help is welcome :-) .
>>
>> Tell me if you need more info on this.
>>
>> Bye,
>> Sandro
>>
>> Il 20/Gen/2016 01:39, "Roger Whitcomb" <[hidden email]> ha
>> scritto:
>>>
>>> Actually, I think the biggest problem is that our project directory
>>> structures don't conform to the standard Maven conventions (see
>>> https://maven.apache.org/guides/introduction/introduction-to-the-sta
>>> ndard-directory-layout.html) and I don't see any project descriptor
>>> settings that would change that.
>>>
>>> ~Roger
>>>
>>> -----Original Message-----
>>> From: Tom Coleman [mailto:[hidden email]]
>>> Sent: Tuesday, January 19, 2016 9:12 AM
>>> To: [hidden email]
>>> Subject: Maven build and javadoc
>>>
>>>
>>> Hi
>>>
>>> I'm trying to build the project using Maven.   2 dumb questions.  Sorry.
>>>
>>> How can I generate javadoc from the maven root directory?
>>>
>>> mvn javadoc:javadoc just creates an xml file:
>>> javadoc-options-javadoc-resources.xml.  Google didn't really help.
>>>
>>> And how can I get a version number into the jars?  Here's what I get now:
>>>
>>> ./core/target/pivot-core-@VERSION@.jar
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>>
>>