How to apply maven build system (Was: How to use Debian packaged freehep instead of upstream provided freehep.jar)
On Wed, Feb 16, 2011 at 11:29:52PM +0100, Torsten Werner wrote:
> are you looking for 'mvn package'?
$ mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.2/maven-resources-plugin-2.2.pom
...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: resources. It requires a project with an existing pom.xml, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Thu Feb 17 09:04:14 GMT 2011
[INFO] Final Memory: 12M/26M
[INFO] ------------------------------------------------------------------------
Or should I apply the pom.xml file which was suggested in an other
mail in this thread? I simply tried:
$ mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building patristic
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/andreas/debian-maintain/todo/0_debian-med_todo/0phylogeny/patristic/maven/patristic-20100817/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 35 source files to /home/andreas/debian-maintain/todo/0_debian-med_todo/0phylogeny/patristic/maven/patristic-20100817/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/home/andreas/debian-maintain/todo/0_debian-med_todo/0phylogeny/patristic/maven/patristic-20100817/src/main/java/Patristic/PatristicTableModel.java:[48,3] annotations are not supported in -source 1.3
(use -source 5 or higher to enable annotations)
@Override
/home/andreas/debian-maintain/todo/0_debian-med_todo/0phylogeny/patristic/maven/patristic-20100817/src/main/java/Patristic/tree/Node.java:[20,18] generics are not supported in -source 1.3
(use -source 5 or higher to enable generics)
private Vector<Node> children=new Vector<Node>();
...
What does this mean?
Thanks for any help
Andreas.
--
http://fam-tille.de
--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110217164122.GF20776@an3as.eu">http://lists.debian.org/20110217164122.GF20776@an3as.eu
02-18-2011, 06:55 AM
Andreas Tille
How to apply maven build system (Was: How to use Debian packaged freehep instead of upstream provided freehep.jar)
Hi,
On Thu, Feb 17, 2011 at 07:49:52PM +0100, Thomas Zeeman wrote:
> It means the application is using two features of java (annotations and generics to be precise) which are only supported in Java 5+. To fix this you need to set the source property of the maven-compiler-plugin in the build section of the pom to 1.5. It might also be necessary to set the target to 1.5 in this case. I.e like this:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.1</version>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
Please excuse for my ignorance but it seems that I need more detailed
advise. I applied this to the previosely suggested pom.xml (see
attachment) but now I get
$ $ mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
On Thu, Feb 17, 2011 at 07:49:52PM +0100, Thomas Zeeman wrote:
It means the application is using two features of java (annotations and generics to be precise) which are only supported in Java 5+. To fix this you need to set the source property of the maven-compiler-plugin in the build section of the pom to 1.5. It might also be necessary to set the target to 1.5 in this case. I.e like this:
Please excuse for my ignorance but it seems that I need more detailed
advise. I applied this to the previosely suggested pom.xml (see
attachment) but now I get
$ $ mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).