I have an example project created using -
mvn archetype:generate -DarchetypeGroupId=com.vaadin \
-DarchetypeArtifactId=vaadin-archetype-application \
-DarchetypeVersion=7.2.5 -Dpackaging=war \
-DgroupId=com.Example -DartifactId=ProjectA
During the maven compilation, the compile-theme goal tries to compile the subversion directory.
[INFO] --- vaadin-maven-plugin:7.2.5:compile-theme (default) # UIEngine ---
[INFO] Updating theme VAADIN/themes/bootstrap
[INFO] Theme "VAADIN/themes/bootstrap" compiled
[INFO] Updating theme VAADIN/themes/.svn
[ERROR] /home/gpn/workspace/ProjectA/src/main/webapp/VAADIN/themes/.svn/styles.scss could not be read!
[INFO] Theme "VAADIN/themes/.svn" compiled
Is there any method to tell maven to ignore .svn directory or to compile only certain themes?
Thanks and Best Regards,
GPN
Add <theme>bootstrap</theme> to the configuration of the vaadin-maven-plugin in your pom.xml. After that the plugin will only compile the given theme.
If you can use a newer version of SVN (1.7 or later) to checkout your source then there will no longer be any .svn directories in the working copy.
Related
The path to my project is /project/
My build file structure is src/main/package/subpackage/Class.java
My test file structure is src/test/package/subpackage/Test.java
I would like my compiled code to be in bin/main/package/subpackage/Class.class
Compiled test code in bin/test/package/subpackage/Test.class
My pom.xml has the entry
<build>
<sourceDirectory>${project.basedir}/src/main</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test</testSourceDirectory>
<outputDirectory>${project.basedir}/bin/main</outputDirectory>
<testOutputDirectory>${project.basedir}/bin/test</testOutputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
</build>
Running mvn clean install causes the following.
Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project Hello-Maven: Error loading property file '/project/': /project (Is a directory) -> [Help 1]
...
[Help 1] https://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Now I've tried the link, but it suggest that it's an issue with the plugins.
However, commenting this block out, and running mvn clean install again returns an almost empty jar file inside /project/target/Hello-Maven-1.0-SNAPSHOT.jar, containing only the pom and the manifest. Additionally, there aren't any plugins, only dependencies: junit and javafx.
EDIT: I realize that plugins specifically for running maven but finding information over why the error happens for "install" is difficult at best.
When I run the jar in the GCE, it had the following error:
java -jar mySimple.jar --project=myProjcet
Aug 13, 2015 1:22:26 AM com.google.cloud.dataflow.sdk.runners.DataflowPipelineRunner detectClassPathResourcesToStage
SEVERE: Unable to convert url (rsrc:./) to file.
Aug 13, 2015 1:22:26 AM simple.SimpleV1 main
SEVERE: Failed to construct instance from factory method com.google.cloud.dataflow.sdk.runners.BlockingDataflowPipelineRunner#fromOptions
I am working on Eclipse(window). And it succeeded to run dataflow through the eclipse. Packaging the project to Runable jar file and uploaded to the GCE (ubuntu). And i had errors when i run the jar file on the GCE(ubuntu).
the runner is BlockingDataflowPipelineRunner(batch mode).
there are other options in source code.
the follow is manifest.
Manifest-Version: 1.0
Rsrc-Class-Path: ./ httpclient-4.3.6.jar httpcore-4.3.3.jar commons-lo
gging-1.1.3.jar commons-codec-1.6.jar mybatis-3.2.8.jar mysql-connect
or-java-5.1.34.jar ibatis2-common-2.1.7.597.jar ibatis2-dao-2.1.7.597
.jar ibatis2-sqlmap-2.1.7.597.jar geoip-api-1.2.14.jar google-api-cli
ent-java6-1.20.0.jar google-api-client-1.20.0.jar google-oauth-client
-1.20.0.jar guava-jdk5-13.0.jar google-oauth-client-java6-1.20.0.jar
google-oauth-client-jetty-1.20.0.jar jetty-6.1.26.jar jetty-util-6.1.
26.jar servlet-api-2.5-20081211.jar google-http-client-jackson2-1.20.
0.jar google-http-client-1.20.0.jar jsr305-1.3.9.jar joda-time-2.8.1.
jar slf4j-api-1.7.7.jar slf4j-jdk14-1.7.7.jar commons-csv-1.1.jar aws
-java-sdk-sqs-1.10.5.1.jar aws-java-sdk-core-1.10.5.1.jar google-clou
d-dataflow-java-sdk-all-0.4.150710.jar google-api-services-dataflow-v
1b3-rev4-1.19.1.jar google-cloud-dataflow-java-proto-library-all-0.4.
150612.jar protobuf-java-2.5.0.jar google-api-services-bigquery-v2-re
v187-1.19.1.jar google-api-services-compute-v1-rev46-1.19.1.jar googl
e-api-services-pubsub-v1beta2-rev1-1.19.1.jar google-api-services-sto
rage-v1-rev25-1.19.1.jar google-api-services-datastore-protobuf-v1bet
a2-rev1-2.1.2.jar google-http-client-protobuf-1.15.0-rc.jar google-ht
tp-client-jackson-1.15.0-rc.jar jackson-annotations-2.4.2.jar jackson
-databind-2.4.2.jar avro-1.7.7.jar jackson-core-asl-1.9.13.jar jackso
n-mapper-asl-1.9.13.jar paranamer-2.3.jar snappy-java-1.0.5.jar commo
ns-compress-1.9.jar jetty-server-9.2.10.v20150310.jar javax.servlet-a
pi-3.1.0.jar jetty-http-9.2.10.v20150310.jar jetty-io-9.2.10.v2015031
0.jar jetty-jmx-9.2.10.v20150310.jar jetty-util-9.2.10.v20150310.jar
jackson-core-2.6.0.jar
Class-Path: .
Rsrc-Main-Class: simple.SimpleV1
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
When exporting a Runnable JAR file using Eclipse, there are three ways to package your project:
Extract required libraries into generated JAR
Package required libraries into generated JAR
Copy required libraries into a sub-folder next to the generated JAR
All 3 options, have the same usage pattern when executing, e.g.
java -jar myrunnable.jar --myCommandLineOption1=...
Currently, only option 1 is compatible with how the Dataflow SDK for Java is able to detect resources to stage because it is dependent on them being file URIs from a URLClassLoader.
For an explanation of how the Runnable Jars are created and more specific details of why this was problematic, read further below.
An alternative solution to using the Runnable Jars, is to execute your project using mvn exec.
Option 1
This creates a jar which copies all the class files & resources in each individual jar into a single jar. This allows for a manifest where the entire classpath is composed of file based URIs:
Manifest-Version: 1.0
Main-Class: com.google.cloud.dataflow.starter.StarterPipeline
Class-Path: .
Option 2
This creates a jar file with additional jars embedded within it. It uses a custom main entry point (org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader) which knows how to read the custom manifest entries (Rsrc-Class-Path & Rsrc-Main-Class) and creates a classloader with non file based URIs. Since the Dataflow SDK for Java currently only knows how to handle file based resources and doesn't know how to interpret the rsrc:... URIs, you get the exception that your seeing.
Manifest-Version: 1.0
Rsrc-Class-Path: ./ httpclient-4.3.6.jar ...
Class-Path: .
Rsrc-Main-Class: simple.SimpleV1
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
Option 3
This creates a jar file which contains your project resources and then creates a folder along side the runnable jar containing all your projects dependent jars. This allows for a more complex standard manifest listing all your project dependencies.
Manifest-Version: 1.0
Main-Class: com.google.cloud.dataflow.starter.StarterPipeline
Class-Path: . runnable_lib/google-cloud-dataflow-java-sdk-all-manual_build.jar ...
The Class-Path manifest is not returned part of the URLClassLoader and hence these classes are not discoverable. Furthermore, those jars are only meant to be loaded by classes from that jar which can lead to a jar loading hierarchy. More details are available here: http://docs.oracle.com/javase/7/docs/technotes/tools/findingclasses.html
Vanilla neo4j 2.2.0 install on a Ubuntu 14.04 system via their repository.
The instructions given on the neo4j-spatial website don't work. Does anyone have something that works no-questions-asked?
Is there some binary repository I can just apt-get install neo4j-spatial and not deal with this mess?
Thanks!
$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Neo4j - Spatial Components
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.neo4j:neo4j-cypher-compiler-2.2
Reason: Error getting POM for 'org.neo4j:neo4j-cypher-compiler-2.2' from the repository: Unable to read local copy of metadata: Cannot read metadata from '/home/ubuntu/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.2/2.2-SNAPSHOT/maven-metadata-oss.sonatype.org.xml': end tag name </body> must match start tag name <hr> from line 5 (position: TEXT seen ...</center>\r\n</body>... #6:8)
org.neo4j:neo4j-cypher-compiler-2.2:pom:2.2-SNAPSHOT
for project org.neo4j:neo4j-cypher-compiler-2.2
The Neo4j-Spatial Project was updated and released for Neo4j 2.2
The readme was also updated with the new binary download links.
Is there a configuration option, command line parameter, or a property that would stop Grails compilation from being cute and showing the growing trail of dots for operations that take time? It does so by sending "\r" to console and printing the previous line with another dot appended. It looks ok but still a little flashy when the compilation runs in console but it looks ugly in automated builds (see below). I wonder if there is a way to tell it not to print the progress indication. Thank you!
[exec] [INFO] | Resolving plugin JAR dependencies
[exec] [INFO] | Resolving plugin JAR dependencies.
[exec] [INFO] | Resolving plugin JAR dependencies..
[exec] [INFO] | Resolving plugin JAR dependencies...
[exec] [INFO] | Resolving plugin JAR dependencies....
Grails does offer a switch on the console/command line to remove the dots from the output (and a few other fancy things). It's called --plain-output and it can be used as such:
grails prod war --plain-output
Our release engineering is dictating that we cannot use SBT. We have to use ANT.
We need a proper list of jars that are required to compile a PlayFramework application. We are using Play 2.3.4 and (i think!) Scala 2.10 --- this was what got downloaded from activator-1.2.3.
Any thoughts on how to figure out minimum essential set of jars?
Right now, there is an issue with Controller class and iteratees... (i imagine these are in some scala jars)
Questions:
what do the jar numbering scheme on jars in user's ivy cache have two sets of numbers - for eg, play-java-2.3.4-2.10. Does this mean it's Play framework rev 2.3.4 compiled with scala 2.10 ?
is there a minimum list?
tl;dr activator stage and then grab the jars from target/universal/stage/lib.
Play Framework offers stage task that can prepare your application to be run in place:
This cleans and compiles your application, retrieves the required
dependencies and copies them to the target/universal/stage directory.
It also creates a bin/<start> script where <start> is the project’s
name. The script runs the Play server on Unix style systems and there
is also a corresponding bat file for Windows.
After you've executed the stage task, you grab the jars from target/universal/stage and you should be fine to go offline or...cough, cough...ant.
[jars-needed-play] $ stage
[info] Packaging /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/jars-needed-play_2.11-1.0-SNAPSHOT-sources.jar ...
[info] Done packaging.
[info] Updating {file:/Users/jacek/sandbox/jars-needed-play/}root...
[info] Wrote /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/jars-needed-play_2.11-1.0-SNAPSHOT.pom
[info] Resolving jline#jline;2.11 ...
[info] Done updating.
[info] Main Scala API documentation to /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/api...
[info] Compiling 5 Scala sources and 1 Java source to /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/classes...
[info] Packaging /Users/jacek/sandbox/jars-needed-play/target/jars-needed-play-1.0-SNAPSHOT-assets.jar ...
[info] Done packaging.
model contains 17 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/jars-needed-play_2.11-1.0-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] Packaging /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/jars-needed-play_2.11-1.0-SNAPSHOT.jar ...
[info] Done packaging.
[success] Total time: 4 s, completed Oct 1, 2014 9:09:29 AM
[jars-needed-play] $ eval "ls target/universal/stage/lib" !
ch.qos.logback.logback-classic-1.1.1.jar
ch.qos.logback.logback-core-1.1.1.jar
...
xerces.xercesImpl-2.11.0.jar
xml-apis.xml-apis-1.4.01.jar
[info] ans: Int = 0