Gradle problems when building adql-java package

2023-12-08 Thread Ole Streicher
Hi,

I am trying to update the adql-java package to the newest upstream
(beta) version. As it is my first project using gradle, I sumbled upon a
number of problems:

One is that the plugin org.javacc.javacc is not available. I guess this
is because it is not packaged yet, right? My solution here is that I
call javacc in d/rules before running dh_auto_build; is this the way to
go?

After this, dh_auto_build completes, but the tests fail with

> Could not resolve junit:junit:4.13.1.
  Required by:
  project :ADQLLib
   > No cached version of junit:junit:4.13.1 available for offline mode.

which is caused by

dependencies {
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.slf4j:slf4j-simple:1.7.25'
}

in the main build.gradle (right?) junit4 is however a build dependency
(currently 4.13.2 in unstable). What should I do here? Are the versions
here minversions? Removing the complete dependency will cause junit4
classes missing in the test, also setting the CLASSPATH environment
variable doesn't help. What is the proper solution here?

Best

Ole



Re: Gradle problems when building adql-java package

2023-12-08 Thread Andrius Merkys

Hi Ole,

On 2023-12-08 13:03, Ole Streicher wrote:

I am trying to update the adql-java package to the newest upstream
(beta) version. As it is my first project using gradle, I sumbled upon a
number of problems:

One is that the plugin org.javacc.javacc is not available. I guess this
is because it is not packaged yet, right? My solution here is that I
call javacc in d/rules before running dh_auto_build; is this the way to
go?

After this, dh_auto_build completes, but the tests fail with

 > Could not resolve junit:junit:4.13.1.
   Required by:
   project :ADQLLib
> No cached version of junit:junit:4.13.1 available for offline mode.

which is caused by

 dependencies {
 testImplementation 'junit:junit:4.13.1'
 testImplementation 'org.slf4j:slf4j-simple:1.7.25'
 }

in the main build.gradle (right?) junit4 is however a build dependency
(currently 4.13.2 in unstable). What should I do here? Are the versions
here minversions? Removing the complete dependency will cause junit4
classes missing in the test, also setting the CLASSPATH environment
variable doesn't help. What is the proper solution here?


I guess you could patch 'junit:junit:4.13.1' with 'junit:junit:4.x' to 
avoid this overly strict dependency version checking.


In some projects I maintain I got fed up with gradle and switched to 
plain jh_build. An example could be found in lucene9 [1]. I even found a 
way to build and run tests, but I did not succeed in doing so for 
lucene9, need to refresh my memory why.


[1] https://sources.debian.org/src/lucene9/9.4.2%2Bdfsg-2/debian/rules/

Hope this helps,
Andrius



Re: Gradle problems when building adql-java package

2023-12-08 Thread Ole Streicher
Hi Andrius,

Andrius Merkys  writes:
> On 2023-12-08 13:03, Ole Streicher wrote:
>> I am trying to update the adql-java package to the newest upstream
>> (beta) version. As it is my first project using gradle, I sumbled upon a
>> number of problems: [...]
>
> I guess you could patch 'junit:junit:4.13.1' with 'junit:junit:4.x' to
> avoid this overly strict dependency version checking.

Thank you! This worked.

Now I have the next problem: the original ADQLLib/build.gradle contains the 
lines

// Name of the JAR name (which will be then suffixed by the version number):
archivesBaseName = "adql"
distributions {
main {
distributionBaseName = archivesBaseName
}
}

When I removed the "distributions" block, the Jar file has the wrong
name (ADQLLib.jar). But when I include it, I get the error

* What went wrong:
A problem occurred evaluating project ':ADQLLib'.
> Could not set unknown property 'distributionBaseName' for object of type 
org.gradle.api.distribution.internal.DefaultDistribution.

However, when looking in the Gradle docs, I find this as a valid
configuration. Do you have any idea here?

Cheers

Ole



Re: Gradle problems when building adql-java package

2023-12-08 Thread Pierre Gruet

Hi Ole,

Le 08/12/2023 à 13:59, Ole Streicher a écrit :

Hi Andrius,

Andrius Merkys  writes:

On 2023-12-08 13:03, Ole Streicher wrote:

I am trying to update the adql-java package to the newest upstream
(beta) version. As it is my first project using gradle, I sumbled upon a
number of problems: [...]


I guess you could patch 'junit:junit:4.13.1' with 'junit:junit:4.x' to
avoid this overly strict dependency version checking.


Thank you! This worked.

Now I have the next problem: the original ADQLLib/build.gradle contains the 
lines

 // Name of the JAR name (which will be then suffixed by the version 
number):
 archivesBaseName = "adql"
 distributions {
 main {
 distributionBaseName = archivesBaseName
 }
 }

When I removed the "distributions" block, the Jar file has the wrong
name (ADQLLib.jar). But when I include it, I get the error

 * What went wrong:
 A problem occurred evaluating project ':ADQLLib'.
 > Could not set unknown property 'distributionBaseName' for object of type 
org.gradle.api.distribution.internal.DefaultDistribution.

However, when looking in the Gradle docs, I find this as a valid
configuration. Do you have any idea here?


Hmm, unfortunately we have an old Gradle in Debian at the moment. One 
has to look at the docs for version 4.4:

https://docs.gradle.org/4.4/userguide/distribution_plugin.html
By reading this, I think you could try
baseName = archivesBaseName
instead of
distributionBaseName = archivesBaseName

Tell us if it works...



Cheers

Ole



Best,

--
Pierre


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Gradle problems when building adql-java package

2023-12-08 Thread Ole Streicher
Hi Pierre,

Pierre Gruet  writes:
> Le 08/12/2023 à 13:59, Ole Streicher a écrit :
>> When I removed the "distributions" block, the Jar file has the wrong
>> name (ADQLLib.jar). But when I include it, I get the error
>>  * What went wrong:
>>  A problem occurred evaluating project ':ADQLLib'.
>>  > Could not set unknown property 'distributionBaseName' for object of 
>> type org.gradle.api.distribution.internal.DefaultDistribution.
>> However, when looking in the Gradle docs, I find this as a valid
>> configuration. Do you have any idea here?
>
> Hmm, unfortunately we have an old Gradle in Debian at the moment. One
> has to look at the docs for version 4.4:
>   https://docs.gradle.org/4.4/userguide/distribution_plugin.html
> By reading this, I think you could try
>   baseName = archivesBaseName
> instead of
>   distributionBaseName = archivesBaseName
>
> Tell us if it works...

Yes it does. Thank you very much! I now can build the library
package. Some problems to resolve (documentation build, CI tests), but
I am optimistic now :-)

Best

Ole



ditaa on Salsa

2023-12-08 Thread Alexandre Detiste
Hi,

I found ditaa on Salsa: https://salsa.debian.org/java-team/ditaa

I'd like to do one QA upload
to fix #953572 & more misc tiny stuff
and push changes there.

Can I get access to this one repo ?

Greetings

(or anybody else do it)



Re: ditaa on Salsa

2023-12-08 Thread Markus Koschany
Am Freitag, dem 08.12.2023 um 16:34 +0100 schrieb Alexandre Detiste:
> Hi,
> 
> I found ditaa on Salsa: https://salsa.debian.org/java-team/ditaa
> 
> I'd like to do one QA upload
> to fix #953572 & more misc tiny stuff
> and push changes there.
> 
> Can I get access to this one repo ?

Done. Bienvenue Alexandre.


signature.asc
Description: This is a digitally signed message part