Ho scritto un codice maven su netbeans che ha approssimativamente più di 2000 righe. Quando lo compilo su netbeans, tutto va bene, ma se voglio eseguirlo dalla riga di comando, otterrò questi errori:
generics are not supported in -source 1.3
(use -source 5 or higher to enable generics)
ArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>();
generics are not supported in -source 1.3
(use -source 5 or higher to enable generics)
HashSet<Double> resid_List = new HashSet<Double>(Arrays.asList(resid_val));
generics are not supported in -source 1.3
(use -source 5 or higher to enable generics)
List<Integer> ind_ovlpList = new ArrayList<Integer>(Arrays.asList(ind_ovlp));
generics are not supported in -source 1.3
(use -source 5 or higher to enable generics)
public class ColumnComparator implements Comparator<double[]> {
annotations are not supported in -source 1.3
(use -source 5 or higher to enable annotations)
@Override
Ho provato a usare Java 1.3.1, errori del compilatore , ma ho ottenuto più errori. Ho trovato da altri post che dovrei modificare pom.xml, ma non so come. Ecco il mio 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.mycompany</groupId>
<artifactId>mavenmain</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mavenmain</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>gov.nist.math</groupId>
<artifactId>jama</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
</project>
Sarebbe bello se mi potessi aiutare.