Multi-module project with custom plugin

2013-06-25 Thread Samuel Halliday
Hi all,

I'm having a problem with a multi-module project where one of the modules is
an annotation-based maven-plugin: https://github.com/fommil/netlib-java/

Basically, "mvn compile" fails the first time with

  Could not find goal 'interface' in plugin
org.netlib:generator:1.0-SNAPSHOT among available goals

and then succeeds when I do a second "mvn compile".

It also works OK from clean if I do a "mvn -pl generator compile ; mvn
compile".

I'd like the build to succeed in one go so that I can do a build and release
of all modules.

As a workaround, how can I do a build and release (to sonatype OSS) in two
stages?


In addition, I'm seeing a similar thing that has been asked by Russell Gold.
"mvn clean" fails unless the entire project builds successfully. So doing
"mvn clean" twice will fail the second time.

Anyone have any advice?

Thanks, Sam



--
View this message in context: 
http://maven.40175.n5.nabble.com/Multi-module-project-with-custom-plugin-tp5760587.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Maven zip artifact

2013-06-25 Thread Dan Tran
If you are not izpack user, then dont use izpack-maven-plugin


Here are steps you can do

  1. Use maven dependency to copy your 'zip' resource into your resource
directory so that your final jar can include it

  2. At mojo run time, you can copy the zip out of your plugin jar to a
temp place, then use truezip-utils to manipulate it

However, if you can figure out the location of your mojo's jar under user's
local repository, you can also truezip to extract what you need


-D



On Tue, Jun 25, 2013 at 12:30 PM, Ron Wheeler <
rwhee...@artifact-software.com> wrote:

> Great.
>
> Ron
>
> On 25/06/2013 3:11 PM, igor.zaplet...@gmail.com wrote:
>
>> Yes, IzPack is actually that I need. Thanks Ron.
>>
>> On Jun 25, 2013, at 10:52 PM, Ron Wheeler > com > wrote:
>>
>>  On 25/06/2013 2:30 PM, Igor Zapletnev wrote:
>>>
 Thanks for quick response! I want to include zip file in the resources
 dir for example. I want to have an access to this zip file in my mojo.
 Call copy-dependency pragmatically is not clear for me because I don't
 want resolve this dependencies during runtime each time. I want to copy
 this dependency during installing. I have checked assembly home page and
 looks like this plugin is not acceptable in this case.

>>> What are you actually making?
>>>
>>> Unless I don't understand your final project, the assembly should allow
>>> you to build a jar with your code jar and the zip in the final jar.
>>> The IzPack installer also has a Maven plug-in that automates the
>>> creation of an installer that can be run to put your app on a destination
>>>  computer (linux, windows, etc.) with all of the files in the "right"
>>> places.
>>>
>>> Ron
>>>

 On Tue, Jun 25, 2013 at 10:16 PM, Ron Wheeler <
 rwheeler@artifact-software.**com >>> rwheeler@artifact-**software.com >>
 wrote:

 Where in the jar (path) would you like to put the zip?
 Why?
 What are you actually constructing?
 Have you looked at the Assembly plug-in or at building your final
 artifact with an installer.


 Ron


 On 25/06/2013 2:01 PM, Igor Zapletnev wrote:

 To be more clear – I want to include this zip artifact in my
 jar file.
 Thanks for help again.


 On Tue, Jun 25, 2013 at 9:36 PM, Igor Zapletnev
 >>> >wrote:

 But is it possible to get an access to the zip file
 directly without
 unzipping?


 On Mon, Jun 24, 2013 at 10:05 PM, Wayne Fay
 mailto:wayne...@gmail.com>> wrote:

 How would you unzip a static zip file rather than
 a Maven artifact?

 First, you'd make it a Maven artifact. A useful blog
 post on this subject:

 http://developer-blog.**cloudbees.com/2013/03/playing-*
 *trade-offs-with-maven.html

 Wayne

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




 -- Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 
 
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102



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

>>>
>>> --
>>> Ron Wheeler
>>> President
>>> Artifact Software Inc
>>> email: rwhee...@artifact-software.com
>>> skype: ronaldmwheeler
>>> phone: 866-970-2435, ext 102
>>>
>>>  --**--**
>> -
>> To unsubscribe, e-mail: 
>> users-unsubscribe@maven.**apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwhee...@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@maven.**apache

Re: Maven zip artifact

2013-06-25 Thread Ron Wheeler

Great.

Ron
On 25/06/2013 3:11 PM, igor.zaplet...@gmail.com wrote:

Yes, IzPack is actually that I need. Thanks Ron.

On Jun 25, 2013, at 10:52 PM, Ron Wheeler  
wrote:


On 25/06/2013 2:30 PM, Igor Zapletnev wrote:

Thanks for quick response! I want to include zip file in the resources dir for 
example. I want to have an access to this zip file in my mojo.
Call copy-dependency pragmatically is not clear for me because I don't want 
resolve this dependencies during runtime each time. I want to copy this 
dependency during installing. I have checked assembly home page and looks like 
this plugin is not acceptable in this case.

What are you actually making?

Unless I don't understand your final project, the assembly should allow you to 
build a jar with your code jar and the zip in the final jar.
The IzPack installer also has a Maven plug-in that automates the creation of an installer 
that can be run to put your app on a destination  computer (linux, windows, etc.) with 
all of the files in the "right" places.

Ron


On Tue, Jun 25, 2013 at 10:16 PM, Ron Wheeler mailto:rwhee...@artifact-software.com>> wrote:

Where in the jar (path) would you like to put the zip?
Why?
What are you actually constructing?
Have you looked at the Assembly plug-in or at building your final
artifact with an installer.


Ron


On 25/06/2013 2:01 PM, Igor Zapletnev wrote:

To be more clear – I want to include this zip artifact in my
jar file.
Thanks for help again.


On Tue, Jun 25, 2013 at 9:36 PM, Igor Zapletnev
mailto:igor.zaplet...@gmail.com>>wrote:

But is it possible to get an access to the zip file
directly without
unzipping?


On Mon, Jun 24, 2013 at 10:05 PM, Wayne Fay
mailto:wayne...@gmail.com>> wrote:

How would you unzip a static zip file rather than
a Maven artifact?

First, you'd make it a Maven artifact. A useful blog
post on this subject:


http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html

Wayne


-
To unsubscribe, e-mail:
users-unsubscr...@maven.apache.org

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





-- Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com

skype: ronaldmwheeler
phone: 866-970-2435, ext 102



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org

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



--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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





--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Re: Maven zip artifact

2013-06-25 Thread igor . zapletnev
Yes, IzPack is actually that I need. Thanks Ron.

On Jun 25, 2013, at 10:52 PM, Ron Wheeler  
wrote:

> On 25/06/2013 2:30 PM, Igor Zapletnev wrote:
>> Thanks for quick response! I want to include zip file in the resources dir 
>> for example. I want to have an access to this zip file in my mojo.
>> Call copy-dependency pragmatically is not clear for me because I don't want 
>> resolve this dependencies during runtime each time. I want to copy this 
>> dependency during installing. I have checked assembly home page and looks 
>> like this plugin is not acceptable in this case.
> 
> What are you actually making?
> 
> Unless I don't understand your final project, the assembly should allow you 
> to build a jar with your code jar and the zip in the final jar.
> The IzPack installer also has a Maven plug-in that automates the creation of 
> an installer that can be run to put your app on a destination  computer 
> (linux, windows, etc.) with all of the files in the "right" places.
> 
> Ron
>> 
>> 
>> On Tue, Jun 25, 2013 at 10:16 PM, Ron Wheeler 
>> mailto:rwhee...@artifact-software.com>> 
>> wrote:
>> 
>>Where in the jar (path) would you like to put the zip?
>>Why?
>>What are you actually constructing?
>>Have you looked at the Assembly plug-in or at building your final
>>artifact with an installer.
>> 
>> 
>>Ron
>> 
>> 
>>On 25/06/2013 2:01 PM, Igor Zapletnev wrote:
>> 
>>To be more clear – I want to include this zip artifact in my
>>jar file.
>>Thanks for help again.
>> 
>> 
>>On Tue, Jun 25, 2013 at 9:36 PM, Igor Zapletnev
>>mailto:igor.zaplet...@gmail.com>>wrote:
>> 
>>But is it possible to get an access to the zip file
>>directly without
>>unzipping?
>> 
>> 
>>On Mon, Jun 24, 2013 at 10:05 PM, Wayne Fay
>>mailto:wayne...@gmail.com>> wrote:
>> 
>>How would you unzip a static zip file rather than
>>a Maven artifact?
>> 
>>First, you'd make it a Maven artifact. A useful blog
>>post on this subject:
>> 
>>
>> http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html
>> 
>>Wayne
>> 
>>
>> -
>>To unsubscribe, e-mail:
>>users-unsubscr...@maven.apache.org
>>
>>For additional commands, e-mail:
>>users-h...@maven.apache.org
>>
>> 
>> 
>> 
>> 
>>-- Ron Wheeler
>>President
>>Artifact Software Inc
>>email: rwhee...@artifact-software.com
>>
>>skype: ronaldmwheeler
>>phone: 866-970-2435, ext 102
>> 
>> 
>> 
>>-
>>To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>
>>For additional commands, e-mail: users-h...@maven.apache.org
>>
> 
> 
> -- 
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwhee...@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
> 

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



Re: Maven zip artifact

2013-06-25 Thread Ron Wheeler

On 25/06/2013 2:30 PM, Igor Zapletnev wrote:
Thanks for quick response! I want to include zip file in the resources 
dir for example. I want to have an access to this zip file in my mojo.
Call copy-dependency pragmatically is not clear for me because I don't 
want resolve this dependencies during runtime each time. I want to 
copy this dependency during installing. I have checked assembly home 
page and looks like this plugin is not acceptable in this case.


What are you actually making?

Unless I don't understand your final project, the assembly should allow 
you to build a jar with your code jar and the zip in the final jar.
The IzPack installer also has a Maven plug-in that automates the 
creation of an installer that can be run to put your app on a 
destination  computer (linux, windows, etc.) with all of the files in 
the "right" places.


Ron



On Tue, Jun 25, 2013 at 10:16 PM, Ron Wheeler 
> wrote:


Where in the jar (path) would you like to put the zip?
Why?
What are you actually constructing?
Have you looked at the Assembly plug-in or at building your final
artifact with an installer.


Ron


On 25/06/2013 2:01 PM, Igor Zapletnev wrote:

To be more clear – I want to include this zip artifact in my
jar file.
Thanks for help again.


On Tue, Jun 25, 2013 at 9:36 PM, Igor Zapletnev
mailto:igor.zaplet...@gmail.com>>wrote:

But is it possible to get an access to the zip file
directly without
unzipping?


On Mon, Jun 24, 2013 at 10:05 PM, Wayne Fay
mailto:wayne...@gmail.com>> wrote:

How would you unzip a static zip file rather than
a Maven artifact?

First, you'd make it a Maven artifact. A useful blog
post on this subject:


http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html

Wayne


-
To unsubscribe, e-mail:
users-unsubscr...@maven.apache.org

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





-- 
Ron Wheeler

President
Artifact Software Inc
email: rwhee...@artifact-software.com

skype: ronaldmwheeler
phone: 866-970-2435, ext 102



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org

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






--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102



Re: Maven zip artifact

2013-06-25 Thread Igor Zapletnev
Thanks for quick response! I want to include zip file in the resources dir
for example. I want to have an access to this zip file in my mojo.
Call copy-dependency pragmatically is not clear for me because I don't want
resolve this dependencies during runtime each time. I want to copy this
dependency during installing. I have checked assembly home page and looks
like this plugin is not acceptable in this case.


On Tue, Jun 25, 2013 at 10:16 PM, Ron Wheeler <
rwhee...@artifact-software.com> wrote:

> Where in the jar (path) would you like to put the zip?
> Why?
> What are you actually constructing?
> Have you looked at the Assembly plug-in or at building your final artifact
> with an installer.
>
>
> Ron
>
>
> On 25/06/2013 2:01 PM, Igor Zapletnev wrote:
>
>> To be more clear – I want to include this zip artifact in my jar file.
>> Thanks for help again.
>>
>>
>> On Tue, Jun 25, 2013 at 9:36 PM, Igor Zapletnev > >**wrote:
>>
>>  But is it possible to get an access to the zip file directly without
>>> unzipping?
>>>
>>>
>>> On Mon, Jun 24, 2013 at 10:05 PM, Wayne Fay  wrote:
>>>
>>>  How would you unzip a static zip file rather than a Maven artifact?
>
 First, you'd make it a Maven artifact. A useful blog post on this
 subject:

 http://developer-blog.**cloudbees.com/2013/03/playing-**
 trade-offs-with-maven.html

 Wayne

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



>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwhee...@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@maven.**apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Maven zip artifact

2013-06-25 Thread Ron Wheeler

Where in the jar (path) would you like to put the zip?
Why?
What are you actually constructing?
Have you looked at the Assembly plug-in or at building your final 
artifact with an installer.



Ron

On 25/06/2013 2:01 PM, Igor Zapletnev wrote:

To be more clear – I want to include this zip artifact in my jar file.
Thanks for help again.


On Tue, Jun 25, 2013 at 9:36 PM, Igor Zapletnev wrote:


But is it possible to get an access to the zip file directly without
unzipping?


On Mon, Jun 24, 2013 at 10:05 PM, Wayne Fay  wrote:


How would you unzip a static zip file rather than a Maven artifact?

First, you'd make it a Maven artifact. A useful blog post on this subject:

http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html

Wayne

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





--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Re: Maven zip artifact

2013-06-25 Thread Igor Zapletnev
To be more clear – I want to include this zip artifact in my jar file.
Thanks for help again.


On Tue, Jun 25, 2013 at 9:36 PM, Igor Zapletnev wrote:

> But is it possible to get an access to the zip file directly without
> unzipping?
>
>
> On Mon, Jun 24, 2013 at 10:05 PM, Wayne Fay  wrote:
>
>> > How would you unzip a static zip file rather than a Maven artifact?
>>
>> First, you'd make it a Maven artifact. A useful blog post on this subject:
>>
>> http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html
>>
>> Wayne
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>


Re: Maven zip artifact

2013-06-25 Thread Igor Zapletnev
But is it possible to get an access to the zip file directly without
unzipping?


On Mon, Jun 24, 2013 at 10:05 PM, Wayne Fay  wrote:

> > How would you unzip a static zip file rather than a Maven artifact?
>
> First, you'd make it a Maven artifact. A useful blog post on this subject:
>
> http://developer-blog.cloudbees.com/2013/03/playing-trade-offs-with-maven.html
>
> Wayne
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


JavaDoc plugin and firewall

2013-06-25 Thread Jan Engler
Hi,

currently, I am facing a problem with the javadoc plugin: It seems that 
the plugin tries to download connected dependencies (that are used in our 
type hierarchy) from repo1 (central) although we have a defined mirror for 
that in the settings. Can I specify mirrors for plugins somewhere in the 
settings.xml or in the configuration of the plugin?

Here is my "stacktrace" (the output from the plugin):

The javasoft:synthetica:jar lies in our own repositorybut apperantly, 
the plugin only searches in repo1.

[INFO] Scanning for projects...
[INFO] 
[INFO] 

[INFO] Building My-Custom-App
[INFO] 

[INFO] 
[INFO] >>> maven-javadoc-plugin:2.9:javadoc (default-cli) 
@My-Custom-App>>>
[INFO] 
[INFO] <<< maven-javadoc-plugin:2.9:javadoc (default-cli) @ My-Custom-App 
<<<
Downloading: http://repo1.maven.org/maven2/junit/junit/4.11/junit-4.11.pom 

Downloading: 
http://repo1.maven.org/maven2/org/easymock/easymock/3.1/easymock-3.1.pom 
Downloading: 
http://repo1.maven.org/maven2/org/easymock/easymockclassextension/3.1/easymockclassextension-3.1.pom
 

Downloading: 
http://repo1.maven.org/maven2/org/springframework/spring-test/3.2.2.RELEASE/spring-test-3.2.2.RELEASE.pom
 

[INFO] 

[INFO] BUILD FAILURE
[INFO] 

[INFO] Total time: 1:45.795s
[INFO] Finished at: Tue Jun 25 08:26:59 CEST 2013
[INFO] Final Memory: 5M/15M
[INFO] 

[ERROR] Failed to execute goal on project sick-lnf: Could not resolve 
dependencies for project de.sick.sopas:my-custom-app:jar:3.0.0-SNAPSHOT: 
Failed to collect dependencies for [de.javasoft:synthetica:jar:1.0 
(compile), junit:junit:jar:4.11 (test), org.easymock:easymock:jar:3.1 
(test), org.easymock:easymockclassextension:jar:3.1 (test), 
org.springframework:spring-test:jar:3.2.2.RELEASE (test)]: Failed to read 
artifact descriptor for de.javasoft:synthetica:jar:1.0: Could not transfer 
artifact de.javasoft:synthetica:pom:1.0 from/to central (
http://repo1.maven.org/maven2): Error transferring file: Connection timed 
out: connect -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the 
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, 
please read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 



I have a mirrorOf entry in our settings.xml:


central-proxy
Local proxy of central repo

http://nexusserver.devserver.net:8080/nexus/content/repositories/central/

central



Any hints?

Mit freundlichen Grüßen / Best regards

Jan Engler
 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Mats 
Gökstorp  -  Dr. Martin Krämer  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Re: Multiple JDK versions

2013-06-25 Thread Jörg Schaible
Hi Virg,

virg g wrote:

> Yes you are absolutely right, I totally agree with you. I am asked to
> implement these kind of builds.

Ahh, OK. Nothing helps against ignorance in the business layer ;-)

- Jörg


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



Re: Multiple JDK versions

2013-06-25 Thread virg g
Yes you are absolutely right, I totally agree with you. I am asked to
implement these kind of builds.


On Tue, Jun 25, 2013 at 3:35 PM, Jörg Schaible
wrote:

> Hi Virg,
>
> virg g wrote:
>
> > Yes. We have multiple customers, some of them support 1.5 and others 1.6.
> > We need to release both the builds with 1.5 and 1.6.
>
> [snip]
>
> sorry, in this case it simply does not make sense to use different JDKs. If
> you are able to compile the same sources for JDK 1.5 and JDK 1.6, the
> source
> *must* be compatible to JDK 1.5.
>
> Let's take it to the extreme. Have a look at current commons-logging-1.1.3.
> That one is JDK 1.1 compatible. With your logic, Apache commons sould have
> to release commons-logging for JDK 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 and
> soon for 1.8. Do you find such releases somewhere? No, because it is
> absolutely not necessary.
>
> So, compile your source with target JDK 1.5 and you're done.
>
> - Jörg
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Multiple JDK versions

2013-06-25 Thread Jörg Schaible
Hi Virg,

virg g wrote:

> Yes. We have multiple customers, some of them support 1.5 and others 1.6.
> We need to release both the builds with 1.5 and 1.6.

[snip]

sorry, in this case it simply does not make sense to use different JDKs. If 
you are able to compile the same sources for JDK 1.5 and JDK 1.6, the source 
*must* be compatible to JDK 1.5.

Let's take it to the extreme. Have a look at current commons-logging-1.1.3. 
That one is JDK 1.1 compatible. With your logic, Apache commons sould have 
to release commons-logging for JDK 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 and 
soon for 1.8. Do you find such releases somewhere? No, because it is 
absolutely not necessary.

So, compile your source with target JDK 1.5 and you're done.

- Jörg


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



Re: Multiple JDK versions

2013-06-25 Thread Baptiste MATHUS
Well, if you have multiple customers, some on 1.5, some on 1.6, then just
release a 1.5 version.
It will work perfectly with both 1.5 AND 1.6.

Please note this is actually what you certainly are already doing with a
lot of dependencies in your classpath. Not all have the same bytecode
version.

What you might just want to do that is running some integration tests on
your project.
To do that, you'd just need to execute the corresponding tests with some CI
environment (like Jenkins, to illustrate/be clear).

About your question for source and target parameters, please note this is
actually something related to javac, not the maven-compiler-plugin.
See http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/javac.html

To sum up:
* source is asking the compiler you're not using things of upper jdk in
your *source* code
* target is asking the compiler to generated bytecode that will run on the
specified JRE (minimum).

Cheers



2013/6/25 virg g <06v...@gmail.com>

> Yes. We have multiple customers, some of them support 1.5 and others 1.6.
> We need to release both the builds with 1.5 and 1.6. Right now i am
> initiating build separately one after the other, setting JAVA_HOME
> correctly and passing jdk-version according build i need, this parameter i
> am setting for both source and target. Sending both the parameters
> JAVA_HOME, jdk-versions(1.5 to 1.6 to set source and target)  is kind of
> duplicate and also we need to ensure that both are in parameters Sync and
> should match, should be not any mistakes.
> Looking for right solution. As you suggested matrix build, i will check.
> Any other best solutions?
>
> This is plugin i am using
> 
> org.apache.maven.plugins
>  maven-compiler-plugin
> 2.5.1
>  
> ${jdk-version}
> ${jdk-version}
>  ${project.build.sourceEncoding}
> ${JAVA_HOME}/bin/javac
>  
> 
> 
>  
> true
> 
>  
>
> Thanks
> Virg
>
>
> On Tue, Jun 25, 2013 at 12:39 PM, Baptiste MATHUS  wrote:
>
> > Hi,
> > +1 on the question, do you really need to build for both versions? As JDK
> > is backward compatible, you could for example build only with 1.5.
> >
> > Maybe you only want to test your build on a 1.5 and 1.6, then I
> personally
> > would prefer keeping a quite simple build and keep those combinations on
> > some CI server like jenkins (see matrix build in this case).
> >
> > Cheers
> > Le 25 juin 2013 08:16, "Ron Wheeler"  a
> > écrit :
> >
> > > Why do you need to compile with 2 versions?
> > > You can run apps compiled with 1.5 under 1.6.
> > >
> > > I am not sure that the value of JAVA_HOME has any effect on compiling.
> > > Check the settings in the compile plug-in.
> > >
> > > Ron
> > >
> > >
> > > On 25/06/2013 1:59 AM, virg g wrote:
> > >
> > >> Hi, I need build my project  with multiple jdk versions 1.5 and 1.6. I
> > >>
> > > > am using maven compiler plugin to set the compiler based on JAVA_HOME
> > > > set. Is it mandatory to set target either 1.5 or 1.6 based on the jdk
> > > > version i want to build. Why because if i set compiler to jdk 1.6, in
> > > > the debug log it shows that target is 1.5 but it should be 1.6 right?
> > > > target should set automatically based on JAVA_HOME right unless i
> > > > specically mention the target if i want to change? Any pointers for
> > > > my problem?
> > > >
> > > > [DEBUG]   (f) executable = D:/jdk1.6.0_14/bin/javac [DEBUG] (f)
> > > > source = 1.5 [DEBUG]   (f) staleMillis = 0 [DEBUG]   (f) target =
> > > > 1.5
> > > >
> > > > Thanks virg
> > > >
> > >
> > >
> > > --
> > > Ron Wheeler
> > > President
> > > Artifact Software Inc
> > > email: rwhee...@artifact-software.com
> > > skype: ronaldmwheeler
> > > phone: 866-970-2435, ext 102
> > >
> > >
> >
>
> --
> Baptiste  MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor ! nbsp;!
>


Re: Multiple JDK versions

2013-06-25 Thread virg g
Yes. We have multiple customers, some of them support 1.5 and others 1.6.
We need to release both the builds with 1.5 and 1.6. Right now i am
initiating build separately one after the other, setting JAVA_HOME
correctly and passing jdk-version according build i need, this parameter i
am setting for both source and target. Sending both the parameters
JAVA_HOME, jdk-versions(1.5 to 1.6 to set source and target)  is kind of
duplicate and also we need to ensure that both are in parameters Sync and
should match, should be not any mistakes.
Looking for right solution. As you suggested matrix build, i will check.
Any other best solutions?

This is plugin i am using

org.apache.maven.plugins
 maven-compiler-plugin
2.5.1
 
${jdk-version}
${jdk-version}
 ${project.build.sourceEncoding}
${JAVA_HOME}/bin/javac
 


 
true

 

Thanks
Virg


On Tue, Jun 25, 2013 at 12:39 PM, Baptiste MATHUS  wrote:

> Hi,
> +1 on the question, do you really need to build for both versions? As JDK
> is backward compatible, you could for example build only with 1.5.
>
> Maybe you only want to test your build on a 1.5 and 1.6, then I personally
> would prefer keeping a quite simple build and keep those combinations on
> some CI server like jenkins (see matrix build in this case).
>
> Cheers
> Le 25 juin 2013 08:16, "Ron Wheeler"  a
> écrit :
>
> > Why do you need to compile with 2 versions?
> > You can run apps compiled with 1.5 under 1.6.
> >
> > I am not sure that the value of JAVA_HOME has any effect on compiling.
> > Check the settings in the compile plug-in.
> >
> > Ron
> >
> >
> > On 25/06/2013 1:59 AM, virg g wrote:
> >
> >> Hi, I need build my project  with multiple jdk versions 1.5 and 1.6. I
> >>
> > > am using maven compiler plugin to set the compiler based on JAVA_HOME
> > > set. Is it mandatory to set target either 1.5 or 1.6 based on the jdk
> > > version i want to build. Why because if i set compiler to jdk 1.6, in
> > > the debug log it shows that target is 1.5 but it should be 1.6 right?
> > > target should set automatically based on JAVA_HOME right unless i
> > > specically mention the target if i want to change? Any pointers for
> > > my problem?
> > >
> > > [DEBUG]   (f) executable = D:/jdk1.6.0_14/bin/javac [DEBUG] (f)
> > > source = 1.5 [DEBUG]   (f) staleMillis = 0 [DEBUG]   (f) target =
> > > 1.5
> > >
> > > Thanks virg
> > >
> >
> >
> > --
> > Ron Wheeler
> > President
> > Artifact Software Inc
> > email: rwhee...@artifact-software.com
> > skype: ronaldmwheeler
> > phone: 866-970-2435, ext 102
> >
> >
>


Re: Multiple JDK versions

2013-06-25 Thread Baptiste MATHUS
Hi,
+1 on the question, do you really need to build for both versions? As JDK
is backward compatible, you could for example build only with 1.5.

Maybe you only want to test your build on a 1.5 and 1.6, then I personally
would prefer keeping a quite simple build and keep those combinations on
some CI server like jenkins (see matrix build in this case).

Cheers
Le 25 juin 2013 08:16, "Ron Wheeler"  a
écrit :

> Why do you need to compile with 2 versions?
> You can run apps compiled with 1.5 under 1.6.
>
> I am not sure that the value of JAVA_HOME has any effect on compiling.
> Check the settings in the compile plug-in.
>
> Ron
>
>
> On 25/06/2013 1:59 AM, virg g wrote:
>
>> Hi, I need build my project  with multiple jdk versions 1.5 and 1.6. I
>>
> > am using maven compiler plugin to set the compiler based on JAVA_HOME
> > set. Is it mandatory to set target either 1.5 or 1.6 based on the jdk
> > version i want to build. Why because if i set compiler to jdk 1.6, in
> > the debug log it shows that target is 1.5 but it should be 1.6 right?
> > target should set automatically based on JAVA_HOME right unless i
> > specically mention the target if i want to change? Any pointers for
> > my problem?
> >
> > [DEBUG]   (f) executable = D:/jdk1.6.0_14/bin/javac [DEBUG] (f)
> > source = 1.5 [DEBUG]   (f) staleMillis = 0 [DEBUG]   (f) target =
> > 1.5
> >
> > Thanks virg
> >
>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwhee...@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>