Hi I am currently building vaadin project using maven but getting below error.
Unable to create project from archetype [com.vaadin:vaadin-archetype-application:LATEST -> ]
stack trace
org.apache.maven.archetype.exception.ArchetypeNotConfigured: Archetype com.vaadin:vaadin-archetype-application:7.1.13 is not configured
Property theme is missing.
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:142)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype(DefaultArchetypeGenerator.java:213)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:128)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:286)
at org.apache.maven.archetype.DefaultArchetype.generateProjectFromArchetype(DefaultArchetype.java:69)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.createArchetypeProjects0(ProjectConfigurationManager.java:761)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$4.call(ProjectConfigurationManager.java:710)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$4.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:89)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1305)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.createArchetypeProjects(ProjectConfigurationManager.java:708)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizard$5.doCreateMavenProjects(MavenProjectWizard.java:244)
at org.eclipse.m2e.core.ui.internal.wizards.AbstactCreateMavenProjectJob$1.doCreateMavenProjects(AbstactCreateMavenProjectJob.java:46)
at org.eclipse.m2e.core.ui.internal.wizards.AbstractCreateMavenProjectsOperation.run(AbstractCreateMavenProjectsOperation.java:74)
at org.eclipse.m2e.core.ui.internal.wizards.AbstactCreateMavenProjectJob.runInWorkspace(AbstactCreateMavenProjectJob.java:50)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
please help on this I am completely novice
Maybe try creating the project from command line. To do this follow this tutorial: https://vaadin.com/wiki/-/wiki/Main/Using+Vaadin+with+Maven
mvn archetype:generate \
-DarchetypeGroupId=com.vaadin \
-DarchetypeArtifactId=vaadin-archetype-clean \
-DarchetypeVersion=LATEST \
-DgroupId=your.company \
-DartifactId=project-name \
-Dversion=1.0 \
-Dpackaging=war
Related
I have a gradle project with 1 submodule, defined in the following file structure (+- refers to a directory):
+- <root>
build.gradle.kts
+- graph-commons
+- core
build.gradle.kts
The only submodule was included using the following kotlin script:
val graphCommons = project(File("./graph-commons/core"))
includeBuild(graphCommons)
When I execute ./gradlew clean assembly, I got the following error:
FAILURE: Build failed with an exception.
* Where:
Settings file '/home/peng/git/shapesafe/settings.gradle.kts' line: 2
* What went wrong:
Project with path './graph-commons/core' could not be found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 492ms
FAILURE: Build failed with an exception.
* Where:
Settings file '/home/peng/git/shapesafe/settings.gradle.kts' line: 2
* What went wrong:
Project with path './graph-commons/core' could not be found.
What went wrong? Why the valid path "./graph-commons/core" cannot be identified by gradle?
The project is uploaded and tested on github:
https://github.com/tribbloid/shapesafe/runs/4280805005?check_suite_focus=true
Gradle does not work this way. A project path refers to a gradle project path, not to a file path. See https://docs.gradle.org/current/userguide/multi_project_builds.html#multi_project_builds
Edit: As mentioned in the comments, the project(File) method that is available in the settings.gradle.kts is a special method allowing to receive a ProjectDescriptor whose directory points to the given file. The project must be present already e.g. by including it via include(String...) first.
I first thought you tried to use the DependencyHandler#project(Map) method in some way, which is the usual way to refer to project dependencies. Gradle separates between dependencies and multi-project setup. In the settings.gradle.kts you usually setup the project structure while you declare dependencies in each build.gradle.kts. When using includeBuild you merely depend on the build of another completely separate project. When you then want to declare a dependency to a project from that included build you usually use the project's artifact coordinates to do so. This way the build still works when removing the includeBuild declaration.
If you want to use composite builds see here for basic usage: https://docs.gradle.org/current/samples/sample_composite_builds_basics.html
You will have to coordinate the artifact publishing and corresponding dependencies to make it work like a normal multi-project. Something like this:
graph-commons
|build.gradle.kts -> group = "org.scala-lang"; version = "1.0";
|settings.gradle.kts -> include(":graph-commons-core")
|graph-commons-core
||build.gradle.kts
shapesafe
|settings.gradle.kts -> includeBuild("../graph-commons")
|core
||build.gradle.kts -> dependencies { implementation("org.scala-lang:graph-commons-core:1.0") }
Now I've got two jars: main-run.jar and my-starter.jar.
my-starter.jar is a simple custom spring boot starter, which contains some ApplicationRunner in it.
main-run.jar is a whole application but without dependency of my-starter, so I want to add the dependency of my-starter when i run main-run.jar, here is my folder tree:
my-folder
+-- main-run.jar
+-- lib/
+-- my-starter.jar
and I run java -cp lib/my-starter.jar -jar main-run.jar, and it just run the main application, other ApplicationRunner in my-starter.jar doesn't run.
So, is there any way to make it work? I know I can rebuild and repackage the main-run with the dependency of my-starter, but I have no right to rebuild it.
I think I find a solution, just run this :
java \
-cp <your main springboot jar>
-Dloader.path=<starter jar>
org.springframework.boot.loader.PropertiesLauncher
here's the link : https://mash213.wordpress.com/2017/01/05/hack-how-2-add-jars-2-springboot-classpath-with-jarlauncher/
my current problem is that I am trying to configure Jenkins with the built-in Sonar.
My structure in SVN is as following:
--/
--parent
--pom.xml ( modules are defined in this order
<module>../common</module>
<module>../model</module>
<module>../persistence</module>
<module>../services</module>
<module>../webservices-model</module>
<module>../webservices</module>
<module>../web</module>
<module>../fidb-client</module>
<module>../batch</module> )
--common ( every modul has its own pom.xml as well! )
--pom.xml
--model
--persistence
--services
--webservices-model
--webservices
--web
Now what I tried:
In Jenkins under source code management I specified the repository url as: `http://xyz/svn/parent/`
Local module directory: `./parent`
I did this for every module defined above.
Prepare SonarQube Scanner environment is checked
Root POM: `pom.xml`
Invoke top level Maven targets ( I did this for every modul as well )
-Dsonar.host.url=$SONAR_HOST_URL
-Dsonar.login=test
-Dsonar.password=test
-Dhttp.proxyHost=proxy.net
-Dhttp.proxyPort=8080
-Dhttp.nonProxyHosts=test.lan.at
-f ../parent/pom.xml clean install
However, I always get the following error when trying to build at the persistence modul ( common, modul and paret are working ), in Eclipse, however, it works without problems:
ERROR] Failed to execute goal on project mifid2-persistence: Could not resolve dependencies for project at.sitsolutions.mifid2:mifid2-persistence:jar:1.0.0-SNAPSHOT: The following artifacts could not be resolved: at.sitsolutions.mifid2:mifid2-fidb-client:jar:1.0.0-SNAPSHOT, com.oracle:ojdbc7:jar:12.1.0.2: Could not find artifact at.sitsolutions.mifid2:mifid2-fidb-client:jar:1.0.0-SNAPSHOT -> [Help 1]
Maybe, someone can tell me what I am doing wrong.
Thanks for your help
I keep two projects in each location:
Project A (C: \ GitRepository \ xxx \ yyy \ zzz \ ProjectA.sln
Project A packages (C: \ GitRepository \ xxx \ yyy \ zzz \ packages
Project B (C: \ GitRepository \ xxx \ yyy \ sss \ ProjectB.sln
Project B packages (C: \ GitRepository \ xxx \ yyy \ sss \ packages
Both projects have a common output (C: \ GitRepository \ xxx \ bin) - this is obligatory
When one team create project and add NuGet package to project (new package is downloaded by default). Then add this project to SolutionA. We get situation where AutoMapper in rev. eg. 20 in SolutionA and other rev. eg. 19 in SolutionB.
When compiling projects Jenkins MSBuild Build Project A gets the missing package rev. 20, Project B already has a package 19, but it needs newer version 20 . Error comes when read the correct version of the library.
Solutions:
One solution is to remove attributes from references specified version but you want to keep your shared libraries.
The team came up with a solution to make one such project. NuGetRepository and only through this project to add the library to the output. Other projects must host libraries builded from NuGetRepository.csproj have access through files, not project reference. We would like to keep one version in each project without conflicts.
Is solution 2 good?
In my jenkinsbuild I have a Maven(v3.1.0) project with a Fortify SCA plugin. I'm searching for the command to exclude a folder from the sca test and the place this command belongs. The Java project to test will be loaded from a GIT repository.
My commands(working):
(Build)
clean -Dfortify.sca.buildId=${JOB_NAME} sca:clean -Dmaven.test.skip=true install -Dfortify.sca.buildId=${JOB_NAME} sca:translate
(Post-Build)
-Dfortify.sca.Xmx=4G
-Dfortify.sca.Xms=2G
-Dfortify.sca.Xss=100M
-Dfortify.sca.PermGen=1G
-Dfortify.sca.64bit=true
-Dfortify.sca.verbose=true
-Dfortify.sca.debug=false
-Dfortify.sca.buildId=${JOB_NAME}
-Dfortify.sca.toplevel.artifactId=test
-Dfortify.sca.scan.failOnError=true
-Dfortify.sca.upload=false
-Dfortify.sca.upload.failOnError=true
-Dfortify.f360.url=${SSC_URL}
-Dfortify.f360.authToken=${SSC_AUTH_TOKEN}
-Dfortify.f360.projectName=${JOB_NAME}
-Dfortify.f360.projectVersion=current
sca:scan
Fortify Maven plugin (4.21) has a property to exclude files/folders from scan:
-Dcom.fortify.sca.exclude="fileA;fileB;fileC"
Or you can define Fortify properties in a file and import it:
-Dfortify.sca.properties.file=fortify.properties