Hi Lin,
that has not been my comment but cited from the given link. However you are
right.
In case of more questions use the given link or some Maven / Java documentation
to get more information.
Note that from the point of view of your question the class files happen to be
incidentally gener
The compiling fails when using Maven with a JDK 1.6 and 'source' and 'target'
set to 1.3.
The syntax for assertions has been added in Java 1.4, for example check the Sun
Certified Java Programmer Java 6 Study Guide.
There should also be basic / sufficient information available in the Oracle
Jav
The file with the name pom.xml which is informally called super pom is part of
your Maven installation.
If you have more questions about basic Maven stuff you should ask some
colleagues or use a search engine.
For example using Google and typing 'maven super pom‘ the auto-completion even
sugges
Finally to finish this I tried a mini maven project containing the following
class:
package Test;
public class Test {
public void foo() {
System.out.println(new StringBuilder("Hello world!"));
assert true;
}
}
Running mvn install gave me (stri
As I felt unfomfortable leaving it as it is I checked
http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html
where there was the following hint on the target tag:
Note: Merely setting the target option does not guarantee that your code
actually runs on a
pom.xml uses inheritance. There is a so called 'super POM' provided with the
maven installation from which all entries are inherited if not added /
overwritten by you.
Newer versions of Maven have Java 1.6 as default.
With regards
Sebastian
-Ursprüngliche Nachricht-
Von: Lin Ma [mailto
Hi Lin,
I just tried my example and Maxim is right. I thought that the source should
take the API compatibility into account it seems that it is not this way. Hence
if the classes are successfully compiled (which requires a JDK > 1.5) and you
are executing them with Java 1.5 the StringBuilder c
Hi Lin,
1) In general you should use Java 1.7 / 1.8. However you may have specific
requirements which free you from the choice:
For example the customer may explicitly request a specific Java version you
have to support. Then the class files delivered by you must conform to this
Java version (
source -> The level (JDK version) to which the source code must be compliant
to, for example you can write source code using a JDK 1.6 which is compliant to
Java 1.5. However you can also use the StringBuilder class which does not exist
in Java 1.5
target -> The class version of the generated cl