Compiling Bootstrap 5 sass in Vaadin 8 project fails - sass
I would like to use the Bootstrap 5 sass utilities in my Vaadin 8 project (to help facilitate using flexbox layouts, responsive layouts, and writing custom css). However, when I include the Bootstrap scss files I get a generic compilation error when importing the Bootstrap _functions.scss:
Compiling theme "VAADIN/themes/mytheme" failed (com.vaadin:vaadin-maven-
plugin:8.14.3:compile-theme:default:generate-resources)
In the details it just says that the com.vaadin.sass.SassCompiler "failed with status 1".
When I remove the code from _functions.scss and add it back bit by bit, it seems to be dying on the #each line of a mixin definition. I am assuming this is because the sass compiler is old? So my questions are:
Are there logs or something where I can see the actual error that occurred when compiling the scss?
How can I update the sass compiler in my Vaadin 8 project?
Has anyone else successfully compiled the bootstrap sass in their Vaadin 8 project, and if so, how?
Thank you in advance.
UPDATE:
I commented out the compile-theme line like so:
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<configuration>
<theme>mytheme</theme>
</configuration>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<!-- 2022-10-13 Commenting out compile-theme and using sass-maven-plugin to compile modern sass instead -->
<!-- <goal>compile-theme</goal> -->
</goals>
</execution>
</executions>
</plugin>
And added the sass-maven-plugin like so:
<plugin>
<groupId>nl.geodienstencentrum.maven</groupId>
<artifactId>sass-maven-plugin</artifactId>
<version>3.7.2</version>
<configuration>
<resources>
<resource>
<source>
<directory>${basedir}/src/main/webapp/VAADIN/themes/mytheme/scss</directory>
<includes>
<include>*.scss</include>
</includes>
</source>
<relativeOutputDirectory>..</relativeOutputDirectory>
<destination>${basedir}/src/main/webapp/VAADIN/themes/mytheme</destination>
</resource>
</resources>
</configuration>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>update-stylesheets</goal>
</goals>
</execution>
</executions>
</plugin>
I had to copy the valo source code into my themes folder (since the Vaadin sass compiler was pulling it from the jar) and also the Bootstrap 5 scss code to my themes folder. Now my scss appears to compile (Yay!) BUT every time I change the scss code it seems to recompile three times and sometimes even goes into an infinite loop! (as seen in the Eclipse Console->Maven Console):
2022-10-13, 9:21:24 p.m. EDT: [WARN] The artifact xml-apis:xml-apis:jar:2.0.2 has been relocated to xml-apis:xml-apis:jar:1.0.b2
2022-10-13, 9:21:24 p.m. EDT: [WARN] The POM for com.amazon.paapi:paapi5-java-sdk:jar:1.0.0 is missing, no dependency information available
2022-10-13, 9:21:24 p.m. EDT: [INFO] Resolving P/newsys.orm: com.librarybound:newsys.orm:0.0.1-SNAPSHOT with classifier to /newsys.orm/target/classes
2022-10-13, 9:21:24 p.m. EDT: [INFO] Resolving P/cxfwebservices: com.librarybound:cxfwebservices:0.0.1-SNAPSHOT with classifier to /cxfwebservices/target/classes
2022-10-13, 9:21:24 p.m. EDT: [INFO] Updating theme VAADIN/themes/mytheme
2022-10-13, 9:21:26 p.m. EDT: [INFO] Widgetsets found from classpath:
2022-10-13, 9:21:26 p.m. EDT: [INFO] org.tepi.imageviewer.WidgetSet in jar:file:C:/Users/Susan/.m2/repository/org/vaadin/addons/imageviewer/0.6.0.v8/imageviewer-0.6.0.v8.jar!/
2022-10-13, 9:21:26 p.m. EDT: [INFO] Addon styles found from classpath:
2022-10-13, 9:21:26 p.m. EDT: [INFO]
2022-10-13, 9:21:26 p.m. EDT: [INFO] Search took 38ms
2022-10-13, 9:21:26 p.m. EDT: [INFO] Theme "VAADIN/themes/mytheme" updated
2022-10-13, 9:21:26 p.m. EDT: [INFO] Checked 0 files for C:\dev\lbi\dev\git\newsys\web\src\main\sass
2022-10-13, 9:21:26 p.m. EDT: [INFO] Checked 1 filtered (**/*.css) files for C:\dev\lbi\dev\git\newsys\web\target\web-1.0-SNAPSHOT\css
2022-10-13, 9:21:26 p.m. EDT: [INFO] Compiling Sass templates
2022-10-13, 9:21:26 p.m. EDT: [INFO] Queueing Sass template for compile: C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme/scss => C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme
2022-10-13, 9:21:55 p.m. EDT: [INFO] >> C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme/scss/styles.scss => C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme/styles.css
2022-10-13, 9:21:55 p.m. EDT: [INFO] Using 'UTF-8' encoding to copy filtered resources.
2022-10-13, 9:21:55 p.m. EDT: [INFO] Copying 0 resource
2022-10-13, 9:21:55 p.m. EDT: [INFO] Using 'UTF-8' encoding to copy filtered resources.
2022-10-13, 9:21:55 p.m. EDT: [INFO] skip non existing resourceDirectory C:\dev\lbi\dev\git\newsys\web\src\test\resources
2022-10-13, 9:21:55 p.m. EDT: [INFO] Updating theme VAADIN/themes/mytheme
2022-10-13, 9:21:57 p.m. EDT: [INFO] Widgetsets found from classpath:
2022-10-13, 9:21:57 p.m. EDT: [INFO] org.tepi.imageviewer.WidgetSet in jar:file:C:/Users/Susan/.m2/repository/org/vaadin/addons/imageviewer/0.6.0.v8/imageviewer-0.6.0.v8.jar!/
2022-10-13, 9:21:57 p.m. EDT: [INFO] Addon styles found from classpath:
2022-10-13, 9:21:57 p.m. EDT: [INFO]
2022-10-13, 9:21:57 p.m. EDT: [INFO] Search took 46ms
2022-10-13, 9:21:58 p.m. EDT: [INFO] Theme "VAADIN/themes/mytheme" updated
2022-10-13, 9:21:58 p.m. EDT: [WARN] GWT plugin is configured to detect modules, but none were found.
2022-10-13, 9:21:58 p.m. EDT: [INFO] No widgetsets found - generating AppWidgetset if necessary.
2022-10-13, 9:21:58 p.m. EDT: [INFO] Updating widgetset AppWidgetset
2022-10-13, 9:21:58 p.m. EDT: [INFO] Adding resource directory to command classpath: C:\dev\lbi\dev\git\newsys\web\src\main\resources
2022-10-13, 9:21:58 p.m. EDT: [INFO] Adding resource directory to command classpath: C:\dev\lbi\dev\git\newsys\web\target\generated-resources\gwt
2022-10-13, 9:21:58 p.m. EDT: [INFO] Using com.vaadin:vaadin-client version 8.14.3
2022-10-13, 9:21:58 p.m. EDT: [INFO] Using com.vaadin:vaadin-client-compiler version 8.14.3
2022-10-13, 9:21:59 p.m. EDT: [INFO] Widgetsets found from classpath:
2022-10-13, 9:21:59 p.m. EDT: [INFO] org.tepi.imageviewer.WidgetSet in jar:file:C:/Users/Susan/.m2/repository/org/vaadin/addons/imageviewer/0.6.0.v8/imageviewer-0.6.0.v8.jar!/
2022-10-13, 9:21:59 p.m. EDT: [INFO] com.vaadin.DefaultWidgetSet in jar:file:C:/Users/Susan/.m2/repository/com/vaadin/vaadin-client/8.14.3/vaadin-client-8.14.3.jar!/
2022-10-13, 9:21:59 p.m. EDT: [INFO] Addon styles found from classpath:
2022-10-13, 9:21:59 p.m. EDT: [INFO]
2022-10-13, 9:21:59 p.m. EDT: [INFO] Search took 30ms
2022-10-13, 9:21:59 p.m. EDT: [INFO] Checked 0 files for C:\dev\lbi\dev\git\newsys\web\src\main\sass
2022-10-13, 9:21:59 p.m. EDT: [INFO] Checked 1 filtered (**/*.css) files for C:\dev\lbi\dev\git\newsys\web\target\web-1.0-SNAPSHOT\css
2022-10-13, 9:21:59 p.m. EDT: [INFO] Compiling Sass templates
2022-10-13, 9:21:59 p.m. EDT: [INFO] Queueing Sass template for compile: C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme/scss => C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme
2022-10-13, 9:22:31 p.m. EDT: [INFO] >> C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme/scss/styles.scss => C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme/styles.css
2022-10-13, 9:22:31 p.m. EDT: [INFO] Using 'UTF-8' encoding to copy filtered resources.
2022-10-13, 9:22:31 p.m. EDT: [INFO] Copying 1 resource
2022-10-13, 9:22:31 p.m. EDT: [INFO] Copying 1 resource
2022-10-13, 9:22:31 p.m. EDT: [INFO] auto discovered modules [AppWidgetset]
2022-10-13, 9:22:31 p.m. EDT: [INFO] Using com.vaadin:vaadin-client version 8.14.3
2022-10-13, 9:22:31 p.m. EDT: [INFO] Using com.vaadin:vaadin-client-compiler version 8.14.3
2022-10-13, 9:22:31 p.m. EDT: [INFO] AppWidgetset is up to date. GWT compilation skipped
2022-10-13, 9:22:31 p.m. EDT: [INFO] Using 'UTF-8' encoding to copy filtered resources.
2022-10-13, 9:22:31 p.m. EDT: [INFO] skip non existing resourceDirectory C:\dev\lbi\dev\git\newsys\web\src\test\resources
2022-10-13, 9:22:31 p.m. EDT: [INFO] Updating theme VAADIN/themes/mytheme
2022-10-13, 9:22:33 p.m. EDT: [INFO] Widgetsets found from classpath:
2022-10-13, 9:22:33 p.m. EDT: [INFO] org.tepi.imageviewer.WidgetSet in jar:file:C:/Users/Susan/.m2/repository/org/vaadin/addons/imageviewer/0.6.0.v8/imageviewer-0.6.0.v8.jar!/
2022-10-13, 9:22:33 p.m. EDT: [INFO] Addon styles found from classpath:
2022-10-13, 9:22:33 p.m. EDT: [INFO]
2022-10-13, 9:22:33 p.m. EDT: [INFO] Search took 42ms
2022-10-13, 9:22:33 p.m. EDT: [INFO] Theme "VAADIN/themes/mytheme" updated
2022-10-13, 9:22:33 p.m. EDT: [WARN] GWT plugin is configured to detect modules, but none were found.
2022-10-13, 9:22:33 p.m. EDT: [INFO] No widgetsets found - generating AppWidgetset if necessary.
2022-10-13, 9:22:33 p.m. EDT: [INFO] Updating widgetset AppWidgetset
2022-10-13, 9:22:33 p.m. EDT: [INFO] Adding resource directory to command classpath: C:\dev\lbi\dev\git\newsys\web\src\main\resources
2022-10-13, 9:22:33 p.m. EDT: [INFO] Adding resource directory to command classpath: C:\dev\lbi\dev\git\newsys\web\target\generated-resources\gwt
2022-10-13, 9:22:33 p.m. EDT: [INFO] Using com.vaadin:vaadin-client version 8.14.3
2022-10-13, 9:22:33 p.m. EDT: [INFO] Using com.vaadin:vaadin-client-compiler version 8.14.3
2022-10-13, 9:22:34 p.m. EDT: [INFO] Widgetsets found from classpath:
2022-10-13, 9:22:34 p.m. EDT: [INFO] org.tepi.imageviewer.WidgetSet in jar:file:C:/Users/Susan/.m2/repository/org/vaadin/addons/imageviewer/0.6.0.v8/imageviewer-0.6.0.v8.jar!/
2022-10-13, 9:22:34 p.m. EDT: [INFO] com.vaadin.DefaultWidgetSet in jar:file:C:/Users/Susan/.m2/repository/com/vaadin/vaadin-client/8.14.3/vaadin-client-8.14.3.jar!/
2022-10-13, 9:22:34 p.m. EDT: [INFO] Addon styles found from classpath:
2022-10-13, 9:22:34 p.m. EDT: [INFO]
2022-10-13, 9:22:34 p.m. EDT: [INFO] Search took 40ms
2022-10-13, 9:22:34 p.m. EDT: [INFO] Checked 0 files for C:\dev\lbi\dev\git\newsys\web\src\main\sass
2022-10-13, 9:22:34 p.m. EDT: [INFO] Checked 1 filtered (**/*.css) files for C:\dev\lbi\dev\git\newsys\web\target\web-1.0-SNAPSHOT\css
2022-10-13, 9:22:34 p.m. EDT: [INFO] Compiling Sass templates
2022-10-13, 9:22:34 p.m. EDT: [INFO] Queueing Sass template for compile: C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme/scss => C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme
2022-10-13, 9:23:07 p.m. EDT: [INFO] >> C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme/scss/styles.scss => C:/dev/lbi/dev/git/newsys/web/src/main/webapp/VAADIN/themes/mytheme/styles.css
2022-10-13, 9:23:07 p.m. EDT: [INFO] Using 'UTF-8' encoding to copy filtered resources.
2022-10-13, 9:23:07 p.m. EDT: [INFO] Copying 1 resource
2022-10-13, 9:23:07 p.m. EDT: [INFO] Copying 1 resource
2022-10-13, 9:23:07 p.m. EDT: [INFO] auto discovered modules [AppWidgetset]
2022-10-13, 9:23:07 p.m. EDT: [INFO] Using com.vaadin:vaadin-client version 8.14.3
2022-10-13, 9:23:07 p.m. EDT: [INFO] Using com.vaadin:vaadin-client-compiler version 8.14.3
2022-10-13, 9:23:07 p.m. EDT: [INFO] AppWidgetset is up to date. GWT compilation skipped
2022-10-13, 9:23:07 p.m. EDT: [INFO] Using 'UTF-8' encoding to copy filtered resources.
2022-10-13, 9:23:07 p.m. EDT: [INFO] skip non existing resourceDirectory C:\dev\lbi\dev\git\newsys\web\src\test\resources
Am I doing this correctly? And how can I make it NOT recompile a million times every time I change something in the .scss files?
Vaadin's own compiler does not support SASS 3. I would recommend to add 3rd party maven plugin to compile SASS files. E.g. sass-maven-plugin could work.
<groupId>nl.geodienstencentrum.maven</groupId>
<artifactId>sass-maven-plugin</artifactId>
You can configure it to use your theme location in the project
<configuration>
<resources>
<resource>
<source>
<directory>${basedir}/_themepath_</directory>
<includes>
<include>*.scss</include>
</includes>
</source>
<relativeOutputDirectory>..</relativeOutputDirectory>
<destination>${basedir}/_themepath_</destination>
</resource>
</resources>
</configuration>
And just remove the compile-theme target in vaadin-plugin in your project.
Related
apache drill jdbc 1.1.0 build issue
I am building apache drill 1.1.0 from its source. I got the following error: [INFO] Reactor Summary: [INFO] [INFO] Apache Drill Root POM ............................. SUCCESS [8.234s] [INFO] Drill Protocol .................................... SUCCESS [6.639s] [INFO] Common (Logical Plan, Base expressions) ........... SUCCESS [50.152s] [INFO] contrib/Parent Pom ................................ SUCCESS [0.717s] [INFO] contrib/data/Parent Pom ........................... SUCCESS [0.365s] [INFO] contrib/data/tpch-sample-data ..................... SUCCESS [4.968s] [INFO] exec/Parent Pom ................................... SUCCESS [0.545s] [INFO] exec/Java Execution Engine ........................ FAILURE [38.896s] [INFO] exec/JDBC Driver using dependencies ............... SKIPPED [INFO] JDBC JAR with all dependencies .................... SKIPPED [INFO] contrib/mongo-storage-plugin ...................... SKIPPED [INFO] contrib/hbase-storage-plugin ...................... SKIPPED [INFO] contrib/hive-storage-plugin/Parent Pom ............ SKIPPED [INFO] contrib/hive-storage-plugin/hive-exec-shaded ...... SKIPPED [INFO] contrib/hive-storage-plugin/core .................. SKIPPED [INFO] Packaging and Distribution Assembly ............... SKIPPED [INFO] contrib/sqlline ................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:51.105s [INFO] Finished at: Mon Aug 10 07:24:19 IST 2015 [INFO] Final Memory: 67M/325M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project drill-java-exec: Could not resolve dependencies for project org.apache.drill.exec:drill-java-exec:jar:1.2.0-SNAPSHOT: Could not transfer artifact net.hydromatic:foodmart-data-json:jar:0.4 from/to central (http://repo.maven.apache.org/maven2): GET request of: net/hydromatic/foodmart-data-json/0.4/foodmart-data-json-0.4.jar from central failed: Premature end of Content-Length delimited message body (expected: 18196233; received: 17400 -> [Help 1] Edit: I checked the jar in .m2/repository. It contains foodmart-data-json-0.4.jar.lastUpdated, foodmart-data-json-0.4.pom.lastUpdated, foodmart-data-json-0.4.pom, foodmart-data-json-0.4.pom.sha1, _maven.repositories. When I opened foodmart-data-json-0.4.jar.lastUpdated in text editor. I found: #NOTE: This is an internal implementation file, its format can be changed without prior notice. #Mon Aug 10 08:44:18 IST 2015 http\://repository.mapr.com/nexus/content/repositories/drill/.lastUpdated=1439176430716 default-http\://repo.maven.apache.org/maven2/.lastUpdated=1439176458509 http\://conjars.org/repo/.lastUpdated=1439176430238 http\://repository.mapr.com/nexus/content/repositories/drill/.error= http\://repo.maven.apache.org/maven2/.error=Could not transfer artifact net.hydromatic\:foodmart-data-json\:jar\:0.4 from/to central (http\://repo.maven.apache.org/maven2)\: GET request of\: net/hydromatic/foodmart-data-json/0.4/foodmart-data-json-0.4.jar from central failed http\://conjars.org/repo/.error= How to resolve this error?
How to run Griffon application successfully?
I am new to Griffon 2 Framework. I am going to create new project using Griffon 2. I am going with http://griffon-framework.org/tutorials/1_getting_started.html reference. I am able to create new project successfully but when I run project using maven then project clean install Success but not run. I get following output on "mvn clean install" [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - com.griffon:sample:jar:0.1.0-SNAPSHOT [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting /home/piyush/Documents/GriffonExample/sample/target [INFO] [jacoco:prepare-agent {execution: prepare-agent}] [INFO] argLine set to -javaagent:/home/piyush/.m2/repository/org/jacoco/org.jacoco.agent/0.7.3.201502191951/org.jacoco.agent-0.7.3.201502191951-runtime.jar=destfile=/home/piyush/Documents/GriffonExample/sample/target/jacoco.exec [INFO] [build-helper:add-source {execution: add-source}] [INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/conf added. [INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/controllers added. [INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/models added. [INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/services added. [INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/views added. [INFO] Source directory: /home/piyush/Documents/GriffonExample/sample/griffon-app/lifecycle added. [INFO] [processor:process {execution: default}] [WARNING] No processors specified. Using default discovery mechanism. [INFO] [build-helper:add-resource {execution: add-resource}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Changes detected - recompiling the module! [INFO] Compiling 8 source files to /home/piyush/Documents/GriffonExample/sample/target/classes [INFO] [gplus:compile {execution: default}] [ERROR] Unable to determine Groovy version. Is Groovy declared as a dependency? [ERROR] Unable to determine Groovy version. Is Groovy declared as a dependency? [ERROR] Unable to determine Groovy version. Is Groovy declared as a dependency? [ERROR] Unable to determine Groovy version. Is Groovy declared as a dependency? [ERROR] Your Groovy version (null) doesn't support compilation. The minimum version of Groovy required is 1.5.0. Skipping compiling. [WARNING] DEPRECATED [tasks]: Use target instead [INFO] [antrun:run {execution: process-resources}] [WARNING] Parameter tasks is deprecated, use target instead [INFO] Executing tasks main: [copy] Copied 1 empty directory to 1 empty directory under /home/piyush/Documents/GriffonExample/sample/target/test-classes [copy] Copying 1 file to /home/piyush/Documents/GriffonExample/sample/target/classes [copy] Copying 8 files to /home/piyush/Documents/GriffonExample/sample/target/classes [copy] Copying 2 files to /home/piyush/Documents/GriffonExample/sample/target/classes [copy] Copying 1 file to /home/piyush/Documents/GriffonExample/sample/target/classes [INFO] Executed tasks [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /home/piyush/Documents/GriffonExample/sample/target/test-classes [INFO] [gplus:testCompile {execution: default}] [INFO] No sources specified for compilation. Skipping. [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: /home/piyush/Documents/GriffonExample/sample/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.gt.SignUpControllerTest [2015-07-04 15:19:12,515] [main] INFO org.codehaus.griffon.runtime.core.DefaultApplicationBootstrapper - Griffon 2.3.0 [2015-07-04 15:19:12,516] [main] INFO org.codehaus.griffon.runtime.core.DefaultApplicationBootstrapper - Build: 2015-06-02T23:14:51.218+0200 [2015-07-04 15:19:12,516] [main] INFO org.codehaus.griffon.runtime.core.DefaultApplicationBootstrapper - JVM: 1.7.0_80 (Oracle Corporation 24.80-b11) [2015-07-04 15:19:12,516] [main] INFO org.codehaus.griffon.runtime.core.DefaultApplicationBootstrapper - OS: Linux 3.13.0-37-generic amd64 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.236 sec - in com.gt.SignUpControllerTest Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: /home/piyush/Documents/GriffonExample/sample/target/sample-0.1.0-SNAPSHOT.jar [INFO] [site:attach-descriptor {execution: attach-descriptor}] [INFO] [checkstyle:checkstyle {execution: run-checkstyle}] [INFO] [INFO] There are 1 checkstyle errors. [WARNING] Unable to locate Source XRef to link to - DISABLED [INFO] [install:install {execution: default-install}] [INFO] Installing /home/piyush/Documents/GriffonExample/sample/target/sample-0.1.0-SNAPSHOT.jar to /home/piyush/.m2/repository/com/griffon/sample/0.1.0-SNAPSHOT/sample-0.1.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 18 seconds [INFO] Finished at: Sat Jul 04 15:19:19 IST 2015 [INFO] Final Memory: 74M/369M [INFO] ------------------------------------------------------------------------ but when I run project with "mvn Prun" I get following error. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Invalid task 'Prun': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Sat Jul 04 15:22:59 IST 2015 [INFO] Final Memory: 2M/74M [INFO] ------------------------------------------------------------------------ any one help me run Griffon 2 project?
Maven jar signer plugin
i have a problem with jar signer plugin. i'm in a legacy project that use an applet, all applet jar need to be signed. first of all, i have add jar-signer plugin in each applet project. but i need to add a common module into the applet, so i have add jarsigner plugin into this project. i have a task maven-dependency-plugin in my web project which copy signed jar into src/main/webapp/applet but when i compil the project i get this error: java.lang.SecurityException: class X signer information does not match signer information of other classes in the same package. I thinks its because in my common project(now signed) i have some Interface and in my webproject(not signed) i have the Implementation! I don't want to sign the webproject. so i decided to remove all jar-signer of all project and only add jar-signer plugin into web-project like this: <plugin> <artifactId>maven-jarsigner-plugin</artifactId> <executions> <execution> <id>sign</id> <goals> <goal>sign</goal> </goals> </execution> </executions> <configuration> <archiveDirectory>${basedir}/src\main\webapp\applet</archiveDirectory> <includes> <include>**/*.jar</include> </includes> <excludes> <exclude>**/*.war</exclude> </excludes> <keystore>${basedir}/src/main/resources/mykeystore.jks</keystore> <alias>myalias</alias> <storepass>mypassword</storepass> <keypass>mypassword</keypass> </configuration> </plugin> in this directory : ${basedir}/src\main\webapp\applet i have 8 jars and plugin sign 9jars as we can see: [INFO] Webapp assembled in [5206 msecs] [INFO] Building war: d:\MarcoPolo\SVN\CASTOR_trunk\CTR_WEB\web\target\ctrweb-02.01.00.war [INFO] [jarsigner:sign {execution: sign}] [INFO] 9 archive(s) processed [INFO] [jar:jar {execution: create-classes}] [INFO] Building jar: d:\MarcoPolo\SVN\CASTOR_trunk\CTR_WEB\web\target\ctrweb-02.01.00-classes.jar [INFO] [install:install {execution: default-install}] [INFO] Installing d:\MarcoPolo\SVN\CASTOR_trunk\CTR_WEB\web\target\ctrweb-02.01.00.war to D:\Users\p [INFO] Installing d:\MarcoPolo\SVN\CASTOR_trunk\CTR_WEB\web\target\ctrweb-02.01.00-classes.jar to D: [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 5 seconds [INFO] Finished at: Thu Jul 17 11:38:19 CEST 2014 [INFO] Final Memory: 42M/142M [INFO] ------------------------------------------------------------------------ if i open ctrweb-02.01.00.war i can see that all are signed! but i have <exclude>**/*.war</exclude> i have try to do mvn jarsigner:sign [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Castor - Web war [INFO] task-segment: [jarsigner:sign] [INFO] ------------------------------------------------------------------------ [INFO] [jarsigner:sign {execution: default-cli}] [INFO] 8 archive(s) processed [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Thu Jul 17 11:48:52 CEST 2014 [INFO] Final Memory: 6M/15M [INFO] ------------------------------------------------------------------------ and only 8 jars are signed. i want to have only my jar that are in applet directory to be signed and not jar/war in other directory. does it possible? thanks
Answered in comments: i try to create two jar from my project with classifier, one signed and the other one not. And during compilation its always took the non-signed jar and for the copy its use the signed-jar, i think it should work – Mançaux Pierre-Alexandre Jul 17 '14 at 12:24 yes its work! i generate 2 jar, one without classifier and another one with classifier (signed), my jarsigner plugin use tag archive to sign only the jar with classifier signed and during compilation, jar without classifier is used, and the jar with the classifier is copy to the applet webapp directory. so i resolve all my problem! – Mançaux Pierre-Alexandre Jul 17 '14 at 14:14
why do i need thrift to build flume?
i have downloaded flume from "https://github.com/apache/flume/downloads"..but i am unable to build it..do i need to install thrift first in order to build flume??if so, what is the reson..i am getting following error when i run mvn compile - mohammad#ubuntu:~/apache-flume-b01a760$ mvn compile [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Flume [INFO] Flume Core [INFO] Flume Master Config Web Application [INFO] Flume Node Web [INFO] Flume Distribution Project [INFO] A log4j appender for Flume [INFO] Flume Hello World Plugin [INFO] Flume HBase Plugin [INFO] ------------------------------------------------------------------------ [INFO] Building Flume [INFO] task-segment: [compile] [INFO] ------------------------------------------------------------------------ [INFO] No goals needed for project - skipping [INFO] ------------------------------------------------------------------------ [INFO] Building Flume Core [INFO] task-segment: [compile] [INFO] ------------------------------------------------------------------------ [INFO] [antlr3:antlr {execution: default}] [INFO] ANTLR: Processing source directory /home/mohammad/apache-flume-b01a760/flume-core/src/main/antlr3 ANTLR Parser Generator Version 3.2 Sep 23, 2009 14:05:07 com/cloudera/flume/conf/FlumeDeploy.g com/cloudera/flume/shell/antlr/FlumeShell.g [INFO] [antrun:run {execution: generate-version-file}] [INFO] Executing tasks main: [copy] Copying 1 file to /home/mohammad/apache-flume-b01a760/flume-core/target/generated-sources/version/com/cloudera/flume [INFO] Executed tasks [INFO] [avro:idl-protocol {execution: default}] [INFO] [thrift:compile {execution: default}] [ERROR] thrift failed output: [ERROR] thrift failed error: /bin/sh: null/bin/thrift: not found [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] thrift did not exit cleanly. Review output for more information. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7 seconds [INFO] Finished at: Mon Jun 04 16:10:47 IST 2012 [INFO] Final Memory: 28M/243M [INFO] ------------------------------------------------------------------------
Flume has some code generation that utilizes thrift as a transport communications serialization mechanism. In the flume-core/pom.xml, you can see this: <plugin> <groupId>org.apache.thrift.tools</groupId> <artifactId>maven-thrift-plugin</artifactId> <version>0.1.10</version> <configuration> <thriftExecutable>${thrift.executable}</thriftExecutable> </configuration> <executions> <execution> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> </execution> </executions> </plugin> You need to install thrift, and then configure the location in the parent pom.xml: <properties> <!-- NB: The version of the thrift compiler must match that of the dependency on the jar file below. --> <thrift.executable>${env.THRIFT_HOME}/bin/thrift</thrift.executable> <!-- Set default encoding to UTF-8 to remove maven complaints --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!-- defaults for flaky test and focused test exclusions --> <test.exclude.pattern>$</test.exclude.pattern> <!-- junk pattern --> <test.include.pattern>**/Test*.java</test.include.pattern> </properties>
Using JRE 1.5, still maven says annotation not supported in -source 1.3
I am using JRE 1.5. Still when I try to compile my code it fails by saying to use JRE 1.5 instead of 1.3 C:\temp\SpringExample>mvn -e clean install + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building SpringExample [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory C:\temp\SpringExample\target [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 6 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 6 source files to C:\temp\SpringExample\target\classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure C:\temp\SpringExample\src\main\java\com\mkyong\stock\model\Stock.java:[45,9] annotations are not supported in -source 1.3 (try -source 1.5 to enable annotations) #Override [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.BuildFailureException: Compilation failure C:\temp\SpringExample\src\main\java\com\mkyong\stock\model\Stock.java:[45,9] annotations are not supported in -source 1.3 (try -source 1.5 to enable annotations) #Override at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure C:\temp\SpringExample\src\main\java\com\mkyong\stock\model\Stock.java:[45,9] annotations are not supported in -source 1.3 (try -source 1.5 to enable annotations) #Override at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516) at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Wed Dec 22 10:04:53 IST 2010 [INFO] Final Memory: 9M/16M [INFO] ------------------------------------------------------------------------ C:\temp\SpringExample>javac -version javac 1.5.0_08 javac: no source files
Do you have something similar to below to specify the java version to be used by the maven compiler plugin? <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build>
A shorter version <project> <properties> <maven.compiler.source>1.5</maven.compiler.source> <maven.compiler.target>1.5</maven.compiler.target> </properties> ....