Two different project and Base theme

I have two different UI project (Project A, Project B )
These two projects have two different Theme (Theme A, Theme B )

I want to be inherited from a common(Base) theme.

Would you advise me to do?

At the same time , these two projects are using the UI controls project. (Controls.jar)

Hey Umut,

That should definitely doable. Import the base theme’s main mixin in theme A and B.

I’d recommend you read up on imports and mixins over at http://sass-lang.com/guide.

Just be diligent with how you structure and maintain your themes.

Thank you Joacim,

But, I want to learn directory structure.
How should directory structure be?

Normally, Theme of web project would be (src/main/webapp/VAADIN/themes/BaseTheme) here.

But, Base proect is a .jar project, so directory structure have not webapp folder.

|____Controls
| |____pom.xml
| |____src
| | |____main
| | | |____resources
| | | |____java

|____UI A
| |____pom.xml
| |____src
| | |____main
| | | |____resources
| | | |____java
| | | |____webapp
| | | | |___META-INF
| | | | |___WEB-INF
| | | | |___VAADIN
| | | | | |___themes
| | | | | | |___MyTheme A (MyTheme A should inherited from a comman(Base) theme)

|____UI B
| |____pom.xml
| |____src
| | |____main
| | | |____resources
| | | |____webapp
| | | |____java
| | | | |___META-INF
| | | | |___WEB-INF
| | | | |___VAADIN
| | | | | |___themes
| | | | | | |___MyTheme B (MyTheme B should inherited from a comman(Base) theme)

Hi everybody,

Do you have any idea ?

Not sure how you’d access a theme from a JAR, or what requirements you’d need to place on the structure.

Perhaps this will prove useful:
https://vaadin.com/wiki/-/wiki/Main/Creating+a+reusable+Vaadin+theme+in+Eclipse/

The vaadin-themes JAR just has the structure /VAADIN/themes/… under the root of the JAR, and applications access the common themes from there.

In practice, to get it into a Maven JAR project, if I recall correctly, it should be enough to put the files under /src/main/resources/VAADIN/themes/mybasetheme/… in case of a project with packaging=jar, and …/webapp/… in case of a WAR project.

You can also customize what the Maven packaging plugins (jar and war plugins) do or even use the assembly plugin if the default layout is not ok for you, but easier to use the default locations.

Thank you Henri and Joacim,

/src/main/resources/VAADIN/themes/mybasetheme/…
This method was successful

But, This method has opened other problems

When the project is compiled each wants “mvn clean install” for root project

Do you have a suggestion for this problem?