You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by hg...@Teleplan.no on 2007/01/05 16:50:38 UTC

[m2] maven-native-plugin TEMP dir problem

Hi!

 

I'm trying to build the JNI example, but the linker informs me that it
cannot open 'TEMPFILE'. I've tried to find out if the %TMP% or %TEMP%
variables are changed using an ant echo goal, but no luck just yet (it
won't run the task if the jar's not present). Any hints to solve this
would be most appreciated.

 

I might add that I'm not running as an Administrator, nor do I have
access to C:\WINDOWS\Temp, which of course is where the system vars are
pointing.

 

Here's a snippet of the build run:

 

D:\Eclipse\VersionTesting\jni-example>mvn -Dplatform=win32 -Ddebug
compile

[INFO] Scanning for projects...

[INFO] Reactor build order:

[INFO]   JNI Example

[INFO]   JNI - Java

[INFO]   JNI - Natives

[INFO]   JNI - DLL

[INFO]
------------------------------------------------------------------------
----

[INFO] Building JNI Example

[INFO]    task-segment: [compile]

[INFO]
------------------------------------------------------------------------
----

[INFO] No goals needed for project - skipping

[INFO]
------------------------------------------------------------------------
----

[INFO] Building JNI - Java

[INFO]    task-segment: [compile]

[INFO]
------------------------------------------------------------------------
----

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Nothing to compile - all classes are up to date

[INFO]
------------------------------------------------------------------------
----

[INFO] Building JNI - Natives

[INFO]    task-segment: [compile]

[INFO]
------------------------------------------------------------------------
----

[INFO] No goals needed for project - skipping

[INFO]
------------------------------------------------------------------------
----

[INFO] Building JNI - DLL

[INFO]    task-segment: [compile]

[INFO]
------------------------------------------------------------------------
----

[INFO] [native:initialize]

[INFO] [native:javah {execution: javah}]

[INFO] javah -o
D:\Eclipse\VersionTesting\jni-example\native\win32\target\custom-javah\H

2\target\classes;D:\Eclipse\VersionTesting\jni-example\java\target\class
es HelloWorld

[INFO] [native:resource-compile {execution: resource-compile}]

[INFO]
D:\Eclipse\VersionTesting\jni-example\native\win32\..\src\main\native\he
llo.rc is

[INFO] [native:compile]

[INFO] [native:link]

[INFO] link.exe /DEBUG /INCREMENTAL:NO /DLL oldnames.lib kernel32.lib
/out:D:\Eclipse\Ve

target\HelloWorld.obj

Microsoft (R) Incremental Linker Version 7.10.6030

Copyright (C) Microsoft Corporation.  All rights reserved.

 

LINK : warning LNK4068: /MACHINE not specified; defaulting to X86

LINK : fatal error LNK1104: cannot open file 'TEMPFILE'

[INFO]
------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO]
------------------------------------------------------------------------

[INFO] Error executing command line. Exit code:1104

 

 

Sincerely

 

Hans-Gunnar Vold


Re: [m2] maven-native-plugin TEMP dir problem

Posted by Wayne Fay <wa...@gmail.com>.
You should be able to set the TEMP/TMP paths to something your user
has access to.
set TEMP=...
set TMP=...

Also C:\Windows\Temp is a strange place for your TEMP folder. On my
system, it defaults to:
TEMP=C:\DOCUME~1\WFay\LOCALS~1\Temp
TMP=C:\DOCUME~1\WFay\LOCALS~1\Temp

I've never seen Windows locked down such that you cannot set an
environment variable.

Wayne

On 1/8/07, Dan Tran <da...@gmail.com> wrote:
> You meant you are not allowed to set your own environment variable?
>
> If you are in such a environment, using env factory would not work.
>
> Please see if you can reproduce the problem  and file a JIRA
>
> thanks
>
> -Dan
>
>
> On 1/8/07, hgv@teleplan.no <hg...@teleplan.no> wrote:
> >
> > Thanks for the response Dan.
> >
> > It did not work using either JDK 1.4.2_13, 1.5.0_10, or 1.6.0. I did get
> > it to run though, by removing the environment factory and running Maven
> > from the VS.NET 2003 command prompt.
> >
> > So, I think the problem lies in that a TEMP variable is never specified
> > in the environment factory, and that it indeed should be. I guess, but
> > haven't verified it, that it defaults to C:\WINDOWS\Temp, with no luck
> > since it is off limits for a normal (restricted) user, as it should be.
> >
> > PS! It's good practice to develop as a non-administrator user and it's
> > my opinion that it should be encouraged.
> >
> > -hg
> >
> > -----Original Message-----
> > From: Dan Tran [mailto:dantran@gmail.com]
> > Sent: 5. januar 2007 18:28
> > To: Maven Users List
> > Subject: Re: [m2] maven-native-plugin TEMP dir problem
> >
> > Try with JDK5.
> >
> > I think there is a problem with JDK4 with maven-native where TMP var is
> > nullified.
> >
> > -D
> >
> >
> > On 1/5/07, hgv@teleplan.no <hg...@teleplan.no> wrote:
> > >
> > > Hi!
> > >
> > >
> > >
> > > I'm trying to build the JNI example, but the linker informs me that it
> > > cannot open 'TEMPFILE'. I've tried to find out if the %TMP% or %TEMP%
> > > variables are changed using an ant echo goal, but no luck just yet (it
> > > won't run the task if the jar's not present). Any hints to solve this
> > > would be most appreciated.
> > >
> > >
> > >
> > > I might add that I'm not running as an Administrator, nor do I have
> > > access to C:\WINDOWS\Temp, which of course is where the system vars
> > are
> > > pointing.
> > >
> > >
> > >
> > > Here's a snippet of the build run:
> > >
> > >
> > >
> > > D:\Eclipse\VersionTesting\jni-example>mvn -Dplatform=win32 -Ddebug
> > > compile
> > >
> > > [INFO] Scanning for projects...
> > >
> > > [INFO] Reactor build order:
> > >
> > > [INFO]   JNI Example
> > >
> > > [INFO]   JNI - Java
> > >
> > > [INFO]   JNI - Natives
> > >
> > > [INFO]   JNI - DLL
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > ----
> > >
> > > [INFO] Building JNI Example
> > >
> > > [INFO]    task-segment: [compile]
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > ----
> > >
> > > [INFO] No goals needed for project - skipping
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > ----
> > >
> > > [INFO] Building JNI - Java
> > >
> > > [INFO]    task-segment: [compile]
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > ----
> > >
> > > [INFO] [resources:resources]
> > >
> > > [INFO] Using default encoding to copy filtered resources.
> > >
> > > [INFO] [compiler:compile]
> > >
> > > [INFO] Nothing to compile - all classes are up to date
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > ----
> > >
> > > [INFO] Building JNI - Natives
> > >
> > > [INFO]    task-segment: [compile]
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > ----
> > >
> > > [INFO] No goals needed for project - skipping
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > ----
> > >
> > > [INFO] Building JNI - DLL
> > >
> > > [INFO]    task-segment: [compile]
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > > ----
> > >
> > > [INFO] [native:initialize]
> > >
> > > [INFO] [native:javah {execution: javah}]
> > >
> > > [INFO] javah -o
> > >
> > D:\Eclipse\VersionTesting\jni-example\native\win32\target\custom-javah\H
> > >
> > >
> > 2\target\classes;D:\Eclipse\VersionTesting\jni-example\java\target\class
> > > es HelloWorld
> > >
> > > [INFO] [native:resource-compile {execution: resource-compile}]
> > >
> > > [INFO]
> > >
> > D:\Eclipse\VersionTesting\jni-example\native\win32\..\src\main\native\he
> > > llo.rc is
> > >
> > > [INFO] [native:compile]
> > >
> > > [INFO] [native:link]
> > >
> > > [INFO] link.exe /DEBUG /INCREMENTAL:NO /DLL oldnames.lib kernel32.lib
> > > /out:D:\Eclipse\Ve
> > >
> > > target\HelloWorld.obj
> > >
> > > Microsoft (R) Incremental Linker Version 7.10.6030
> > >
> > > Copyright (C) Microsoft Corporation.  All rights reserved.
> > >
> > >
> > >
> > > LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
> > >
> > > LINK : fatal error LNK1104: cannot open file 'TEMPFILE'
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > >
> > > [ERROR] BUILD ERROR
> > >
> > > [INFO]
> > >
> > ------------------------------------------------------------------------
> > >
> > > [INFO] Error executing command line. Exit code:1104
> > >
> > >
> > >
> > >
> > >
> > > Sincerely
> > >
> > >
> > >
> > > Hans-Gunnar Vold
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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: [m2] maven-native-plugin TEMP dir problem

Posted by Dan Tran <da...@gmail.com>.
You meant you are not allowed to set your own environment variable?

If you are in such a environment, using env factory would not work.

Please see if you can reproduce the problem  and file a JIRA

thanks

-Dan


On 1/8/07, hgv@teleplan.no <hg...@teleplan.no> wrote:
>
> Thanks for the response Dan.
>
> It did not work using either JDK 1.4.2_13, 1.5.0_10, or 1.6.0. I did get
> it to run though, by removing the environment factory and running Maven
> from the VS.NET 2003 command prompt.
>
> So, I think the problem lies in that a TEMP variable is never specified
> in the environment factory, and that it indeed should be. I guess, but
> haven't verified it, that it defaults to C:\WINDOWS\Temp, with no luck
> since it is off limits for a normal (restricted) user, as it should be.
>
> PS! It's good practice to develop as a non-administrator user and it's
> my opinion that it should be encouraged.
>
> -hg
>
> -----Original Message-----
> From: Dan Tran [mailto:dantran@gmail.com]
> Sent: 5. januar 2007 18:28
> To: Maven Users List
> Subject: Re: [m2] maven-native-plugin TEMP dir problem
>
> Try with JDK5.
>
> I think there is a problem with JDK4 with maven-native where TMP var is
> nullified.
>
> -D
>
>
> On 1/5/07, hgv@teleplan.no <hg...@teleplan.no> wrote:
> >
> > Hi!
> >
> >
> >
> > I'm trying to build the JNI example, but the linker informs me that it
> > cannot open 'TEMPFILE'. I've tried to find out if the %TMP% or %TEMP%
> > variables are changed using an ant echo goal, but no luck just yet (it
> > won't run the task if the jar's not present). Any hints to solve this
> > would be most appreciated.
> >
> >
> >
> > I might add that I'm not running as an Administrator, nor do I have
> > access to C:\WINDOWS\Temp, which of course is where the system vars
> are
> > pointing.
> >
> >
> >
> > Here's a snippet of the build run:
> >
> >
> >
> > D:\Eclipse\VersionTesting\jni-example>mvn -Dplatform=win32 -Ddebug
> > compile
> >
> > [INFO] Scanning for projects...
> >
> > [INFO] Reactor build order:
> >
> > [INFO]   JNI Example
> >
> > [INFO]   JNI - Java
> >
> > [INFO]   JNI - Natives
> >
> > [INFO]   JNI - DLL
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> > ----
> >
> > [INFO] Building JNI Example
> >
> > [INFO]    task-segment: [compile]
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> > ----
> >
> > [INFO] No goals needed for project - skipping
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> > ----
> >
> > [INFO] Building JNI - Java
> >
> > [INFO]    task-segment: [compile]
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> > ----
> >
> > [INFO] [resources:resources]
> >
> > [INFO] Using default encoding to copy filtered resources.
> >
> > [INFO] [compiler:compile]
> >
> > [INFO] Nothing to compile - all classes are up to date
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> > ----
> >
> > [INFO] Building JNI - Natives
> >
> > [INFO]    task-segment: [compile]
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> > ----
> >
> > [INFO] No goals needed for project - skipping
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> > ----
> >
> > [INFO] Building JNI - DLL
> >
> > [INFO]    task-segment: [compile]
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> > ----
> >
> > [INFO] [native:initialize]
> >
> > [INFO] [native:javah {execution: javah}]
> >
> > [INFO] javah -o
> >
> D:\Eclipse\VersionTesting\jni-example\native\win32\target\custom-javah\H
> >
> >
> 2\target\classes;D:\Eclipse\VersionTesting\jni-example\java\target\class
> > es HelloWorld
> >
> > [INFO] [native:resource-compile {execution: resource-compile}]
> >
> > [INFO]
> >
> D:\Eclipse\VersionTesting\jni-example\native\win32\..\src\main\native\he
> > llo.rc is
> >
> > [INFO] [native:compile]
> >
> > [INFO] [native:link]
> >
> > [INFO] link.exe /DEBUG /INCREMENTAL:NO /DLL oldnames.lib kernel32.lib
> > /out:D:\Eclipse\Ve
> >
> > target\HelloWorld.obj
> >
> > Microsoft (R) Incremental Linker Version 7.10.6030
> >
> > Copyright (C) Microsoft Corporation.  All rights reserved.
> >
> >
> >
> > LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
> >
> > LINK : fatal error LNK1104: cannot open file 'TEMPFILE'
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> >
> > [ERROR] BUILD ERROR
> >
> > [INFO]
> >
> ------------------------------------------------------------------------
> >
> > [INFO] Error executing command line. Exit code:1104
> >
> >
> >
> >
> >
> > Sincerely
> >
> >
> >
> > Hans-Gunnar Vold
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: [m2] maven-native-plugin TEMP dir problem

Posted by hg...@Teleplan.no.
Thanks for the response Dan.

It did not work using either JDK 1.4.2_13, 1.5.0_10, or 1.6.0. I did get
it to run though, by removing the environment factory and running Maven
from the VS.NET 2003 command prompt.

So, I think the problem lies in that a TEMP variable is never specified
in the environment factory, and that it indeed should be. I guess, but
haven't verified it, that it defaults to C:\WINDOWS\Temp, with no luck
since it is off limits for a normal (restricted) user, as it should be.

PS! It's good practice to develop as a non-administrator user and it's
my opinion that it should be encouraged.

-hg

-----Original Message-----
From: Dan Tran [mailto:dantran@gmail.com] 
Sent: 5. januar 2007 18:28
To: Maven Users List
Subject: Re: [m2] maven-native-plugin TEMP dir problem

Try with JDK5.

I think there is a problem with JDK4 with maven-native where TMP var is
nullified.

-D


On 1/5/07, hgv@teleplan.no <hg...@teleplan.no> wrote:
>
> Hi!
>
>
>
> I'm trying to build the JNI example, but the linker informs me that it
> cannot open 'TEMPFILE'. I've tried to find out if the %TMP% or %TEMP%
> variables are changed using an ant echo goal, but no luck just yet (it
> won't run the task if the jar's not present). Any hints to solve this
> would be most appreciated.
>
>
>
> I might add that I'm not running as an Administrator, nor do I have
> access to C:\WINDOWS\Temp, which of course is where the system vars
are
> pointing.
>
>
>
> Here's a snippet of the build run:
>
>
>
> D:\Eclipse\VersionTesting\jni-example>mvn -Dplatform=win32 -Ddebug
> compile
>
> [INFO] Scanning for projects...
>
> [INFO] Reactor build order:
>
> [INFO]   JNI Example
>
> [INFO]   JNI - Java
>
> [INFO]   JNI - Natives
>
> [INFO]   JNI - DLL
>
> [INFO]
>
------------------------------------------------------------------------
> ----
>
> [INFO] Building JNI Example
>
> [INFO]    task-segment: [compile]
>
> [INFO]
>
------------------------------------------------------------------------
> ----
>
> [INFO] No goals needed for project - skipping
>
> [INFO]
>
------------------------------------------------------------------------
> ----
>
> [INFO] Building JNI - Java
>
> [INFO]    task-segment: [compile]
>
> [INFO]
>
------------------------------------------------------------------------
> ----
>
> [INFO] [resources:resources]
>
> [INFO] Using default encoding to copy filtered resources.
>
> [INFO] [compiler:compile]
>
> [INFO] Nothing to compile - all classes are up to date
>
> [INFO]
>
------------------------------------------------------------------------
> ----
>
> [INFO] Building JNI - Natives
>
> [INFO]    task-segment: [compile]
>
> [INFO]
>
------------------------------------------------------------------------
> ----
>
> [INFO] No goals needed for project - skipping
>
> [INFO]
>
------------------------------------------------------------------------
> ----
>
> [INFO] Building JNI - DLL
>
> [INFO]    task-segment: [compile]
>
> [INFO]
>
------------------------------------------------------------------------
> ----
>
> [INFO] [native:initialize]
>
> [INFO] [native:javah {execution: javah}]
>
> [INFO] javah -o
>
D:\Eclipse\VersionTesting\jni-example\native\win32\target\custom-javah\H
>
>
2\target\classes;D:\Eclipse\VersionTesting\jni-example\java\target\class
> es HelloWorld
>
> [INFO] [native:resource-compile {execution: resource-compile}]
>
> [INFO]
>
D:\Eclipse\VersionTesting\jni-example\native\win32\..\src\main\native\he
> llo.rc is
>
> [INFO] [native:compile]
>
> [INFO] [native:link]
>
> [INFO] link.exe /DEBUG /INCREMENTAL:NO /DLL oldnames.lib kernel32.lib
> /out:D:\Eclipse\Ve
>
> target\HelloWorld.obj
>
> Microsoft (R) Incremental Linker Version 7.10.6030
>
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
>
>
> LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
>
> LINK : fatal error LNK1104: cannot open file 'TEMPFILE'
>
> [INFO]
>
------------------------------------------------------------------------
>
> [ERROR] BUILD ERROR
>
> [INFO]
>
------------------------------------------------------------------------
>
> [INFO] Error executing command line. Exit code:1104
>
>
>
>
>
> Sincerely
>
>
>
> Hans-Gunnar Vold
>
>
>

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


Re: [m2] maven-native-plugin TEMP dir problem

Posted by Dan Tran <da...@gmail.com>.
Try with JDK5.

I think there is a problem with JDK4 with maven-native where TMP var is
nullified.

-D


On 1/5/07, hgv@teleplan.no <hg...@teleplan.no> wrote:
>
> Hi!
>
>
>
> I'm trying to build the JNI example, but the linker informs me that it
> cannot open 'TEMPFILE'. I've tried to find out if the %TMP% or %TEMP%
> variables are changed using an ant echo goal, but no luck just yet (it
> won't run the task if the jar's not present). Any hints to solve this
> would be most appreciated.
>
>
>
> I might add that I'm not running as an Administrator, nor do I have
> access to C:\WINDOWS\Temp, which of course is where the system vars are
> pointing.
>
>
>
> Here's a snippet of the build run:
>
>
>
> D:\Eclipse\VersionTesting\jni-example>mvn -Dplatform=win32 -Ddebug
> compile
>
> [INFO] Scanning for projects...
>
> [INFO] Reactor build order:
>
> [INFO]   JNI Example
>
> [INFO]   JNI - Java
>
> [INFO]   JNI - Natives
>
> [INFO]   JNI - DLL
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Building JNI Example
>
> [INFO]    task-segment: [compile]
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] No goals needed for project - skipping
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Building JNI - Java
>
> [INFO]    task-segment: [compile]
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] [resources:resources]
>
> [INFO] Using default encoding to copy filtered resources.
>
> [INFO] [compiler:compile]
>
> [INFO] Nothing to compile - all classes are up to date
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Building JNI - Natives
>
> [INFO]    task-segment: [compile]
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] No goals needed for project - skipping
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Building JNI - DLL
>
> [INFO]    task-segment: [compile]
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] [native:initialize]
>
> [INFO] [native:javah {execution: javah}]
>
> [INFO] javah -o
> D:\Eclipse\VersionTesting\jni-example\native\win32\target\custom-javah\H
>
> 2\target\classes;D:\Eclipse\VersionTesting\jni-example\java\target\class
> es HelloWorld
>
> [INFO] [native:resource-compile {execution: resource-compile}]
>
> [INFO]
> D:\Eclipse\VersionTesting\jni-example\native\win32\..\src\main\native\he
> llo.rc is
>
> [INFO] [native:compile]
>
> [INFO] [native:link]
>
> [INFO] link.exe /DEBUG /INCREMENTAL:NO /DLL oldnames.lib kernel32.lib
> /out:D:\Eclipse\Ve
>
> target\HelloWorld.obj
>
> Microsoft (R) Incremental Linker Version 7.10.6030
>
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
>
>
> LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
>
> LINK : fatal error LNK1104: cannot open file 'TEMPFILE'
>
> [INFO]
> ------------------------------------------------------------------------
>
> [ERROR] BUILD ERROR
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Error executing command line. Exit code:1104
>
>
>
>
>
> Sincerely
>
>
>
> Hans-Gunnar Vold
>
>
>