Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Java (http://www.linux-archive.org/debian-java/)
-   -   maven-compiler-plugin being stripped from parent poms when using maven-debian-helper? (http://www.linux-archive.org/debian-java/696737-maven-compiler-plugin-being-stripped-parent-poms-when-using-maven-debian-helper.html)

Daniel Thomas 08-22-2012 04:46 PM

maven-compiler-plugin being stripped from parent poms when using maven-debian-helper?
 
Hello,

I have been debianising some of our maven packages to make deployment to
our servers easier (and because there is a small group of other people
who might find them useful). I used mh_make to generate the debian files
and then edited them.
We have a parent pom which specifies sensible defaults for various
things such as the java source version to use (1.6 rather than the
ancient defaults).
https://github.com/ucam-cl-dtg/dtg-pom/blob/debian/parent/pom.xml
When I debianised it despite the maven-compiler-plugin not being listed
in debian/maven.ignoreRules the filtered pom file (available here:
https://launchpad.net/~ucam-cl-dtg/+archive/ucam/+packages when
launchpad finishes building) does not contain the maven-compiler-plugin
configuration.
This causes dependent packages like libucamwebauth-java
( https://github.com/ucam-cl-dtg/ucam-webauth/tree/debian ) to be build
with -source 1.3 which fails rather badly:

/auto/homes/drt24/git/web/raven/webauth/src/main/java/uk/ac/cam/ucs/webauth/WebauthResponse.java:[345,5] annotations are not supported in -source 1.3
(use -source 5 or higher to enable annotations)
@Override

The seemingly obvious solution to this would be to use
debian/maven.properties and specify:
maven.compile.source = 1.5
maven.compile.target = 1.5
with the properties cribbed from:
http://maven.apache.org/maven-1.x/plugins/java/properties.html

However this has no effect and I still get complaints due to -source 1.3
being used.

What am I doing wrong? Does the maven-compiler-plugin have to be
stripped out of poms? If so is there a way of preserving the source and
target information in such a way that it correctly inherits to child
poms? Is there something I am missing about the way properties are
specified in maven.properties or am I using the wrong ones?

Minor point noticed along the way and probably a bug:
In the generated maven.rules I needed to do
-s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/ * *
+javax.servlet servlet-api jar s/.*/2.5/ * *

As otherwise things failed with javax.servlet:servlet-api:jar:debian not
being found.

mh_make is great.

Thank you,

Daniel

Version information:
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
Linux grapevine.cl.cam.ac.uk 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27
17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
maven-debian-helper 1.5ubuntu1
maven-repo-helper 1.7.1ubuntu1
$ mvn -v
Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000)
Maven home: /home/drt24/bin/apache-maven-3.0.4
Java version: 1.7.0_03, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-29-generic", arch: "amd64", family:
"unix"

Ludovic Claude 08-23-2012 09:40 PM

maven-compiler-plugin being stripped from parent poms when using maven-debian-helper?
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello Daniel,

Can you provide me with the sources for the packaging of
libdtgparentpom-java?

Thanks,
Ludovic

On 08/22/2012 06:46 PM, Daniel Thomas wrote:
> Hello,
>
> I have been debianising some of our maven packages to make
> deployment to our servers easier (and because there is a small
> group of other people who might find them useful). I used mh_make
> to generate the debian files and then edited them. We have a parent
> pom which specifies sensible defaults for various things such as
> the java source version to use (1.6 rather than the ancient
> defaults).
> https://github.com/ucam-cl-dtg/dtg-pom/blob/debian/parent/pom.xml
> When I debianised it despite the maven-compiler-plugin not being
> listed in debian/maven.ignoreRules the filtered pom file (available
> here: https://launchpad.net/~ucam-cl-dtg/+archive/ucam/+packages
> when launchpad finishes building) does not contain the
> maven-compiler-plugin configuration. This causes dependent packages
> like libucamwebauth-java (
> https://github.com/ucam-cl-dtg/ucam-webauth/tree/debian ) to be
> build with -source 1.3 which fails rather badly:
>
> /auto/homes/drt24/git/web/raven/webauth/src/main/java/uk/ac/cam/ucs/webauth/WebauthResponse.java:[345,5]
> annotations are not supported in -source 1.3 (use -source 5 or
> higher to enable annotations) @Override
>
> The seemingly obvious solution to this would be to use
> debian/maven.properties and specify: maven.compile.source = 1.5
> maven.compile.target = 1.5 with the properties cribbed from:
> http://maven.apache.org/maven-1.x/plugins/java/properties.html
>
> However this has no effect and I still get complaints due to
> -source 1.3 being used.
>
> What am I doing wrong? Does the maven-compiler-plugin have to be
> stripped out of poms? If so is there a way of preserving the source
> and target information in such a way that it correctly inherits to
> child poms? Is there something I am missing about the way
> properties are specified in maven.properties or am I using the
> wrong ones?
>
> Minor point noticed along the way and probably a bug: In the
> generated maven.rules I needed to do
> -s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/ * *
> +javax.servlet servlet-api jar s/.*/2.5/ * *
>
> As otherwise things failed with
> javax.servlet:servlet-api:jar:debian not being found.
>
> mh_make is great.
>
> Thank you,
>
> Daniel
>
> Version information: Distributor ID: Ubuntu Description: Ubuntu
> 12.04.1 LTS Release: 12.04 Codename: precise Linux
> grapevine.cl.cam.ac.uk 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27
> 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> maven-debian-helper 1.5ubuntu1 maven-repo-helper 1.7.1ubuntu1 $ mvn
> -v Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000) Maven
> home: /home/drt24/bin/apache-maven-3.0.4 Java version: 1.7.0_03,
> vendor: Oracle Corporation Java home:
> /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: en_GB,
> platform encoding: UTF-8 OS name: "linux", version:
> "3.2.0-29-generic", arch: "amd64", family: "unix"
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJQNqM6AAoJEImmFv6yGz69H3gQAJczyOY6tM IgacSobi6pjLYn
02tpt4yo2xJHWJRDlwRJPMaSAtcotmbfioOYBHql5qonCdSCqu 4V4trCVjhfU9Xq
U0n5eHPRWOv4r141okg1fWKCn+0fJTnkYTxKVtPmtRVAFxZstc wnK8TXf09AKmxW
1pjFOHdoWqBGYGN2iYq1AlXYiPSALskWNbb8rrUcjL+FrTGrgi 50pjQKDrWHOgYg
2dfWfzTdeCvrMRt8SoCf5zeH5bkOWSSwHb8ZUFMljk8+uQO19x 84L20TIxVk7Q06
hiW7YZXWzXBknGEyw2/LT41fs6g/QJgCmaEK9zFKPBOXPWQIb0kf6srFxoCfK/t3
AF4XkuUnSOmcsIQTNd937qS3UHxeFstY/BsT0MkSqNfBBR7kgJIBcQHTBwEN0qZG
+U4/3YtJ24Uft3eQqRHIUsV69mZ6auGWd0ITaX7FlpRPxCxW4CD4UZ A7H6uUAhfb
FF0o5f7/eZjJX6nZItj4J5uMDh6OD+ihEZQ4ME6mKEVUdpW38yJmXRRQL7 y47WHs
cTMWbI2w/DEKvntuW8jwYn88fgMt0L3MM70rKyi1vYCRu94ts3pI/MOEd7QN/S9I
VcB0M1YaV0G+DZdKxKkfWwRy8iq5GUGXCxBuqKKeesBhz89YdX mDkB4tDuy3iF2X
URelW6FFEOoqr/R+a+zy
=+5TC
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 5036A340.8070103@laposte.net">http://lists.debian.org/5036A340.8070103@laposte.net

Daniel Thomas 08-24-2012 07:52 AM

maven-compiler-plugin being stripped from parent poms when using maven-debian-helper?
 
Hello Ludovic,

Yes they are in https://github.com/ucam-cl-dtg/dtg-pom/tree/debian (the
'parent' subdirectory contains the 'debian' folder).

Thank you,

Daniel

On Thu, 2012-08-23 at 23:40 +0200, Ludovic Claude wrote:
> Hello Daniel,
>
> Can you provide me with the sources for the packaging of
> libdtgparentpom-java?
>
> Thanks,
> Ludovic
>
> On 08/22/2012 06:46 PM, Daniel Thomas wrote:
> > Hello,
> >
> > I have been debianising some of our maven packages to make
> > deployment to our servers easier (and because there is a small
> > group of other people who might find them useful). I used mh_make
> > to generate the debian files and then edited them. We have a parent
> > pom which specifies sensible defaults for various things such as
> > the java source version to use (1.6 rather than the ancient
> > defaults).
> > https://github.com/ucam-cl-dtg/dtg-pom/blob/debian/parent/pom.xml
> > When I debianised it despite the maven-compiler-plugin not being
> > listed in debian/maven.ignoreRules the filtered pom file (available
> > here: https://launchpad.net/~ucam-cl-dtg/+archive/ucam/+packages
> > when launchpad finishes building) does not contain the
> > maven-compiler-plugin configuration. This causes dependent packages
> > like libucamwebauth-java (
> > https://github.com/ucam-cl-dtg/ucam-webauth/tree/debian ) to be
> > build with -source 1.3 which fails rather badly:
> >
> > /auto/homes/drt24/git/web/raven/webauth/src/main/java/uk/ac/cam/ucs/webauth/WebauthResponse.java:[345,5]
> > annotations are not supported in -source 1.3 (use -source 5 or
> > higher to enable annotations) @Override
> >
> > The seemingly obvious solution to this would be to use
> > debian/maven.properties and specify: maven.compile.source = 1.5
> > maven.compile.target = 1.5 with the properties cribbed from:
> > http://maven.apache.org/maven-1.x/plugins/java/properties.html
> >
> > However this has no effect and I still get complaints due to
> > -source 1.3 being used.
> >
> > What am I doing wrong? Does the maven-compiler-plugin have to be
> > stripped out of poms? If so is there a way of preserving the source
> > and target information in such a way that it correctly inherits to
> > child poms? Is there something I am missing about the way
> > properties are specified in maven.properties or am I using the
> > wrong ones?
> >
> > Minor point noticed along the way and probably a bug: In the
> > generated maven.rules I needed to do
> > -s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/ * *
> > +javax.servlet servlet-api jar s/.*/2.5/ * *
> >
> > As otherwise things failed with
> > javax.servlet:servlet-api:jar:debian not being found.
> >
> > mh_make is great.
> >
> > Thank you,
> >
> > Daniel
> >
> > Version information: Distributor ID: Ubuntu Description: Ubuntu
> > 12.04.1 LTS Release: 12.04 Codename: precise Linux
> > grapevine.cl.cam.ac.uk 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27
> > 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> > maven-debian-helper 1.5ubuntu1 maven-repo-helper 1.7.1ubuntu1 $ mvn
> > -v Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000) Maven
> > home: /home/drt24/bin/apache-maven-3.0.4 Java version: 1.7.0_03,
> > vendor: Oracle Corporation Java home:
> > /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: en_GB,
> > platform encoding: UTF-8 OS name: "linux", version:
> > "3.2.0-29-generic", arch: "amd64", family: "unix"
> >

Ludovic Claude 08-28-2012 09:38 PM

maven-compiler-plugin being stripped from parent poms when using maven-debian-helper?
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello Daniel,

If you look at the POM file for the parent project, you will notice
that is has its build section removed. This is due to the default
cleanup rules used when publishing your POM into the Debian Maven
repository. Those rules are similar to what is required when you
publish your project to Maven central.

You can override this behaviour easily with the following settings in
debian/libdtgparentpom-java.poms:

pom.xml --has-package-version --keep-elements=build

Hope this helps,
Ludovic

On 08/24/2012 09:52 AM, Daniel Thomas wrote:
> Hello Ludovic,
>
> Yes they are in https://github.com/ucam-cl-dtg/dtg-pom/tree/debian
> (the 'parent' subdirectory contains the 'debian' folder).
>
> Thank you,
>
> Daniel
>
> On Thu, 2012-08-23 at 23:40 +0200, Ludovic Claude wrote:
>> Hello Daniel,
>>
>> Can you provide me with the sources for the packaging of
>> libdtgparentpom-java?
>>
>> Thanks, Ludovic
>>
>> On 08/22/2012 06:46 PM, Daniel Thomas wrote:
>>> Hello,
>>>
>>> I have been debianising some of our maven packages to make
>>> deployment to our servers easier (and because there is a small
>>> group of other people who might find them useful). I used
>>> mh_make to generate the debian files and then edited them. We
>>> have a parent pom which specifies sensible defaults for various
>>> things such as the java source version to use (1.6 rather than
>>> the ancient defaults).
>>> https://github.com/ucam-cl-dtg/dtg-pom/blob/debian/parent/pom.xml
>>> When I debianised it despite the maven-compiler-plugin not
>>> being listed in debian/maven.ignoreRules the filtered pom file
>>> (available here:
>>> https://launchpad.net/~ucam-cl-dtg/+archive/ucam/+packages when
>>> launchpad finishes building) does not contain the
>>> maven-compiler-plugin configuration. This causes dependent
>>> packages like libucamwebauth-java (
>>> https://github.com/ucam-cl-dtg/ucam-webauth/tree/debian ) to
>>> be build with -source 1.3 which fails rather badly:
>>>
>>> /auto/homes/drt24/git/web/raven/webauth/src/main/java/uk/ac/cam/ucs/webauth/WebauthResponse.java:[345,5]
>>>
>>>
annotations are not supported in -source 1.3 (use -source 5 or
>>> higher to enable annotations) @Override
>>>
>>> The seemingly obvious solution to this would be to use
>>> debian/maven.properties and specify: maven.compile.source = 1.5
>>> maven.compile.target = 1.5 with the properties cribbed from:
>>> http://maven.apache.org/maven-1.x/plugins/java/properties.html
>>>
>>> However this has no effect and I still get complaints due to
>>> -source 1.3 being used.
>>>
>>> What am I doing wrong? Does the maven-compiler-plugin have to
>>> be stripped out of poms? If so is there a way of preserving the
>>> source and target information in such a way that it correctly
>>> inherits to child poms? Is there something I am missing about
>>> the way properties are specified in maven.properties or am I
>>> using the wrong ones?
>>>
>>> Minor point noticed along the way and probably a bug: In the
>>> generated maven.rules I needed to do
>>> -s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/ *
>>> * +javax.servlet servlet-api jar s/.*/2.5/ * *
>>>
>>> As otherwise things failed with
>>> javax.servlet:servlet-api:jar:debian not being found.
>>>
>>> mh_make is great.
>>>
>>> Thank you,
>>>
>>> Daniel
>>>
>>> Version information: Distributor ID: Ubuntu Description:
>>> Ubuntu 12.04.1 LTS Release: 12.04 Codename: precise Linux
>>> grapevine.cl.cam.ac.uk 3.2.0-29-generic #46-Ubuntu SMP Fri Jul
>>> 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
>>> maven-debian-helper 1.5ubuntu1 maven-repo-helper 1.7.1ubuntu1 $
>>> mvn -v Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000)
>>> Maven home: /home/drt24/bin/apache-maven-3.0.4 Java version:
>>> 1.7.0_03, vendor: Oracle Corporation Java home:
>>> /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: en_GB,
>>> platform encoding: UTF-8 OS name: "linux", version:
>>> "3.2.0-29-generic", arch: "amd64", family: "unix"
>>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJQPTpCAAoJEImmFv6yGz69OSsP/RZTbbSFYCiQswCYMX1LGG85
cz3A3k2ZH2uX9H4IP9+afjOAHoK8UzN/guXOP9amQztjvrgDuAwsJ36jJyYXmmRN
ykLVcN8LHFDWd/l0Ug1ipd77JTGx5cqHvzTIMf3hBX4SwkW++3p2wT9YQpJ7JukT
HpdRxeu0+B7T8cGFBRO6xH8jhvCamb38Yxbn4haUYgfT9byzdZ Y6yeHVrXPLbxdJ
0+3o4hCHxkwlq5ZfJHyRyG4gpiInJd98MxQmjf1j/9fCzDUEXkUqG/PtLco7KGXg
/NgmFO40nyOUtD7Zzd2F1rKT4gEjU5HUuuPaa+SUh/cmPk0pE5jVxdNmj0UVrQzQ
1+Ka83PIRv1sxs6ICYpIJ0eq9/RhcLHJ0Or9hDM2udrmvTwvRo1q5cEqSGWwanEW
8dDPuWkeUuDgZvM9HyyKoDbJx5PrECYnFeaaHvYjJAigI2Kv49 QzBIFoJTAjvRvZ
zUMTU48OEXx1POCv4KfvM4uvl6Hm6yNDKyP9MPmkZh4tMenTBP 8PY2UXPmyGsAjX
u5/S6EI4+ZxkMMUBPkU6GUkAF7D3XdGHDeU5LX4QaTXymAs2/SDA9fkHVYV6VD9J
W64HapZ0Lqls5agWOgmv6d2PN6hBpJjKHaragOJ+d+8IqpBir3 ByCqZdHvhk4LZJ
UvzLQi9t/TiBJcw7fhew
=TogO
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 503D3A46.3090703@laposte.net">http://lists.debian.org/503D3A46.3090703@laposte.net


All times are GMT. The time now is 09:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.