maven 3.1.0 compile does not use proxy username - authentication

Running on Windows XP, I set up my ~/.m2/settings.xml to include the following proxy settings:
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>davidho</username>
<password>mypassword</password>
<host>192.168.0.35</host>
<port>3128</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
mvn archetype:generate then worked great, downloading all the required files and succeeding.
But then I tried
mvn compile
and got:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (http.//repo.maven.apache.org/maven2): Error transferring file: Server returned HTTP response code: 407 for URL: http.//repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom from http.//repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom with proxyInfo ProxyInfo{host='192.168.0.35', userName='null', port=3128, type='http', nonProxyHosts='null'}
Huh ?! Why does it say userName='null' when I have specified a username and password in my
settings.xml ?
I then tried:
mvn compile -Dhttp.proxyUser=davidho -Dhttp.proxyPassword=mypassword
and it made no difference - it still said userName='null'
How can I fix this thanks ?
n.b. stackoverflow forced me to change the "http:" in the error message to "http."

Same here, using parameters on the cmd line or in the settings file.

There are few things you need to check!
if you are using IDE then you might be facing issues with Embedded maven installation which is by default value and you can get it resolved by changing maven installation. try this answer.
if you are behind NTLM windows proxy you need to use CNTLM software to get you authenticated which is batter described in this answer.if you are using IDE please change installation as described in first point.

Related

Axis2 Fault : The system is attempting to engage a module that is not available: addressing

I have the addressing module in my modules folder as well. I have the <module ref="addressing"/> uncommented as well. But, it is still giving the error. I searched in another thread on Stack Overflow:
org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: addressing
But, it did not help.
Disclaimer- The axis2 war was working on JBoss Server but not on WAS server.
Solution- In axis2.xml file, there is a parameter 'EnableChildFirstClassLoading' which was commented, uncommenting it and deploying axis2 war again solved the issue.
Needed to make the above mentioned change on WAS server only.

Errors running builder 'Maven Project Builder' on project

While maven installation, Errors running builder 'Maven Project Builder' on project 'com.oracle.oats'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
I find the solution in many ways.
This is proxy error. you check access in proxy URL (host) in IE. (Open IE ->TOOL ->INTERNET OPTIONS -> CONNECTIONS -> LAN CONNECTION.)
If it is ok this is working fine.
Otherwise you remove maven-resources-plugin:jar:2.6. Re-execute.
You change eclipse-version.
If any other alternate solution. kindly update

Installing kdesu on NixOS

When setting advanced properties on a program/link to start as another user it is throwing the error:
Sorry - Plasma
KDEInit could not launch 'kdesu':
Could not open library 'libkdeinit5_kdesu'.
Cannot load library /run/current-system/sw/lib/libkdeinit5_kdesu: (/run/current-system/sw/lib/libkdeinit5_kdesu.so: cannot open shared object file: No such file or directory)
I tried to install kdesu using:
[root#nixos:~]# nix-env -qaP kdesu
nixos.kdeFrameworks.kdesu kdesu-5.36.0
[root#nixos:~]# nix-env -iA nixos.kdeFrameworks.kdesu
replacing old ‘kdesu-5.36.0’
installing ‘kdesu-5.36.0’
building path(s) ‘/nix/store/2bn27h5drw0800gk5z2rmwfx78gqbbdc-user-environment’
created 2209 symlinks in user environment
[root#nixos:~]# kdesu
bash: kdesu: command not found
[root#nixos:~]# which kdesu
which: no kdesu in (/root/bin:/run/wrappers/bin:/etc/per-user-pkgs/root/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin)
I also tried installing nix-env -iA nixos.kde-cli-tools but that does not work either.
Any suggestions on how to get kdesu installed on NixOS?
As a general rule, unlike many distros on NixOS installing a library directly doesn't work as intended; the application that needs the library won't be able to find it. Instead, the package must declare all it's dependencies.
Packages which have optional dependencies tend to have a way to add them via configuration. You may want to try something like this in /etc/nixos/configuration.nix
services.xserver.desktopManager.plasma5.extraPackages = with kdeFrameworks;
[ kdesu
];
I'm glad to see that you filed an issue on Nixpkgs, because this is not a configuration issue but a packaging bug.
It looks like kdesu lives in some libexec dir that doesn't hasn't been added to your PATH. It belongs to the kde-cli-tools package. You can run it with
$(nix-build '<nixpkgs>' -A kde-cli-tools --no-out-link)/lib/libexec/kf5/kdesu
You can use the above as an alias to launch kdesu until the fix to the packaging bug arrives.

How to set up TeamCity to use own HTTP authenticated NuGet service?

a problem is that TeamCity is unable to authorize into NuGet service which runs on same TeamCity instance.
Below you can find how the Build configuration looks now:
I also added Build Feature for NuGet Credentials:
With this configuration I receive following errors in log:
Restoring NuGet package Nuget.Package.Name.0.1.0.41.
Please provide credentials for: http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc
UserName: GET http://www.nuget.org/Packages(Id='Nuget.Package.Name';,Version='0.1.0.41')
NotFound http://www.nuget.org/Packages(Id='Nuget.Package.Name';,Version='0.1.0.41') 194ms
GET http://www.nuget.org/FindPackagesById()?id='Nuget.Package.Name';
NotFound http://www.nuget.org/FindPackagesById()?id='Nuget.Package.Name'; 105ms
WARNING: Unable to find version '0.1.0.41' of package 'Nuget.Package.Name'.
C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache: Package 'Nuget.Package.Name.0.1.0.41' is not found on source 'C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache'.
C:\Windows\system32\config\systemprofile\.nuget\packages\: Package 'Nuget.Package.Name.0.1.0.41' is not found on source 'C:\Windows\system32\config\systemprofile\.nuget\packages\'.
http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc: Unable to load the service index for source http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc.
Cannot prompt for input in non-interactive mode.
http://nuget.org: The V2 feed at 'http://www.nuget.org/FindPackagesById()?id='Nuget.Package.Name'' returned an unexpected status code '404 Not Found'.
Errors in packages.config projects
Unable to find version '0.1.0.41' of package 'Nuget.Package.Name'.
C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache: Package 'Nuget.Package.Name.0.1.0.41' is not found on source 'C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache'.
C:\Windows\system32\config\systemprofile\.nuget\packages\: Package 'Nuget.Package.Name.0.1.0.41' is not found on source 'C:\Windows\system32\config\systemprofile\.nuget\packages\'.
http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc: Unable to load the service index for source http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc.
Cannot prompt for input in non-interactive mode.
http://nuget.org: The V2 feed at 'http://www.nuget.org/FindPackagesById()?id='Nuget.Package.Name'' returned an unexpected status code '404 Not Found'.
NuGet Config files used:
C:\Windows\system32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config
Feeds used:
C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache
C:\Windows\system32\config\systemprofile\.nuget\packages\
http://teamcity-nuget-server.cloudapp.azure.com/httpAuth/app/nuget/v1/FeedService.svc
http://nuget.org
I tried several other configurations, i.e using %teamcity.nuget.feed.server% and even %teamcity.nuget.feed.auth.server%. I also tried to remove build feature with NuGet credentials (since documentation says it doesn't need to authenticate with self hosted NuGet service). Tried to remove http://nuget.org source as well. Nothing works.
There are several issues in TeamCity: one with NuGet version 3.3.0 and higher: https://youtrack.jetbrains.com/issue/TW-44438 and the second with local agent: https://youtrack.jetbrains.com/issue/TW-44479. Please check the tickets linked. You can try to use earlier NuGet version or try the workaround.
I think your problem is that you are using NuGet 3 but the package source is pointing to the v2 Feed.
Update your "NuGet.config" (C:\Windows\system32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config) with the following package sources:
<packageSources>
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
</packageSources>

recently i installed liferay in eclipse but i had faced unresolve error

I installed liferay into eclipse and when I deploy project, it fires following error.
D:\liferay-plugind-sdk\build-common-plugin.xml:427: D:\bundles\tomcat-6.0.26\webapps\ROOT\WEB-INF\lib does not exist.
What could be the issue here and also provide solution?
Please check build.username.properties or build.properties file in plugin-sdk in which you provide server paths where plugins should be deployed.
In your case that path value is not pointing to correct server path and hence you are getting error message.
app.server.type=tomcat
app.server.dir=**THISWOULDBEPATHOFTOMCAT**
app.server.deploy.dir=${app.server.dir}\\webapps
app.server.lib.global.dir=${app.server.dir}\\lib\\ext
app.server.portal.dir=${app.server.dir}\\webapps\\ROOT
Provide app.server.dir property with actual tomcat path, then you will not get such error.