I seem to be able to compile fine with "mvn compile", but when I "mvn package"
I get a compile error.
Why would that be? See below.
Kurt
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Castor ................................................ SUCCESS [0.187s]
[INFO] Castor CORE - Core code/functioanlity ................. SUCCESS [0.703s]
[INFO] Castor XML - core ..................................... SUCCESS [0.391s]
[INFO] Castor XML - XML diff ................................. SUCCESS [0.000s]
[INFO] Castor XML - schema ................................... SUCCESS [0.047s]
[INFO] Castor JDO - Persistence framework .................... SUCCESS [0.125s]
[INFO] Castor XML - Code generator ........................... SUCCESS [0.110s]
[INFO] Castor DDL generator .................................. SUCCESS [0.062s]
[INFO] Castor XML - Ant tasks for XML code generator ......... SUCCESS [0.000s]
[INFO] Castor XML - test suite framework code ................ SUCCESS [0.047s]
[INFO] Castor XML - Maven Mojos for executing XMLCTF tests ... SUCCESS [1.094s]
[INFO] Castor CPA - JUnit test archetype ..................... SUCCESS [0.015s]
[INFO] Castor XML - Code generator JUnit test archetype ...... SUCCESS [0.032s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Thu Jul 22 06:37:34 MDT 2010
[INFO] Final Memory: 17M/31M
[INFO] ------------------------------------------------------------------------
C:\Documents and Settings\kpeters\My Documents\javalibs\castor-1.3.1-src\castor-
1.3.1>mvn package
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Castor
[INFO] Castor CORE - Core code/functioanlity
[INFO] Castor XML - core
[INFO] Castor XML - XML diff
[INFO] Castor XML - schema
[INFO] Castor JDO - Persistence framework
[INFO] Castor XML - Code generator
[INFO] Castor DDL generator
[INFO] Castor XML - Ant tasks for XML code generator
[INFO] Castor XML - test suite framework code
[INFO] Castor XML - Maven Mojos for executing XMLCTF tests
[INFO] Castor CPA - JUnit test archetype
[INFO] Castor XML - Code generator JUnit test archetype
[INFO] ------------------------------------------------------------------------
[INFO] Building Castor
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:jar {execution: default}]
[INFO] ------------------------------------------------------------------------
[INFO] Building Castor CORE - Core code/functioanlity
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: C:\Documents and Settings\kpeters\My Documents
\javalibs\castor-1.3.1-src\castor-1.3.1\core\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.castor.core.nature.PropertyHolderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.016 sec
Running org.castor.core.annotationprocessing.BaseAnnotationProcessingServiceTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running org.castor.core.nature.BaseNatureTest
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.castor.core.annotationprocessing.BaseTargetAwareAnnotationProcessing
ServiceTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.castor.core.nature.TestNature
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec
Results :
Tests run: 25, Failures: 0, Errors: 0, Skipped: 2
[INFO] [jar:jar {execution: default-jar}]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:jar {execution: default}]
[INFO] ------------------------------------------------------------------------
[INFO] Building Castor XML - core
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [castor:generate {execution: default}]
[INFO] Nothing to process - all xsds are up to date
[INFO] Adding resource C:\Documents and Settings\kpeters\My Documents\javalibs\c
astor-1.3.1-src\castor-1.3.1\xml\target\generated-sources\castor ...
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 23 resources
[INFO] Copying 2 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: C:\Documents and Settings\kpeters\My Documents
\javalibs\castor-1.3.1-src\castor-1.3.1\xml\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.castor.util.TestBase64Encoder
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running org.castor.util.TestIdentityMap
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.exolab.castor.util.TestDTDResolver
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.castor.util.StringUtilTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.exolab.castor.types.TestTime
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running org.exolab.castor.xml.SetPropertyXmlNamingTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec
Running org.castor.util.TestIdentitySet
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.castor.mapping.TestMappingLoaderRegistry
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.exolab.castor.xml.util.XMLClassDescriptorResolverImplThreadSafetyTes
t
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.719 sec
Running org.exolab.castor.xml.util.XMLClassDescriptorResolverImplTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running org.castor.util.TestBase64Decoder
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.castor.xml.JavaNamingTest
[main] - Package name: . is not valid
[main] - Package name: .org is not valid
[main] - Package name: org. is not valid
[main] - Package name: . is not valid
[main] - Package name: .org is not valid
[main] - Package name: org. is not valid
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.castor.util.TestHex
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.castor.xml.XMLPropertiesTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running org.exolab.castor.xml.XMLContextTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.094 sec
Running org.exolab.castor.xml.TestUnmarshaller
[main] - InternalContext must not be null
[main] - InternalContext must not be null
[main] - InternalContext must not be null
[main] - InternalContext must not be null
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
Results :
Tests run: 85, Failures: 0, Errors: 0, Skipped: 0
[INFO] [jar:jar {execution: default-jar}]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] [castor:generate {execution: default}]
[INFO] Nothing to process - all xsds are up to date
[INFO] Adding resource C:\Documents and Settings\kpeters\My Documents\javalibs\c
astor-1.3.1-src\castor-1.3.1\xml\target\generated-sources\castor ...
[INFO] [source:jar {execution: default}]
[INFO] ------------------------------------------------------------------------
[INFO] Building Castor XML - XML diff
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Documents and Settings\kpeters\My
Documents\javalibs\castor-1.3.1-src\castor-1.3.1\diff\src\test\resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] No tests to run.
[INFO] [jar:jar {execution: default-jar}]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:jar {execution: default}]
[INFO] ------------------------------------------------------------------------
[INFO] Building Castor XML - schema
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [castor:generate {execution: default}]
[INFO] Nothing to process - all xsds are up to date
[INFO] Adding resource C:\Documents and Settings\kpeters\My Documents\javalibs\c
astor-1.3.1-src\castor-1.3.1\schema\target\generated-sources\castor ...
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 2 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 23 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: C:\Documents and Settings\kpeters\My Documents
\javalibs\castor-1.3.1-src\castor-1.3.1\schema\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.exolab.castor.xml.schema.reader.SchemaUnmarshallerTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.297 sec
Running org.castor.xml.schema.writer.SimpleTypeTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.281 sec
Running org.castor.xml.schema.writer.GroupTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
Running org.castor.xml.schema.writer.NamespaceTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.castor.xml.schema.writer.ComplexTypeTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
Results :
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0
[INFO] [jar:jar {execution: default-jar}]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] [castor:generate {execution: default}]
[INFO] Nothing to process - all xsds are up to date
[INFO] Adding resource C:\Documents and Settings\kpeters\My Documents\javalibs\c
astor-1.3.1-src\castor-1.3.1\schema\target\generated-sources\castor ...
[INFO] [source:jar {execution: default}]
[INFO] ------------------------------------------------------------------------
[INFO] Building Castor JDO - Persistence framework
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [castor:generate {execution: default}]
[INFO] Nothing to process - all xsds are up to date
[INFO] Adding resource C:\Documents and Settings\kpeters\My Documents\javalibs\c
astor-1.3.1-src\castor-1.3.1\cpa\target\generated-sources\castor ...
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 11 resources
[INFO] Copying 1 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. b
uild is platform dependent!
[INFO] Compiling 46 source files to C:\Documents and Settings\kpeters\My Documen
ts\javalibs\castor-1.3.1-src\castor-1.3.1\cpa\target\test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] \Documents and Settings\kpeters\My Documents\javalibs\castor-1.3.1-src\c
astor-1.3.1\cpa\src\test\java\org\castor\cpa\persistence\sql\query\PreparedState
mentMock.java:[47,13] org.castor.cpa.persistence.sql.query.PreparedStatementMock
is not abstract and does not override abstract method setNClob(int,java.io.Read
er) in java.sql.PreparedStatement
[INFO] 1error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
\Documents and Settings\kpeters\My Documents\javalibs\castor-1.3.1-src\castor-1.
3.1\cpa\src\test\java\org\castor\cpa\persistence\sql\query\PreparedStatementMock
.java:[47,13] org.castor.cpa.persistence.sql.query.PreparedStatementMock is not
abstract and does not override abstract method setNClob(int,java.io.Reader) in j
ava.sql.PreparedStatement
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13 seconds
[INFO] Finished at: Thu Jul 22 06:38:02 MDT 2010
[INFO] Final Memory: 23M/41M
[INFO] ------------------------------------------------------------------------
C:\Documents and Settings\kpeters\My Documents\javalibs\castor-1.3.1-src\castor-
1.3.1>
From: [email protected]
Date: Wed, 21 Jul 2010 21:50:44 +0200
To: [email protected]
Subject: Re: [castor-user] compiling source code
First of all, you should download and install it, if its not on your system
yet. Have a look at: http://maven.apache.org/ (Linux and OS X have ready
packages for fetching it).Also study some documentation before using it (you
will need to understand how the maven build circle works). It will help you:
http://maven.apache.org/guides/index.html
The largest reference is the maven book:
http://www.sonatype.com/products/maven/documentation/book-defguide ...
After that you can use the maven commands directly in castor's root directory
(e.g. mvn clean compile - for compilation).There is no difference in using
maven with castor or any other project.
But I really recommend to get a little familiar with it before. There are lots
of documents and examples online.
cheers,daniel
Am 21.07.2010 um 21:35 schrieb KURT PETERS:I'm not familiar with maven. Have
any tips on how to use it with castor?
kurt
--------------http://soup.cyphorious.nethttp://cyphorious.net