Re: Producing java8 and java7 versions

2017-06-08 Thread Jörg Schaible
Hi Chistopher,

Christofer Dutz wrote:

> Perhaps not adding any suffix to the version for the java8 version would
> be ok and to add “java7” to the version for the legacy builds would be a
> good compromise.

That's what XStream has done with the last release.

Cheers,
Jörg


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: jaxws-maven-plugin: wsgen compiles with wrong source and target version

2017-06-08 Thread Anders Hammar
By default the wsgen target compiles any generated classes as well, which
is typically not how it should be done in a Maven project as the
compilation should be handled by the maven-compile-plugin. But this is due
to wsgen being a tool which is wrapped by the jaxws-maven-plugin. (However,
the wsimport target does NOT compile the generated Java classes.)

You could try turning compilation off through the xnocompile [1] parameter.
However, I recall this having some side-effect on the generated end result.
I don't remember exactly what though. Test it and see if it produces what
you need.

Possibly you could specify 1.7 target through the vmArgs [2] parameter, but
I haven't found any example on that.

You could also use JDK tool chain [3] to specify a JDK 1.7 to be used for
wsgen.

[1] http://www.mojohaus.org/jaxws-maven-plugin/wsgen-mojo.html#xnocompile
[2] http://www.mojohaus.org/jaxws-maven-plugin/wsgen-mojo.html#vmArgs
[3]
http://www.mojohaus.org/jaxws-maven-plugin/wsgen-mojo.html#useJdkToolchainExecutable

/Anders

On Thu, Jun 8, 2017 at 4:22 PM, Richard Tjerngren <
richard.tjerng...@netent.com> wrote:

> I’m using jaxws-maven-plugin to generate some java-files and compile them
> to classes. I’m running JDK 8 on my machine but I want the output jars to
> be compatible with java 7, I’ve configured the maven-compiler-plugin so all
> my other jars are correct but it ’s seems like the jaxws-plugin doesn’t use
> the compiler plugin.
>
> So my question is, how can I tell jaxws to compile with -source and
> -target 1.7?
>
>
> ps. This is my first time posting to a mailing list, I hope I’m doing this
> right :)
>
> Regards
> Richard
>
>
>
>
> Richard Tjerngren
> Java Developer
> 
> NetEnt | Better Gaming™
> T: +46 760 024 868, M: +46 760 024 868
> 
> richard.tjerng...@netent.com,
> www.netent.com
> Address: NetEnt AB (publ), Vasagatan 16, SE-111 20, Stockholm, SE
> This email and any attachments are confidential and may be legally
> privileged and protected by copyright. If you are not the intended
> recipient of this email you should not copy it or disclose its contents to
> anyone. If you have received this email in error, please notify the sender
> immediately and delete the email. Views or opinions in this email are
> solely those of the author. Unencrypted Internet communications are not
> secure and the sender does not accept responsibility for interception of
> this message by third parties. This communication is not intended to form a
> binding contract unless expressly indicated to the contrary and properly
> authorized. The recipient should scan this email and any attachments for
> the presence of viruses. The sender accepts no liability for any viruses
> transmitted in this email.
>


jaxws-maven-plugin: wsgen compiles with wrong source and target version

2017-06-08 Thread Richard Tjerngren
I’m using jaxws-maven-plugin to generate some java-files and compile them to 
classes. I’m running JDK 8 on my machine but I want the output jars to be 
compatible with java 7, I’ve configured the maven-compiler-plugin so all my 
other jars are correct but it ’s seems like the jaxws-plugin doesn’t use the 
compiler plugin.

So my question is, how can I tell jaxws to compile with -source and -target 1.7?


ps. This is my first time posting to a mailing list, I hope I’m doing this 
right :)

Regards
Richard




Richard Tjerngren
Java Developer

NetEnt | Better Gaming™
T: +46 760 024 868, M: +46 760 024 
868
richard.tjerng...@netent.com, 
www.netent.com
Address: NetEnt AB (publ), Vasagatan 16, SE-111 20, Stockholm, SE
This email and any attachments are confidential and may be legally privileged 
and protected by copyright. If you are not the intended recipient of this email 
you should not copy it or disclose its contents to anyone. If you have received 
this email in error, please notify the sender immediately and delete the email. 
Views or opinions in this email are solely those of the author. Unencrypted 
Internet communications are not secure and the sender does not accept 
responsibility for interception of this message by third parties. This 
communication is not intended to form a binding contract unless expressly 
indicated to the contrary and properly authorized. The recipient should scan 
this email and any attachments for the presence of viruses. The sender accepts 
no liability for any viruses transmitted in this email.


Re: Producing java8 and java7 versions

2017-06-08 Thread Maxim Solodovnik
I don't have computer right now, so I can't check
I believe you can check pom in their repo or ask their mailing list :)

Additional option might me: having version X.a.b.c for java7 and version
Y.a.b.c for java8

Apache Wicket uses such naming ...

WBR, Maxim
(from mobile, sorry for the typos)

On Jun 8, 2017 11:11, "Christofer Dutz"  wrote:

> So, they are adding the java version as a suffix to the version of the
> artifact … don’t quite know if I really like that solution. I think It
> would break some version related automatisms, but it is definitely a safer
> solution as the classifier solution. But how would such a build look like?
> Using version properties everywhere except the pom type artifacts which are
> used as parents by the leaf artifacts? That could work, but would it break
> anything with the release-plugin?
>
> Chris
>
>
> Am 08.06.17, 11:04 schrieb "Maxim Solodovnik" :
>
> Hello Chris,
>
> Here is one example:
> https://repo1.maven.org/maven2/org/postgresql/postgresql/
>
> WBR, Maxim
> (from mobile, sorry for the typos)
>
> On Jun 8, 2017 10:44, "Christofer Dutz" 
> wrote:
>
> > Hi,
> >
> > Currently the Edgent project produces two tar.gz files … one for
> java7 and
> > one for java8. Now they would like to produce artifacts for
> Maven-Central.
> >
> > I’m currently trying to help them with their build by migrating this
> to
> > maven. I think that there currently is no clean way to provide both
> java7
> > and java8 versions. We could add classifiers, but that would mess up
> the
> > dependency resolution mechanism.
> >
> > Do you guys know how other projects do this sort of thing?
> >
> > Chris
> >
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>


Re: Producing java8 and java7 versions

2017-06-08 Thread Christofer Dutz
Perhaps not adding any suffix to the version for the java8 version would be ok 
and to add “java7” to the version for the legacy builds would be a good 
compromise.

Chris

Am 08.06.17, 11:11 schrieb "Christofer Dutz" :

So, they are adding the java version as a suffix to the version of the 
artifact … don’t quite know if I really like that solution. I think It would 
break some version related automatisms, but it is definitely a safer solution 
as the classifier solution. But how would such a build look like? Using version 
properties everywhere except the pom type artifacts which are used as parents 
by the leaf artifacts? That could work, but would it break anything with the 
release-plugin?

Chris


Am 08.06.17, 11:04 schrieb "Maxim Solodovnik" :

Hello Chris,

Here is one example:
https://repo1.maven.org/maven2/org/postgresql/postgresql/

WBR, Maxim
(from mobile, sorry for the typos)

On Jun 8, 2017 10:44, "Christofer Dutz"  
wrote:

> Hi,
>
> Currently the Edgent project produces two tar.gz files … one for 
java7 and
> one for java8. Now they would like to produce artifacts for 
Maven-Central.
>
> I’m currently trying to help them with their build by migrating this 
to
> maven. I think that there currently is no clean way to provide both 
java7
> and java8 versions. We could add classifiers, but that would mess up 
the
> dependency resolution mechanism.
>
> Do you guys know how other projects do this sort of thing?
>
> Chris
>



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org




Re: Producing java8 and java7 versions

2017-06-08 Thread Christofer Dutz
So, they are adding the java version as a suffix to the version of the artifact 
… don’t quite know if I really like that solution. I think It would break some 
version related automatisms, but it is definitely a safer solution as the 
classifier solution. But how would such a build look like? Using version 
properties everywhere except the pom type artifacts which are used as parents 
by the leaf artifacts? That could work, but would it break anything with the 
release-plugin?

Chris


Am 08.06.17, 11:04 schrieb "Maxim Solodovnik" :

Hello Chris,

Here is one example:
https://repo1.maven.org/maven2/org/postgresql/postgresql/

WBR, Maxim
(from mobile, sorry for the typos)

On Jun 8, 2017 10:44, "Christofer Dutz"  wrote:

> Hi,
>
> Currently the Edgent project produces two tar.gz files … one for java7 and
> one for java8. Now they would like to produce artifacts for Maven-Central.
>
> I’m currently trying to help them with their build by migrating this to
> maven. I think that there currently is no clean way to provide both java7
> and java8 versions. We could add classifiers, but that would mess up the
> dependency resolution mechanism.
>
> Do you guys know how other projects do this sort of thing?
>
> Chris
>



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


Naming apache artifacts

2017-06-08 Thread Christofer Dutz
Hi,

Another question that came up while at my Maven migration task in the Edgent 
project.
Justin suggested to prefix all artifactIds with “apache-edgent-“. Having a look 
at the Apache Repo it feels like 80% prefix the artifacts with the 
“{projectname}-“ , about 10% with “apache-{projectname}” and another 10% don’t 
prefix at all.

I have to admit, that I usually don’t prefix at all too as I think the groupId 
already sets the context. Ok … in a war archive a project prefix might have a 
slight benefit over a non-project prefix, but adding the “apache-{projectname}“ 
prefix to the artifact id and hereby to the name of the generated jar seems 
unnecessarily verbose.

Are there any best practices, suggestions or guidelines? Guess if adding 
“apache-“ is considered best practice, I think I should adjust this in the Flex 
project too.

Chris


Re: Producing java8 and java7 versions

2017-06-08 Thread Maxim Solodovnik
Hello Chris,

Here is one example:
https://repo1.maven.org/maven2/org/postgresql/postgresql/

WBR, Maxim
(from mobile, sorry for the typos)

On Jun 8, 2017 10:44, "Christofer Dutz"  wrote:

> Hi,
>
> Currently the Edgent project produces two tar.gz files … one for java7 and
> one for java8. Now they would like to produce artifacts for Maven-Central.
>
> I’m currently trying to help them with their build by migrating this to
> maven. I think that there currently is no clean way to provide both java7
> and java8 versions. We could add classifiers, but that would mess up the
> dependency resolution mechanism.
>
> Do you guys know how other projects do this sort of thing?
>
> Chris
>


Producing java8 and java7 versions

2017-06-08 Thread Christofer Dutz
Hi,

Currently the Edgent project produces two tar.gz files … one for java7 and one 
for java8. Now they would like to produce artifacts for Maven-Central.

I’m currently trying to help them with their build by migrating this to maven. 
I think that there currently is no clean way to provide both java7 and java8 
versions. We could add classifiers, but that would mess up the dependency 
resolution mechanism.

Do you guys know how other projects do this sort of thing?

Chris