IntelliJ new project – maven archetype list empty
Maven’s JRE is running out of memory. Under Build → Build Tools → Maven → Importing, set VM options for importer to -Xmx1024m (the default vaule -Xmx512m is too low).
Maven’s JRE is running out of memory. Under Build → Build Tools → Maven → Importing, set VM options for importer to -Xmx1024m (the default vaule -Xmx512m is too low).
The parameter name has to be prefixed with spring-boot. as in -Dspring-boot.run.jvmArgument The Spring Boot documentation provided me the solution as I’m running Spring Boot 2.0.3 mvn spring-boot:run -Dspring-boot.run.jvmArguments=”-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005″
Try mvn -help -l,–log-file <arg> Log file to where all build output will go. mvn <your parameters> –log-file log.txt
By default, Maven doesn’t bundle dependencies in the JAR file it builds, and you’re not providing them on the classpath when you’re trying to execute your JAR file at the command-line. This is why the Java VM can’t find the library class files when trying to execute your code. You could manually specify the libraries … Read more
use ${session.executionRootDirectory} For the record, ${session.executionRootDirectory} works for me in pom files in Maven 3.0.3. That property will be the directory you’re running in, so run the parent project and each module can get the path to that root directory. I put the plugin configuration that uses this property in the parent pom so that … Read more
The <uniqueVersion> configuration applied to artifacts that were deployed (via mvn deploy) to a Maven repository such as Nexus. To remove these from Nexus, you can easily create an automated job to purge the SNAPSHOT repository every day. It can be configured to retain a certain number of shapshots or keep them for a certain … Read more
I’m curious to know what the real problem with tying a module’s version to the parent version is, if any? Or is this a case of a general warning when any expression, regardless of whether it’s project.parent.version, is used for the version element. Well, that would be easy to test. Because I was curious, I … Read more
You can specify the finalName property to give the jar the name you want, and specify that appendAssemblyId should be false to avoid the jar-with-dependencies suffix. The configuration below will output a jar called test.jar <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <configuration> <finalName>test</finalName> <archive> <manifest> <mainClass>com.myapp.Main</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <appendAssemblyId>false</appendAssemblyId> </configuration> </plugin>
Ok, you’ve declared junit dependency for test classes only (those that are in src/test/java but you’re trying to use it in main classes (those that are in src/main/java). Either do not use it in main classes, or remove <scope>test</scope>.
Just to have an answer with the complete solution to help the visitors: All you need to do is add the junit dependency to pom.xml. Don’t forget the <scope>test</scope> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency>