How do I import Primefaces 6.0 source as maven project in Eclipse? - primefaces

I followed Building From Source https://github.com/primefaces/primefaces/wiki/Building-From-Source instructions. Building the SNAPSHOT version project from command works well.
However, importing it into eclipse using the Existing Maven Projects wizard gives me a lot of errors in the Problems view. I fixed the lifecycle mappings by setting all to ignore.
I realized the generated source code in the target/generated-sources/maven-jsf-plugin directory but it was not picked up by the m2e plugins as a source folder automatically. So I included it into the eclipse build path manually. But then again, many compile errors show up in the generated code.
Does anybody use eclipse as IDE for primefaces development? How do you setup the eclipse project to develop primefaces?

The eclipse project uses Java Compiler compliance level 1.5 derived from the pom.xml maven-compiler-plugin settings. Setting the Java Compiler compliance level to 1.6 solved the issue for me.

Related

Changes to *.cshtml files not get autodetected on dotnet core 3.0

Steps to reproduce a problem:
Download and install dotnet core 3.0
Create a new project: dotnet new webapp -n MyApp
Run app dotnet run
Navigate to http://localhost:5000/Privacy
Edit Privacy page MyApp\Pages\Privacy.cshtml
Refresh
The changes do not get picked up by the toolkit and old page is rendered.
Same flow for dotnet core 2.2 (freshly installed) results in an updated page.
Is there a flag, which needs to be set somewhere within config to get autodetect working for 3.0 or is this a bug?
Use the dotnet CLI command to watch run your project:
dotnet watch run
Optionally you can watch run without hot reload enabled:
dotnet watch run --no-hot-reload
Add this instruction to the project file [ProjectName].csproj:
<ItemGroup>
<!-- extends watching group to include *.cshtml and *.razor files -->
<Watch Include="**\*.cshtml;*.razor;*.js;*.css" Exclude="**\obj\**\*;bin\**\*" />
</ItemGroup>
For further information see Microsoft DotNet 5.0 Documentation.
While searching the root cause of that issue i came accross with that SO question. To resolve that issue you need to add Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation NuGet package to your project and modify your Startup.cs like below.
Inside ConfigureServices method of Startup.cs
For ASP.NET Core MVC:
IMvcBuilder mvc = services.AddControllersWithViews();
mvc.AddRazorRuntimeCompilation();
For ASP.NET Core Razor Pages:
IMvcBuilder mvc = services.AddRazorPages();
mvc.AddRazorRuntimeCompilation();
PS: Do not forget to use this feature 'dotnet-watch' for development environment only since it does not make sense for production environment for most cases.
Source: https://learn.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.0&tabs=visual-studio
2021 UPDATE (Better Solution): You do not need to execute AddRazorRuntimeCompilation method in Startup.cs. You can keep this feature running by adding a value to projects debug configuration.
Please add new Environment variable to Project Properties > Debug > Environment variables
Name: ASPNETCORE_HOSTINGSTARTUPASSEMBLIES
Value: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
I'm not entirely sure this is the same issue, but ASP.NET Core 2.2 introduced an In Process IIS hosting model. This provides a lot of performance benefits in a production environment, but basically negates one of ASP.NET Core's most useful development features: automatic updates. If you're using the In Process model in development, you'll need to build after code changes, just like with older ASP.NET MVC sites. You can switch the hosting model back to the Out of Process model (the old way) either by going to your project properties or editing your csproj. In properties, there's a dropdown now on the Debug tab, which corresponds to the <AspNetCoreHostingModel> tag in the csproj.
UPDATE
For what it's worth, I've actually seen this behavior to be somewhat random actually. Some changes for me seem to kick off an automatic build like they used to, while other changes don't show up unless I manually build. There doesn't seem to be a lot of rhyme or reason to which changes required what either. It's possible that the tooling for this isn't quite there yet, and a future update to Visual Studio may make the In Process model behave consistently like the Out of Process model did with code changes in development. All I know is that switching to Out of Process definitely resolves all issues with this, so it's related to the In Process model in some way.

setting correct scala version on scala ide

I'm trying to work on a project on scala IDE but I've having build problems on scala IDE.
On sbt the project builds fine. I used the eclipse sbt plugin and imported the project on scala IDE. There were build errors, which makes the ide close to useless.
One of the errors is Compiler plugin paradise_2.12.1-2.1.0.jar is cross-compiled with incompatible version for this project: 2.12.1 vs 2.12.2
I thought scala minor versions were compatible, though I see there is an exception for some experimental modules. Is the macro paradise plugin one of those exceptions?
How can I fix it? Can I tell scala IDE to use 2.12.1? Shouldn't the sbt eclipse plugin take care of that? Should I report a bug(to which project)?
The project on which I'm working defines scala version to be "2.12.1", but I'd rather not change it. I'm using scala ide version 4.6.1.
here's the settings to change the scala compiler
right click on your project -> choose "properties"
from the menu tree on the left select 'Scala compiler'
check "use project settings" if unchecked
select the appropriate Scala installation from the 'Scala Installation' drop down
close the project properties window
rebuild project
my personal peeve is that when I run the eclipse plugin command from sbt, it always resets the scala installation for my project to "
Latest 2.12 bundle (dynamic)" so I've gotten pretty use to manually resetting my scala compiler version (along with my build path source directories).
If you need to (re)set your scala library container you can also do this in the project properties window (via the "Java Build Path" -> Libraries section). You may need to do this if you don't have an explicit fixed 2.12.1 installation available as an option in the above drop down.

Compiling sqlite-winrt for using SQL in WinRT/WP app with SQLite

I'm trying to use the sqlite-winrt library at https://sqlwinrt.codeplex.com (cf. http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/05/30/sqlite-winrt-wrapper-for-windows-phone.aspx) because I need to access an SQLite database via SQL commands in a WinRT 8.1 and a WP8 app and this library seems the only available option.
Anyway, there is no binary release and if I try compiling the source I get several link errors for unresolved externals against the SQLite DLL. I posted an issue at codeplex but got no reply yet, so I was wondering if anyone had already managed to successfully compile this lib and how (or if you know of any viable alternative for RT8.1 and WP8). Here is what I did:
downloaded the latest source from the site.
downloaded and installed 2 VSIX from http://www.sqlite.org/download.html: sqlite-winrt81-3080002.vsix for RT 8.1 and sqlite-wp80-winrt-3080100.vsix for WP.
executed the powershell scripts in each subfolder of the source code solution, which are required to update the projects with newer releases of the SQLite for WinRT extension. The current versions of the scripts refer to SQLite for WinRT 8.1 (prerelease) which is the same I downloaded above.
opened the VS2013 solution and removed the RT project (I just need RT8.1 and WP, this was for WinRT 8.0).
5) built the solution, which failed with link errors.
If I see the RT8.1 project properties, I can confirm the reference to SQLite is under C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\SQLite.WinRT81\3.8.0.2.
Did anyone manage to use this lib? Thanks!
I also once had that problem. I fix it by editing the project file manually. At that time, the powershell script updating the wrong path. That's why I always failed when compiling my project. After I edit the project file using external text editor (I use sublime text), the projects are linked correctly.
You can try DatabasesCx. It is another SQLite Wrapper using Windows Runtime Component technology. It is freeware distributed as precompiled binary. You can find the details at http://www.almanacsoft.com/databasescx

Specified Gradle Installation (..) is not supported by this tooling API version (1.6, protocol version 4) [duplicate]

This question already has answers here:
Gradle build errors with Android Studio
(3 answers)
Closed 9 years ago.
I have just set up Android Studio 0.2.2 and updated my Android SDK to the latest version.
I have exported my Android project (android:minSdkVersion="8", android:targetSdkVersion="15") in Eclipse by 'Generate Gradle Build Files' without (visible) problems. And I can export/compile my app in Eclipse just fine, it also runs fine in the emulator.
However, in Android Studio, when trying to import my project, I am confronted with the above error message. "Gradle Home" is (IMO, correctly) displayed as "D:\Prog\Android-Studio\plugins\gradle".
Any idea how to make Android Studio feel more comfortable on my computer?..
I've encountered a similar problem where I can't import my project. There is at least one answer out there that may help; it requires the creation of a blank project in Android Studio and then copy files over from Eclipse. This ensures the creation by Android Studio of the necessary Gradle files, etc. Here's the link to the full answer: Gradle build errors with Android Studio
Look's like you should try to use the Gradle Wrapper rather than a local Gradle distribution. According to Gradle's website (http://www.gradle.org/docs/current/userguide/gradle_wrapper.html):
The wrapper is something you should check into version control. By distributing the wrapper with your project, anyone can work with it without needing to install Gradle beforehand. Even better, users of the build are guaranteed to use the version of Gradle that the build was designed to work with. Of course, this is also great for continuous integration servers (i.e. servers that regularly build your project) as it requires no configuration on the server.
You'll need to mimic the following structure in your project's directory:
simple/
gradlew
gradlew.bat
gradle/wrapper/
gradle-wrapper.jar
gradle-wrapper.properties
At that point, go to Settings (Windows) Preferences (Mac), click "Gradle" on the left hand side, choose "Use Gradle wrapper (recommended)". If that option isn't available, try restarting Android Studio or closing and reimporting your project. Checking this option should ensure that you always build with the correct Gradle distribution.

Nuget, Castle Windsor Client Profile vs Full Profile

I'm trying to use Castle Windsor with Log4Net facility. I've installed the packages through Nuget.
The requirement for this to work is to use Full profile Castle.LoggingFacility. Nuget referenced the Client Profile version.
How can I force Nuget to install the Full profile version?
I might be wrong but it sounds like the issue with the target framework setting on your project:
for Castle.Windsor to work it has to be set to .NET Framework 4 rather than to .NET Framework 4 Client Profile.
You can configure it by opening project properties, tab Application (in Visual studio) or just editing the project file.
If that's about the version of the package after all, then usually using NuGet you can append a flag install-package Castle.Windsor -version 2.5.3 to specify which one to install, but I couldn't find any options there when it comes to Castle.LoggingFacility.
I had the same problem earlier and I think you should check your packages.config file. There could be targetFramework="net40-client",
which points NUGet to the packages\Castle.LoggingFacility.3.2.0\lib\net40-client directory.
Simply change it to net40 and all's done.