Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven issue #9

Open
nishaatr opened this issue Nov 18, 2016 · 0 comments
Open

Maven issue #9

nishaatr opened this issue Nov 18, 2016 · 0 comments
Labels

Comments

@nishaatr
Copy link

When running a Maven step under RunAs, the step fails if a system property or environment variable has multi-line entry. Note: Maven passes system.* properties automatically to Maven.

Our failed build had three Nuget feeds defined in the system property and we got the following error:

[14:56:08][Step 1/1] Usage: java [-options] class [args...]
[14:56:08][Step 1/1] (to execute a class)
[14:56:08][Step 1/1] or java [-options] -jar jarfile [args...]
[14:56:08][Step 1/1] (to execute a jar file)
[14:56:08][Step 1/1] where options include:
[14:56:08][Step 1/1] -d32 use a 32-bit data model if available
[14:56:08][Step 1/1] -d64 use a 64-bit data model if available
[14:56:08][Step 1/1] -server to select the "server" VM
[14:56:08][Step 1/1] The default VM is server.
[14:56:08][Step 1/1]
[14:56:08][Step 1/1] -cp <class search path of directories and zip/jar files>
[14:56:08][Step 1/1] -classpath <class search path of directories and zip/jar files>
[14:56:08][Step 1/1] A ; separated list of directories, JAR archives,
[14:56:08][Step 1/1] and ZIP archives to search for class files.
...
...
...
[14:56:08][Step 1/1] 'http:' is not recognized as an internal or external command,
[14:56:08][Step 1/1] operable program or batch file.
[14:56:08][Step 1/1] 'http:' is not recognized as an internal or external command,
[14:56:08][Step 1/1] operable program or batch file.
[14:56:08][Step 1/1] 'http:' is not recognized as an internal or external command,
[14:56:08][Step 1/1] operable program or batch file.

Due to newlines in the property, Windows assumed it is a command and tried to run HTTP command (the Nuget feed start with http://feedurl). We resolved this by clearing the property in the build. We don't see this error when running without RunAs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants