I am trying to learn hyperjaxb by studying this tutorial. I followed all of the instructions down to the heading section What was Generated?
. This included the following steps:
1.) download the <a href="http://confluence.highsource.org/display/HJ3/Downloads">Basic Project Template for Hibernate and Maven</a>
2.) unzip the file
3.) install the xml and xsd files in the assigned locations
4.) open up `cmd.exe`
5.) navigate to the directory of the unzipped root folder
6.) run mvn clean install
But nothing was generated. There is no /generated-sources/xjc
directory, and there is no PurchaseOrderType.java
. I did a key word search of the entire directory structure to confirm that these resources were not present after running mvn clean install
. I also imported the directory structure into a new eclipse maven project and tried run as...maven clean
and run as...maven build
within the new eclipse maven project, but got the same lack of results.
What can I do to get this tutorial to produce the intended generated files?
Also, is there a better way to generate JPA entities from xsd??
EDIT:
As per @kapep's advice, I tried mvn generate-sources
and got the following results:
I then tried mvn clean install
again, and got the following results:
You can see the warning in the print screens that org.apache.maven.plugins:maven-compiler-plugin
is missing. I found the corresponding folder in the .m2
repository on my machine and deleted it, then did a maven update project
from within eclipse to re-download the library. I then did another mvn clean install
, and got the same lack of results. Nothing was generated, no java file, no generated-sources
directory. Nothing.
What else can I try?
SECOND EDIT:
The tutorial app still DOES NOT generate the intended files, however, I was able to get rid of the warning message in the print screens by changing the maven-compiler-plugin portion of the pom to the following:
<plugin>
<inherited>true</inherited>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
Note that, in addition to specifying the version, I also changed the source
and target
from 1.5
to 1.6
, as per @Todd 's advice in this posting. I assume these refer to JDK versions. My installation uses JDK 1.6. I do not know if this is causing any problems.
What else can I try?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…