I'm figuring out how to develop a JAX-RS service with WSO2 Developer Studio (2.1.0) and deploy it to a WSO2 AS 5.0.1 server.
When I create a new CAR project containing a JAX-RS Service project I can start and deploy the CAR on the running WSO2 AS 5.0.1 service right from Eclipse.
However, as I install the m2eclipse plugin and include maven-dependencies in the project these dependencies are not on the classpath of the deployed WAR module.
What is the recommended way to handle maven dependencies in a JAX-RS project?
Right now the maven dependencies you declare in pom.xml are not added to the classpath of the Developer Studio projects and vice-versa. We will fix this issue in a future Developer Studio version.
As a workaround for the moment, you need to add the dependencies to the project classpath manually.
Related
I'm running a "Build a Visual Studio project or solution using MSBuild" on Jenkins for several projects to generate nuget packages.
The MSBuild used is the latest Visual Studio Build Tools
The version of the .NET Core sdk used in the project is 1.0.4
Company.Core.csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
</Project>
However while executing a build the used SDK version is always the latest SDK installed on the machine (2.x).
C:\Program Files\dotnet\sdk\2.1.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5):
error NETSDK1064: Package Microsoft.CSharp, version 4.0.1 was not found.
It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
[C:\Workspaces\Company.Core\Company.Core.csproj]
After uninstalling the 2.1.400 SDK version i get the error:
C:\ProgramFiles\dotnet\sdk\1.1.10\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(308,5):
error : Assets file 'C:\Workspaces\Company.Core\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Workspaces\Company.Core\Company.Core.csproj]
The installation used to support .net Core 1.0.4 was .NET Core 1.0.4 & 1.1.1 SDK 1.0.1 using the instructions:
Windows Server Hosting
If you are looking to host stand-alone apps on
Windows Servers, the ASP.NET Core Module for IIS can be installed
separately on servers without installing .NET Core runtime. You can
download the Windows (Server Hosting) installer and run the following
command from an Administrator command prompt:
DotNetCore.1.0.4_1.1.1-WindowsHosting.exe OPT_INSTALL_LTS_REDIST=0
OPT_INSTALL_FTS_REDIST=0
I also added RuntimeFrameworkVersion in the csproj that had no effect.
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>^
global.json also gets ignored
{
"sdk": {
"version": "1.0.4"
}
}
It looks like you can specify the sdk version in a global.json file:
{
"sdk": {
"version": "1.0.4"
}
}
Source:
https://markheath.net/post/switching-between-netcore-sdk-versions
I think there's some confusion here. .NET Core consists of two almost separate components: the SDK and the Runtime. The SDK is used to build your code and the runtime is needed to run it.
They are versioned differently. For example, the latest SDK is 2.1.403, while the latest Runtime is 2.1.5.
A recent version of SDK can target any version of the runtime released before it. So, a 2.1.403 SDK can build applications that need 2.0 or 1.0 to run.
You can force a particular SDK to be used, by using the global.json file. You need to specify a version of the SDK that is already installed. dotnet new globaljson will generate something that you can edit the versions in. But you shouldn't need to do that. You can just use the latest SDK and ask it to build for an older runtime by setting the TargetFramework as you do.
If you do a dotnet restore, does the error NETSDK1064: Package Microsoft.CSharp, version 4.0.1 was not found. still stick around? The second error, Assets file 'C:\Workspaces\Company.Core\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. backs this up. The project.assets.json is created by dotnet restore. Could you simply be missing that step?
we are using NuGet command line( https://www.nuget.org/downloads ) to create deploy-able NuGet package (.nupkg).
The project is in .net framework 4.6, project is build using MSBuild & created the deployment package using Nuget.exe . We need to deploy the NuGet package(.nupkg) in IIS(Internet Information Services) on windows platform.
Tried to web-search but didn't worked out. need open-source tools or mannual automated step by step process to do so.
please guide.
What do you mean by "deploy the NuGet package(.nupkg) in IIS(Internet Information Services)"?
Anyway nupkg is just an archive so you can simply get dlls out of it with and use them where you need.
Packaging a build use Nuget Packager in VSTS and i get the error:
[error]'Newtonsoft.Json' already has a dependency defined for 'NETStandard.Library'.
Most of the hints that solves this involves updating nuget, but since I am building on Team Services I can't really do this.
It seems that the nuget used by nuget packager is not the latest. After testing locally with latest nuget.exe everything worked so I added a new powershell release step. This solution is appropriate for VSTS, for TFS where you have access to the server I recommend upgrading nuget.exe on the server itself:
This script downloads nuget.exe into the artifacts directory (and outputs the path to the nuget.exe so you can see where it is put.).
I then altered the Nuget Packager build step to use the freshly downloaded nuget.exe.
Had the same issue today.
Using your own build agent
If you are using your own build agents (rather than the hosted agent) you can manually update the version of NuGet to the latest version. In my case, this has resolved my problems.
e.g. C:\agent\externals\nuget\nuget.exe
Using the hosted agent
It's a bit messy but you could just upload the latest nuget.exe into the repo and set the NuGet Packager to use this.
To anyone getting this in 2018, Microsoft have created a new version of the NuGet task that fixes this issue. No need for powershell install steps.
Change the NuGet task version in your build step version to 2.*
This caused some breaking changes for me, that I resolved with the following advanced settings
Nuget Restore
Nuget Pack
Nuget push
I would like to know if is there any way to debug a Grails 3 application with a single-click from eclipse (mars) IDE, in the same way as a Java (or Java Spring Boot) web application that it is possible to do a "debug on server".
It is possible to "run as" "gradle build" ... but not a "debug as" "gradle build".
Is there any way for doing this or is there any intention to have this functionality in the future?
Any eclipse plugin?
Thanks in advance.
I finally found working solution. My eclipse IDE version:
Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600
Installation details -> Installed software:
Buildship: Eclipse Plug-ins for Gradle 1.0.11.v20160328-1759 org.eclipse.buildship.feature.group Eclipse Buildship
Eclipse IDE for Java EE Developers 4.5.2.20160218-0600 epp.package.jee null
Groovy Compiler 2.4 Feature 2.9.2.xx-201603042130-e45 org.codehaus.groovy24.feature.feature.group Codehaus.org
Groovy-Eclipse Feature 2.9.2.xx-201603042130-e45 org.codehaus.groovy.eclipse.feature.feature.group Codehaus.org
Spring IDE Core (required) 3.7.3.201602250914-RELEASE org.springframework.ide.eclipse.feature.feature.group Spring IDE Developers
After importing project to workspace add new debug Spring Boot App configuration:
Enjoy debugging.
I am setting up a new project (java backend + dart frontend).
On client side I plan to use stagexl as a gaming framework. On server side I will use Google App Engine. (Plus Gradle and GIT ...)
Yesterday I followed http://blog.dartwatch.com/2013/01/integrating-dart-into-eclipse-and-your.html for installing the dart eclipse plugin but I get lots of error popups all the time.
Problems occurred when invoking code from plug-in: "org.eclipse.ui.views.properties.tabbed".
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at org.eclipse.ui.views.properties.ResourcePropertySource.<init>(ResourcePropertySource.java:134)
at com.google.dart.tools.ui.DartElementAdapterFactory.getProperties(DartElementAdapterFactory.java:204)
at com.google.dart.tools.ui.DartElementAdapterFactory.getAdapter(DartElementAdapterFactory.java:140)
at org.eclipse.core.internal.adapter.AdapterFactoryProxy.getAdapter(AdapterFactoryProxy.java:80)
...
My setup:
Dart Editor for Eclipse 0.4.5.r21094 com.google.dart.eclipse.feature.feature.group dartlang.org
Eclipse EGit 2.3.1.201302201838-r org.eclipse.egit.feature.group Eclipse EGit
Eclipse IDE for Java EE Developers 1.5.2.20130211-1820 epp.package.jee null
Google App Engine Java SDK 1.7.7 1.7.7 com.google.appengine.eclipse.sdkbundle.feature.feature.group Google, Inc.
Google Plugin for Eclipse 4.2 3.2.2.v201303261859-rel-r42 com.google.gdt.eclipse.suite.e42.feature.feature.group Google, Inc.
Gradle IDE 3.2.0.201301240803-M2 org.springsource.ide.eclipse.gradle.feature.feature.group SpringSource, a division of VMware, Inc.
A beer or two to the one who helps me!
Instead of installing Eclipse and then installing the Dart plugin, I recommend you to download the Dart Editor from their page
That is an already fully functional Eclipse instance prepared for dart usage.
From there, you can create a new project and they will give you some pre-defined templates.