I am trying to learn maven in a small native project using eclipse. I converted an existing project to the standard maven directory configuration, and it built; Now I'm trying to get maven to create a jar for the application. Below is the pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion> 4.0.0 </modelVersion> <groupId> com.rc </groupId> <artifactId> SpaceCheck </artifactId> <version> 0.9.1-SNAPSHOT </version> <name> SpaceCheck </name> <packaging> jar </packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <build> <plugins> <plugin> <groupId> org.apache.maven.plugins </groupId> <artifactId>maven-jar-plugin </artifactId> <version> 2.3.2 </version> <configuration> <includes>**/src/*</includes> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass>spacecheck.SpaceCheck</mainClass> </manifest> </archive> </configuration> </plugin> </plugins> </build> </project>
I did not use include clauses to include; as far as I can tell, the example I pointed out told me to do to fix this problem. This is not true.
When I try to build, I get:
[ERROR] Failed to complete the target org.apache.maven.plugins: maven-jar-plugin: 2.3.2: jar (default-jar) on project SpaceCheck: cannot parse the configuration mojo org.apache.maven.plugins: maven-jar -plugin: 2.3.2: jar for the parameter includes: Unable to assign the configuration record "includes" with the value '* / src /' of type java.lang.String for the property of type java.lang.String [] β [Help 1]
The βHelp 1β link points me to a tutorial that I followed to get this feedback.
The problem with the tutorial is that it doesnβt explain how everything works - it gives you an example and expects you to extract common work from it. There is nothing wrong with the examples, but they rarely match exactly what needs to be done.
I am sure that many people can tell me what happened, and I would appreciate it. But it would be even better if they could also tell me where this is explained, and not just where there is an example that does something like this. An explanation, to be complete, would explain which element to add, only in where the XML is located, and what different options are for what happens there.
java eclipse jar maven
arcy
source share