You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2011/02/13 22:54:30 UTC

Call System.setProperty("java.awt.headless", true)?

Arguably, if perhaps impractically, maven should run with a security
manager that prevented any one plugin from making some global change
to the JVM that could have evil effects on other plugin. For example,
from making the call in the subject.

On the other, it's hard for me to think of a legitimate reason for any
plugin to want non-headless operation.

This concerns me because jfreechart, used in code I'm wrapping in a
plugin, makes my Mac's GUI flash if headless isn't set.

It seems to me that it might be a legitimate idea for maven itself to
just set headless, at least when invoked from the shell.

Yes, of course, I could put it in MAVEN_OPTS, and I will if this
suggesting is met with derision or worse.

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


Re: Call System.setProperty("java.awt.headless", true)?

Posted by Benson Margulies <bi...@gmail.com>.
That pretty much kills this idea. Too bad AWT doesn't have an *api*
for creating a local headless bubble.

On Tue, Feb 15, 2011 at 11:35 PM, Stephen Connolly
<st...@gmail.com> wrote:
> stupid phone. stop sending empty messages.
>
> ok. what i was trying to say us that there are enough people out there who
> use mvn exec:exec to run their swing apps
>
> - Stephen
>
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 16 Feb 2011 02:53, "Jesse Glick" <je...@oracle.com> wrote:
>> On 02/13/2011 04:54 PM, Benson Margulies wrote:
>>> It seems to me that it might be a legitimate idea for maven itself to
>>> just set headless, at least when invoked from the shell.
>>
>> So long as this is done from the CLI entry point classes, or bin/mvn, and
> not in core classes where it could cause problems when running embedded in
> some other container
>> such as an IDE.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>

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


Re: Call System.setProperty("java.awt.headless", true)?

Posted by Stephen Connolly <st...@gmail.com>.
On 16 February 2011 23:15, Jesse Glick <je...@oracle.com> wrote:
> On 02/15/2011 11:35 PM, Stephen Connolly wrote:
>>
>> there are enough people out there who
>> use mvn exec:exec to run their swing apps
>
> Do you mean exec:java? (exec:exec -Dexec.executable="java" would be
Yeah... I was using my phone.... that it sent at all is a miracle

> unaffected.) It's not a very good idea to run an arbitrary app this way,
> since there are plenty of opportunities for the result to be subtly
> different than running the app in its own JVM, and you have no opportunity
> to customize VM options. But it is probably true that a lot of people do it
> anyway. Perhaps exec:java should fork unless explicitly requested to run
> in-VM.

Might be a good idea... but there would need to be tweaks over how and
which system properties got passed through

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

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


RE: Repository Confusion

Posted by tw...@oreillyauto.com.
It's interesting that this is a snapshot problem.  We had a very similar 
problem with our Archiva installation which proved to be related to use of 
the <mirrors> setting in settings.xml.    We had two Archiva repositories 
set up - one for regular artifacts and one for snapshots.   We used the 
<mirrorOf>*</mirrorOf> setting for the regular repository, which turned 
out to have the "side effect" (if I read the documentation correctly) of 
blocking access to the snapshots repository (since maven thought the whole 
world was in the regular repository).   Removing the mirror settings 
solved a lot of problems.

Details of the Maven mirror settings are here 
http://maven.apache.org/guides/mini/guide-mirror-settings.html 


Looking forward to finding out what the resolution of this problem is!




From:   Shay Thompson <st...@adobe.com>
To:     Maven Users List <us...@maven.apache.org>
Date:   02/17/2011 08:04 AM
Subject:        RE: Repository Confusion



Error is below.  It looks like it's looking in the snapshots repository 
but the url doesn't.  Odd.  The dependency I'm using is below too.

<dependency>
                 <groupId>org.apache.sling</groupId>
                 <artifactId>org.apache.sling.junit.core</artifactId>
                 <version>0.1.1-SNAPSHOT</version>
<dependency>



Downloading: 
http://xxx:8080/archiva/repository/internal//org/apache/sling/org.apache.sling.junit.core/0.1.1-SNAPSHOT/org.apache.sling.junit.core-0.1.1-SNAPSHOT.pom


[INFO] Unable to find resource 
'org.apache.sling:org.apache.sling.junit.core:pom:0.1.1-SNAPSHOT' in 
repository apache.snapshots (http://repository.apache.org/snapshots)

Downloading: 
http://xxx:8080/archiva/repository/internal//org/apache/sling/org.apache.sling.junit.core/0.1.1-SNAPSHOT/org.apache.sling.junit.core-0.1.1-SNAPSHOT.jar


[INFO] Unable to find resource 
'org.apache.sling:org.apache.sling.junit.core:jar:0.1.1-SNAPSHOT' in 
repository apache.snapshots (http://repository.apache.org/snapshots)

[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.



-----Original Message-----
From: odeaching@gmail.com [mailto:odeaching@gmail.com] On Behalf Of Deng 
Ching
Sent: Thursday, February 17, 2011 12:46 AM
To: Maven Users List
Subject: Re: Repository Confusion

What's the exact error you're getting in Maven for the 2 machines?

-Deng

On Thu, Feb 17, 2011 at 2:35 PM, Shay Thompson <st...@adobe.com> wrote:
>
> Outlook likes to capitalize. My file has a lower-case s.
>
> -----Original Message-----
> From: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@csiro.au]
> Sent: Wednesday, February 16, 2011 11:58 PM
> To: Maven Users List
> Cc: Shay Thompson
> Subject: Re: Repository Confusion
>
> You are asking about your Maven settings.xml?
>
> The file should be called settings.xml (note case!) not Settings.xml on
> platforms and filesystems that filename case-sensitive. For example,
> Settings.xml would work on Windows/NTFS but not on Unix or Linux, where
> only settings.xml (lowercase) would work.
>
> Kind regards,
> Ben.
>
> On 17/02/11 13:41, Shay Thompson wrote:
>> Settings.xml is exactly the same on all machines.
>
> --
> Ben Caradoc-Davies <Be...@csiro.au>
> Software Engineering Team Leader
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
>

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


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


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean (mailgw2:E73FA1E6FC.A3195).




This communication and any attachments are confidential, protected by 
Communications Privacy Act 18 USCS § 2510, solely for the use of the 
intended recipient, and may contain legally privileged material. If you 
are not the intended recipient, please return or destroy it immediately. 
Thank you.

RE: Repository Confusion

Posted by Shay Thompson <st...@adobe.com>.
Error is below.  It looks like it's looking in the snapshots repository but the url doesn't.  Odd.  The dependency I'm using is below too.

<dependency>
	<groupId>org.apache.sling</groupId>
	<artifactId>org.apache.sling.junit.core</artifactId>
	<version>0.1.1-SNAPSHOT</version>
<dependency>



Downloading: http://xxx:8080/archiva/repository/internal//org/apache/sling/org.apache.sling.junit.core/0.1.1-SNAPSHOT/org.apache.sling.junit.core-0.1.1-SNAPSHOT.pom

[INFO] Unable to find resource 'org.apache.sling:org.apache.sling.junit.core:pom:0.1.1-SNAPSHOT' in repository apache.snapshots (http://repository.apache.org/snapshots)

Downloading: http://xxx:8080/archiva/repository/internal//org/apache/sling/org.apache.sling.junit.core/0.1.1-SNAPSHOT/org.apache.sling.junit.core-0.1.1-SNAPSHOT.jar

[INFO] Unable to find resource 'org.apache.sling:org.apache.sling.junit.core:jar:0.1.1-SNAPSHOT' in repository apache.snapshots (http://repository.apache.org/snapshots)

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.



-----Original Message-----
From: odeaching@gmail.com [mailto:odeaching@gmail.com] On Behalf Of Deng Ching
Sent: Thursday, February 17, 2011 12:46 AM
To: Maven Users List
Subject: Re: Repository Confusion

What's the exact error you're getting in Maven for the 2 machines?

-Deng

On Thu, Feb 17, 2011 at 2:35 PM, Shay Thompson <st...@adobe.com> wrote:
>
> Outlook likes to capitalize. My file has a lower-case s.
>
> -----Original Message-----
> From: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@csiro.au]
> Sent: Wednesday, February 16, 2011 11:58 PM
> To: Maven Users List
> Cc: Shay Thompson
> Subject: Re: Repository Confusion
>
> You are asking about your Maven settings.xml?
>
> The file should be called settings.xml (note case!) not Settings.xml on
> platforms and filesystems that filename case-sensitive. For example,
> Settings.xml would work on Windows/NTFS but not on Unix or Linux, where
> only settings.xml (lowercase) would work.
>
> Kind regards,
> Ben.
>
> On 17/02/11 13:41, Shay Thompson wrote:
>> Settings.xml is exactly the same on all machines.
>
> --
> Ben Caradoc-Davies <Be...@csiro.au>
> Software Engineering Team Leader
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
>

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


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


Re: Repository Confusion

Posted by Deng Ching <oc...@apache.org>.
What's the exact error you're getting in Maven for the 2 machines?

-Deng

On Thu, Feb 17, 2011 at 2:35 PM, Shay Thompson <st...@adobe.com> wrote:
>
> Outlook likes to capitalize. My file has a lower-case s.
>
> -----Original Message-----
> From: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@csiro.au]
> Sent: Wednesday, February 16, 2011 11:58 PM
> To: Maven Users List
> Cc: Shay Thompson
> Subject: Re: Repository Confusion
>
> You are asking about your Maven settings.xml?
>
> The file should be called settings.xml (note case!) not Settings.xml on
> platforms and filesystems that filename case-sensitive. For example,
> Settings.xml would work on Windows/NTFS but not on Unix or Linux, where
> only settings.xml (lowercase) would work.
>
> Kind regards,
> Ben.
>
> On 17/02/11 13:41, Shay Thompson wrote:
>> Settings.xml is exactly the same on all machines.
>
> --
> Ben Caradoc-Davies <Be...@csiro.au>
> Software Engineering Team Leader
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
>

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


RE: Repository Confusion

Posted by Shay Thompson <st...@adobe.com>.
Outlook likes to capitalize. My file has a lower-case s.

-----Original Message-----
From: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@csiro.au] 
Sent: Wednesday, February 16, 2011 11:58 PM
To: Maven Users List
Cc: Shay Thompson
Subject: Re: Repository Confusion

You are asking about your Maven settings.xml?

The file should be called settings.xml (note case!) not Settings.xml on 
platforms and filesystems that filename case-sensitive. For example, 
Settings.xml would work on Windows/NTFS but not on Unix or Linux, where 
only settings.xml (lowercase) would work.

Kind regards,
Ben.

On 17/02/11 13:41, Shay Thompson wrote:
> Settings.xml is exactly the same on all machines.

-- 
Ben Caradoc-Davies <Be...@csiro.au>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Re: Repository Confusion

Posted by Ben Caradoc-Davies <Be...@csiro.au>.
You are asking about your Maven settings.xml?

The file should be called settings.xml (note case!) not Settings.xml on 
platforms and filesystems that filename case-sensitive. For example, 
Settings.xml would work on Windows/NTFS but not on Unix or Linux, where 
only settings.xml (lowercase) would work.

Kind regards,
Ben.

On 17/02/11 13:41, Shay Thompson wrote:
> Settings.xml is exactly the same on all machines.

-- 
Ben Caradoc-Davies <Be...@csiro.au>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

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


RE: Repository Confusion

Posted by Shay Thompson <st...@adobe.com>.
Settings.xml is exactly the same on all machines.  

I wasn't aware of an archiva list nor am I sure this is an archiva problem.. *shrug*

-----Original Message-----
From: odeaching@gmail.com [mailto:odeaching@gmail.com] On Behalf Of Deng Ching
Sent: Wednesday, February 16, 2011 11:39 PM
To: Maven Users List
Subject: Re: Repository Confusion

Hi Shay,

Was the settings.xml properly configured in the other 2 machines?

Btw, you may want to move this over to users@archiva.a.o instead :)

Thanks,
Deng

On Thu, Feb 17, 2011 at 1:03 PM, Shay Thompson <st...@adobe.com> wrote:
>
> I have an internal repository, Archiva, setup and running.  I uploaded a library using the Admin UI that comes with Archiva.  On my personal machine I can fetch the library with Maven but on 2 others I can't get it.  When I browse the repository I see it added a timestamp to the jar name.  Is this expected?  Could I have something configured wrong on the other 2 machines?
>
> I tried deleting my entire local repository to see if I could get it to fail locally but it still works on my 1 machine.
>
>
>

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


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


Re: Repository Confusion

Posted by Deng Ching <oc...@apache.org>.
Hi Shay,

Was the settings.xml properly configured in the other 2 machines?

Btw, you may want to move this over to users@archiva.a.o instead :)

Thanks,
Deng

On Thu, Feb 17, 2011 at 1:03 PM, Shay Thompson <st...@adobe.com> wrote:
>
> I have an internal repository, Archiva, setup and running.  I uploaded a library using the Admin UI that comes with Archiva.  On my personal machine I can fetch the library with Maven but on 2 others I can't get it.  When I browse the repository I see it added a timestamp to the jar name.  Is this expected?  Could I have something configured wrong on the other 2 machines?
>
> I tried deleting my entire local repository to see if I could get it to fail locally but it still works on my 1 machine.
>
>
>

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


Repository Confusion

Posted by Shay Thompson <st...@adobe.com>.
I have an internal repository, Archiva, setup and running.  I uploaded a library using the Admin UI that comes with Archiva.  On my personal machine I can fetch the library with Maven but on 2 others I can't get it.  When I browse the repository I see it added a timestamp to the jar name.  Is this expected?  Could I have something configured wrong on the other 2 machines?

I tried deleting my entire local repository to see if I could get it to fail locally but it still works on my 1 machine.



Re: Call System.setProperty("java.awt.headless", true)?

Posted by Jesse Glick <je...@oracle.com>.
On 02/15/2011 11:35 PM, Stephen Connolly wrote:
> there are enough people out there who
> use mvn exec:exec to run their swing apps

Do you mean exec:java? (exec:exec -Dexec.executable="java" would be unaffected.) It's not a very good idea to run an arbitrary app this way, since there are plenty of 
opportunities for the result to be subtly different than running the app in its own JVM, and you have no opportunity to customize VM options. But it is probably true that 
a lot of people do it anyway. Perhaps exec:java should fork unless explicitly requested to run in-VM.


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


Re: Call System.setProperty("java.awt.headless", true)?

Posted by Stephen Connolly <st...@gmail.com>.
stupid phone. stop sending empty messages.

ok. what i was trying to say us that there are enough people out there who
use mvn exec:exec to run their swing apps

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 16 Feb 2011 02:53, "Jesse Glick" <je...@oracle.com> wrote:
> On 02/13/2011 04:54 PM, Benson Margulies wrote:
>> It seems to me that it might be a legitimate idea for maven itself to
>> just set headless, at least when invoked from the shell.
>
> So long as this is done from the CLI entry point classes, or bin/mvn, and
not in core classes where it could cause problems when running embedded in
some other container
> such as an IDE.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Re: Call System.setProperty("java.awt.headless", true)?

Posted by Stephen Connolly <st...@gmail.com>.
- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 16 Feb 2011 02:53, "Jesse Glick" <je...@oracle.com> wrote:
> On 02/13/2011 04:54 PM, Benson Margulies wrote:
>> It seems to me that it might be a legitimate idea for maven itself to
>> just set headless, at least when invoked from the shell.
>
> So long as this is done from the CLI entry point classes, or bin/mvn, and
not in core classes where it could cause problems when running embedded in
some other container
> such as an IDE.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Re: Call System.setProperty("java.awt.headless", true)?

Posted by Jesse Glick <je...@oracle.com>.
On 02/13/2011 04:54 PM, Benson Margulies wrote:
> It seems to me that it might be a legitimate idea for maven itself to
> just set headless, at least when invoked from the shell.

So long as this is done from the CLI entry point classes, or bin/mvn, and not in core classes where it could cause problems when running embedded in some other container 
such as an IDE.


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