Add custom files to a Visual Studio 2013 Multi Project Template - visual-studio-templates

I am trying to create a Multi Project Template and that is working good. The projects are created. For this solution there are some 3:e party dll's that the projects shall add a reference to, and some other .txt and .xml files.
I have my .vstemplate like this:
<VSTemplate Version="3.0.0" Type="ProjectGroup" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name>AppFabric Services Solution Template</Name>
<Description></Description>
<ProjectType>CSharp</ProjectType>
<Icon></Icon>
<RequiredFrameworkVersion>4.5</RequiredFrameworkVersion>
</TemplateData>
<TemplateContent>
<ProjectCollection>
<SolutionFolder Name="Domain">
<ProjectTemplateLink ProjectName="$safeprojectname$.Domain.Application">
Domain\Application\Application.vstemplate
</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$safeprojectname$.Domain.Core">
Domain\Core\Core.vstemplate
</ProjectTemplateLink>
</SolutionFolder>
</ProjectCollection>
</TemplateContent>
</VSTemplate>
And want something like this
<VSTemplate Version="3.0.0" Type="ProjectGroup" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name>AppFabric Services Solution Template</Name>
<Description></Description>
<ProjectType>CSharp</ProjectType>
<Icon></Icon>
<RequiredFrameworkVersion>4.5</RequiredFrameworkVersion>
</TemplateData>
<TemplateContent>
<ProjectCollection>
<SolutionFolder Name="_Library">
<ProjectItem>THIRDPARTY.dll</ProjectItem>
</SolutionFolder>
<SolutionFolder Name="_SolutionItems">
<ProjectItem>README.TXT</ProjectItem>
</SolutionFolder>
<SolutionFolder Name="Domain">
<ProjectTemplateLink ProjectName="$safeprojectname$.Domain.Application">
Domain\Application\Application.vstemplate
</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$safeprojectname$.Domain.Core">
Domain\Core\Core.vstemplate
</ProjectTemplateLink>
</SolutionFolder>
</ProjectCollection>
</TemplateContent>
</VSTemplate>
Is there anyway to do what I want?
Regards
/Magnus

Related

Show Outlook Add-in without compose or read pane active

Hello I am testing an outlook Add-in in visual studio, but I do not know that to change in the manifest to show the add-in enable all the time, without opening an email or read an email.
Currently is only enable or showing when an email is open, the rest of the time is disable
And I want to be enable all the time
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>65ba8340-b53e-4941-a7bb-153669eea7fb</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>[Provider name]</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="OutlookWebAddIn1" />
<Description DefaultValue="OutlookWebAddIn1"/>
<IconUrl DefaultValue="~remoteAppUrl/Images/icon64.png"/>
<SupportUrl DefaultValue="http://www.contoso.com" />
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>AppDomain1</AppDomain>
<AppDomain>AppDomain2</AppDomain>
<AppDomain>AppDomain3</AppDomain>
</AppDomains>
<!--End Basic Settings. -->
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="~remoteAppUrl/MessageRead.html"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="functionFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl" />
</Action>
</Control>
<!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="~remoteAppUrl/Images/icon16.png"/>
<bt:Image id="icon32" DefaultValue="~remoteAppUrl/Images/icon32.png"/>
<bt:Image id="icon80" DefaultValue="~remoteAppUrl/Images/icon80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="functionFile" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html"/>
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="~remoteAppUrl/MessageRead.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="My Add-in Group"/>
<bt:String id="customTabLabel" DefaultValue="My Add-in Tab"/>
<bt:String id="paneReadButtonLabel" DefaultValue="Display all properties"/>
<bt:String id="paneReadSuperTipTitle" DefaultValue="Get all properties"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane displaying all available properties. This is an example of a button that opens a task pane."/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
Outlook web add-ins work under the context of a particular item - composed or read. You can't run the add-in for the mailbox by default. It is not possible at least now. I'd suggest posting a feature request to Microsoft 365 Developer Platform Tech Community.
As a workaround, you may consider developing a COM based add-in where you can enable ribbon buttons independently of the selected item(s). See Walkthrough: Create your first VSTO Add-in for Outlook for more information.

My own solution template Visual Studio 2017 xamarin

I try to create my own solution template to xamarin forms so I have 3 project: Main, droid and iOS. I'm created 3 template: project -> export template and after this I have 3 folders and one main vstemplate file.
And vstemplate file:
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
<Name>SimpleCoreTest</Name>
<Description>My template</Description>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>
</ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>SimpleCoreTest</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon>__TemplateIcon.ico</Icon>
</TemplateData>
<TemplateContent>
<ProjectCollection>
<ProjectTemplateLink ProjectName="$projectname$">
SimpleCoreTest\SimpleCoreTest.vstemplate
</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$projectname$.Droid">
SimpleCoreTest.Droid\SimpleCoreTest.vstemplate
</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$projectname$.iOS">
SimpleCoreTest.iOS\SimpleCoreTest.vstemplate
</ProjectTemplateLink>
</ProjectCollection>
</TemplateContent>
</VSTemplate>
This is droid project but iOS and main look similar:
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
<Name>SimpleCoreTest.Droid</Name>
<Description>simple core droid</Description>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>
</ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>SimpleCoreTestDroid</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon>__TemplateIcon.ico</Icon>
</TemplateData>
<TemplateContent>
<Project TargetFileName="SimpleCoreTest.Droid.csproj" File="SimpleCoreTest.Droid.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="AndroidBug5497WorkaroundForXamarinAndroid.cs">AndroidBug549 7WorkaroundForXamarinAndroid.cs</ProjectItem>
<Folder Name="Assets" TargetFolderName="Assets">
<ProjectItem ReplaceParameters="true" TargetFileName="AboutAssets.txt">AboutAssets.txt</ProjectItem>
</Folder>
<Folder Name="Helpers" TargetFolderName="Helpers">
<ProjectItem ReplaceParameters="true" TargetFileName="Settings.cs">Settings.cs</ProjectItem>
</Folder>
<ProjectItem ReplaceParameters="true" TargetFileName="MainActivity.cs">MainActivity.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="packages.config">packages.config</ProjectItem>
<Folder Name="Properties" TargetFolderName="Properties">
<ProjectItem ReplaceParameters="true" TargetFileName="AndroidManifest.xml">AndroidManifest.xml</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
</Folder>
<Folder Name="Resources" TargetFolderName="Resources">
<ProjectItem ReplaceParameters="true" TargetFileName="AboutResources.txt">AboutResources.txt</ProjectItem>
<Folder Name="drawable" TargetFolderName="drawable">
<ProjectItem ReplaceParameters="false" TargetFileName="hamburger.png">hamburger.png</ProjectItem>
<ProjectItem ReplaceParameters="false" TargetFileName="icon.png">icon.png</ProjectItem>
<ProjectItem ReplaceParameters="false" TargetFileName="login_simple_image.png">login_simple_image.png</ProjectItem >
<ProjectItem ReplaceParameters="false" TargetFileName="schedule.png">schedule.png</ProjectItem>
</Folder>
<Folder Name="drawable-hdpi" TargetFolderName="drawable-hdpi">
<ProjectItem ReplaceParameters="false" TargetFileName="icon.png">icon.png</ProjectItem>
</Folder>
<Folder Name="drawable-xhdpi" TargetFolderName="drawable-xhdpi">
<ProjectItem ReplaceParameters="false" TargetFileName="icon.png">icon.png</ProjectItem>
</Folder>
<Folder Name="drawable-xxhdpi" TargetFolderName="drawable-xxhdpi">
<ProjectItem ReplaceParameters="false" TargetFileName="icon.png">icon.png</ProjectItem>
</Folder>
<Folder Name="layout" TargetFolderName="layout">
<ProjectItem ReplaceParameters="false" TargetFileName="Tabbar.axml">Tabbar.axml</ProjectItem>
<ProjectItem ReplaceParameters="false" TargetFileName="Toolbar.axml">Toolbar.axml</ProjectItem>
</Folder>
<ProjectItem ReplaceParameters="true" TargetFileName="Resource.designer.cs">Resource.designer.cs</ProjectItem>
<Folder Name="values" TargetFolderName="values">
<ProjectItem ReplaceParameters="true" TargetFileName="styles.xml">styles.xml</ProjectItem>
</Folder>
</Folder>
</Project>
</TemplateContent>
</VSTemplate>
I put this 3 folders and main vsTemplate file to one zip and put this in template folder to VS. I see this template when i'd like to create new project but after set the name and click ok i get info creating new project successful done. And nothing else. I don't have this project in my folders with solutions. Do you know what i'm doing wrong?
=====EDIT=====
Ok, I know what i was doing wrong. In my vstemplate file i have to write:
Type="ProjectGroup"
Not
Type="Project"

java.lang.IllegalStateException after adding rich faces libraries to pom.xml

I am trying to run my first JSF application using RichFaces. Unfortunately the error below is being thrown. There is no bean added to my project.
Also, there's no tags added yet. Just trying to run simple empty xhtml
file. What is the problem?
I'm using Eclipse Luna 4.4.2, GlassFish 4, and OSX.
2016-02-03T00:34:59.661+0200|Warning: StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalStateException
at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:712)
at com.sun.faces.context.FacesContextImpl.getAttributes(FacesContextImpl.java:239)
at org.richfaces.context.ExtendedPartialViewContext.setInstance(ExtendedPartialViewContext.java:55)
at org.richfaces.context.ExtendedPartialViewContext.release(ExtendedPartialViewContext.java:64)
at org.richfaces.context.ExtendedPartialViewContextImpl.release(ExtendedPartialViewContextImpl.java:424)
at com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:598)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:677)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:745)
My pom.xml:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
<version>4.3.7.Final</version>
</dependency>
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
<version>4.3.7.Final</version>
</dependency>
Also web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:web="http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee">
<display-name>Archetype Created Web Application</display-name>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
</web-app>
According to this JSF 2.2.7 is the culprit. You can either downgrade JSF to 2.2.6 or update Richfaces to 4.5.

JSF & Richfaces/Primefaces - Maven - Netbeans 8.0.1 - Glassfish 4.1

Have a very similar problem with this: Richfaces in netbeans with maven, i.e. there is a problem when the JSF project is deployed in GlassFish 4.1
I tried creating a JSF project with:
a) Maven and javax.faces-war-archetype ver 2.2 and
b) as a NetBeans project
I tried using:
a) Primefaces 5 --> works
b) Richfaces 4.3 --> doesn't work
Project runs fine with Glassfish 4.0 and WildFly 8.1
The exception I get in netbeans is :
Warning: StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalStateException
at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:705)
at com.sun.faces.context.FacesContextImpl.getAttributes(FacesContextImpl.java:237)
at org.richfaces.context.ExtendedPartialViewContext.setInstance(ExtendedPartialViewContext.java:55)
at org.richfaces.context.ExtendedPartialViewContext.release(ExtendedPartialViewContext.java:64)
at org.richfaces.context.ExtendedPartialViewContextImpl.release(ExtendedPartialViewContextImpl.java:424)
at com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:591)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:665)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
I will describe the steps I followed when building the project the Maven way:
These are the steps that I followed to create: A JSF project, with NetBeans 8.0.1 , GlassFish 4.1 that uses RichFaces. Project is created using maven archetype javax.faces-war-archetype ver 2.2.
New Project->Maven->Project from Archetype
Search for javax thus only option in available arhcetypes is javax.faces-war-archetype - ver2.2. Choose it.
Put location name etc. I choose as name: test_richfaces_with_archetype
Click Finish
The pom.xml of the created project is:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mydomain.myproject</groupId>
<artifactId>test_richfaces_with_archetype</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>${project.artifactId}</name>
<description>A simple project with war packaging that depends on JSF 2.2 and
javaee 6, in that order.</description>
<url>http://jsf-spec.java.net/</url>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<spec.snapshot.version>2.2</spec.snapshot.version>
</properties>
<dependencies>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>${spec.snapshot.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net-maven2-SNAPSHOT-repository</id>
<name>Java.net SNAPSHOT-Repository for Maven</name>
<url>https://maven.java.net/content/repositories/snapshots/</url>
<layout>default</layout>
</repository>
<repository>
<id>java.net-maven2-repository</id>
<name>Java.net Repository for Maven</name>
<url>https://maven.java.net/content/repositories/releases/</url>
<layout>default</layout>
</repository>
</repositories>
</project>
Right click project and choose properties
Go to Frameworks: you will see that the JSF 2.2 library is already chosen for you
Go to components tab and check Richfaces
Click OK and NeatBeans will download the Richfaces libraries and put them to your local maven repository
The pom.xml has changed and is now like:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.com.mydomain.myproject</groupId>
<artifactId>test_richfaces_with_archetype</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>${project.artifactId}</name>
<description>A simple project with war packaging that depends on JSF 2.2 and
javaee 6, in that order.</description>
<url>http://jsf-spec.java.net/</url>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<spec.snapshot.version>2.2</spec.snapshot.version>
</properties>
<dependencies>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>${spec.snapshot.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
<version>4.3.3.Final</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
<version>4.3.3.Final</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net-maven2-SNAPSHOT-repository</id>
<name>Java.net SNAPSHOT-Repository for Maven</name>
<url>https://maven.java.net/content/repositories/snapshots/</url>
<layout>default</layout>
</repository>
<repository>
<id>java.net-maven2-repository</id>
<name>Java.net Repository for Maven</name>
<url>https://maven.java.net/content/repositories/releases/</url>
<layout>default</layout>
</repository>
<repository>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<id>RichFaces-maven-lib</id>
<layout>default</layout>
<name>Repository for library RichFaces-maven-lib</name>
</repository>
</repositories>
</project>
The welcomeRichfaces.xhtml is
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>Richfaces Welcome Page</title>
</h:head>
<h:body>
<rich:panel header="Welcome to Richfaces">
RichFaces is an advanced UI component framework for easily integrating Ajax capabilities into business applications using JSF. Check out the links below to lear more about using RichFaces in your application.
<ul>
<li><h:outputLink value="http://richfaces.org" >Richfaces Project Home Page</h:outputLink></li>
<li><h:outputLink value="http://showcase.richfaces.org" >Richfaces Showcase</h:outputLink></li>
<li><h:outputLink value="https://community.jboss.org/en/richfaces?view=discussions" >User Forum</h:outputLink></li>
<li><h:outputLink value="http://www.jboss.org/richfaces/docs" >Richfaces documentation...</h:outputLink>
<ul>
<li><h:outputLink value="http://docs.jboss.org/richfaces/latest_4_X/Developer_Guide/en-US/html_single/" >Development Guide</h:outputLink></li>
<li><h:outputLink value="http://docs.jboss.org/richfaces/latest_4_X/Component_Reference/en-US/html/" >Component Reference</h:outputLink></li>
<li><h:outputLink value="http://docs.jboss.org/richfaces/latest_4_X/vdldoc/" >Tag Library Docs</h:outputLink></li>
</ul>
</li>
</ul>
</rich:panel>
</h:body>
</html>
And the web.xml
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>mojarra-regression-test</display-name>
<description>A simple regression test to make it easier to get your bug fixed. The only reason we need a web.xml is to set the PROJECT_STAGE to Develoment. If you have a web.xml, then you need to map the FacesServlet.</description>
<context-param>
<description>
Tell the runtime where we are in the project development
lifecycle. Valid values are:
Development, UnitTest, SystemTest, or Production.
The runtime will display helpful hints to correct common mistakes
when the value is Development.
</description>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>faces/main.xhtml</welcome-file>
</welcome-file-list>
</web-app>
Also if you click the plus sign in the dependencies node you will see:
javaee-api-6.0.jar
javax.faces-api-2.2.jar
richfaces-components-ui-4.3.3.Final.jar
cssparser-0.9.5.jar
guava-13.0.1.jar
richfaces-components-api-4.3.3.Final.jar
richfaces-core-api-4.3.3.Final.jar
sac-1.3.jar
Note: in my case there was an error with the guava library when I was trying to compile (clean-build) the project. I deleted the google folder that I already had in my repository , did a clean-build again. Everything was re-downloaded and the project compiled.
Right click project , go to properties , choose run and choose GlassFish from the server list. Click OK.
Right click project and choose Run. At this stage you browser will open at: http://localhost:8080/test_richfaces_with_archetype. You will something like First name: Duke Last name: Java and a submit button.
Go to main.xhtml alter it in order to add an action to the command button element: <h:commandButton value="submit" action="welcomeRichfaces"/>. Save the main.xhtml.
Reload the page and click the button. The welcome richfaces xhtml should be displayed in your browser.
END
I had the same problem with Wildfly 8.2. My solution was to "downgrade" jsf.
Please, see Upgrad to Wildfly 8.2 with error

Ivy - adding a maven repository fails

I want to add activity-engine dependency through ivy like this:
ivy.xml:
<dependency org="org.activiti" name="activiti-engine" rev="5.14" />
ivysettings:
<ivysettings>
<settings defaultResolver="default" />
<resolvers>
<chain name="default">
<ibiblio name="internal" usepoms="true" m2compatible="true"
root="http://10.8.202.21:8081/archiva/repository/internal" />
<!-- Public Maven repository -->
<ibiblio name="public" m2compatible="true" />
<ibiblio name="workflow" m2compatible="true" root="https://maven.alfresco.com/nexus/content/groups/public/"/>
</chain>
</resolvers>
When I resolved the dependency in Eclipse, I got the error:
unresolved dependency: org.activiti#activiti-engine;5.14: not found
Can anyone help me ?
Should be working. If you want to force the resolver you could add a modules directive:
<modules>
<module organisation="org.activiti" resolver="public"/>
</modules>
I find the use of modules very powerful as it enables me explicitly control which repository is used to to retrieve dependencies. The following is an example:
<ivysettings>
<settings defaultResolver="3rdparty" />
<resolvers>
<chain name="3rdparty">
<ibiblio name="central" m2compatible="true" />
<ibiblio name="repo1" m2compatible="true" root="http://.."/>
<ibiblio name="repo2" m2compatible="true" root="http://.."/>
..
</chain>
<ibiblio name="internal" m2compatible="true" root="http://my.repo.com/.."/>
</resolvers>
<modules>
<module organisation="my.org" resolver="internal"/>
</modules>
</ivysettings>

Resources