Re: build problem
Hi all, I've found out that there are some fake jars or similars in this source to allow it build without Oracle jars. There is a switch to allow build with the real Oracle jar. I need other ones as well, and couldn't get around this mechanism, so decided to build the Geotools plugin I need by hand (javac). Best regards: Balázs Bámer -- View this message in context: http://old.nabble.com/build-problem-tp27754729p27759330.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: build problem
> Here is my modification in the main pom.xml: > > bal...@black:/usr/local/src/geotools-2.5.8$ less pom.xml Does this mean its working now, or still having problems? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: build problem
Hi Eduardo, >It's not enough to have the jar's in your repository, you must list >them in the pom.xml file so they are used during compilation. Here is my modification in the main pom.xml: bal...@black:/usr/local/src/geotools-2.5.8$ less pom.xml ... com.oracle ojdbc6 11.2.0 jar false com.oracle xmlparserv2 11.2.0 jar false com.oracle georasterapi 11.2.0 jar false com.oracle sdoapi 11.2.0 jar false com.oracle sdoutl 11.2.0 jar false com.oracle xdb 11.2.0 jar false ... best regards: Balázs Bámer -- View this message in context: http://old.nabble.com/build-problem-tp27754729p27756402.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: build problem
Hi Csaba, > Maybe try downgrading to version 2.0.9 or try with a newer version of > the Geotools source code. I've removed all the 2.2.1 Maven stuff including repository. Installed the Ubuntu package maven2 2.0.9 and installed all the Oracle libraries again. mvn compile ends up in the same errors. (there are more test errors above, but I don't think they are interesting). Best regards: Balázs Bámer -- View this message in context: http://old.nabble.com/build-problem-tp27754729p27756093.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: build problem
On Ter, 02 Mar 2010, kolaloka wrote: Looking into the repository for an actual class bal...@black:~/.m2/repository/com/oracle$ (for i in `find . -type f|grep jar$`; do unzip -l $i; done) |grep STRUCT 5985 06-16-04 11:33 oracle/sql/STRUCT.class 2830 07-31-09 19:31 oracle/sql/JAVA_STRUCT.class 11087 07-31-09 19:31 oracle/sql/STRUCT.class seems to be there. Well, two of the STRUCT might be a problem if it once finds it... others are not duplicated: bal...@black:~/.m2/repository/com/oracle$ (for i in `find . -type f|grep jar$`; do unzip -l $i; done) |grep JGeoRaster 10378 08-01-09 10:53 oracle/spatial/georaster/JGeoRaster.class 27539 08-01-09 10:53 oracle/spatial/georaster/JGeoRasterMeta.class It's not enough to have the jar's in your repository, you must list them in the pom.xml file so they are used during compilation. -- We cannot do everything at once, but we can do something at once. -- Calvin Coolidge Eduardo M KALINOWSKI edua...@kalinowski.com.br - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: build problem
Hi Eduardo, Seems like you are missing one or more dependencies in the pom for this project, or their scopes are incorrect. What does this mean? Looking into the repository for an actual class bal...@black:~/.m2/repository/com/oracle$ (for i in `find . -type f|grep jar$`; do unzip -l $i; done) |grep STRUCT 5985 06-16-04 11:33 oracle/sql/STRUCT.class 2830 07-31-09 19:31 oracle/sql/JAVA_STRUCT.class 11087 07-31-09 19:31 oracle/sql/STRUCT.class seems to be there. Well, two of the STRUCT might be a problem if it once finds it... others are not duplicated: bal...@black:~/.m2/repository/com/oracle$ (for i in `find . -type f|grep jar$`; do unzip -l $i; done) |grep JGeoRaster 10378 08-01-09 10:53 oracle/spatial/georaster/JGeoRaster.class 27539 08-01-09 10:53 oracle/spatial/georaster/JGeoRasterMeta.class best regards: Balázs Bámer -- View this message in context: http://old.nabble.com/build-problem-tp27754729p27755478.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: build problem
Well it can't find oracle.spatial.georaster and some other packages. But looks like you can't build this project at all with your version of Maven: http://www.mail-archive.com/geotools-gt2-us...@lists.sourceforge.net/msg07357.html Maybe try downgrading to version 2.0.9 or try with a newer version of the Geotools source code. Csaba On 03/02/2010 01:27 PM, kolaloka wrote: Hi Csaba, This is what I find in the repository: bal...@black:~/.m2/repository/com/oracle$ find . ./sdoapi ./sdoapi/11.2.0 ./sdoapi/11.2.0/sdoapi-11.2.0.jar ./sdoapi/maven-metadata-local.xml ./xdb ./xdb/11.2.0 ./xdb/11.2.0/xdb-11.2.0.jar ./xdb/maven-metadata-local.xml ./sdotype ./sdotype/11.2.0 ./sdotype/11.2.0/sdotype-11.2.0.jar ./sdotype/maven-metadata-local.xml ./xmlparserv2 ./xmlparserv2/11.2.0 ./xmlparserv2/11.2.0/xmlparserv2-11.2.0.jar ./xmlparserv2/maven-metadata-local.xml ./sdoutl ./sdoutl/11.2.0 ./sdoutl/11.2.0/sdoutl-11.2.0.jar ./sdoutl/maven-metadata-local.xml ./sdooutl ./sdooutl/11.2.0 ./georasterapi ./georasterapi/11.2.0 ./georasterapi/11.2.0/georasterapi-11.2.0.jar ./georasterapi/maven-metadata-local.xml ./dummy_spatial ./dummy_spatial/8.1.8 ./dummy_spatial/8.1.8/dummy_spatial-8.1.8.jar.sha1 ./dummy_spatial/8.1.8/dummy_spatial-8.1.8.pom.sha1 ./dummy_spatial/8.1.8/dummy_spatial-8.1.8.pom ./dummy_spatial/8.1.8/dummy_spatial-8.1.8.jar ./ojdbc6 ./ojdbc6/11.2.0 ./ojdbc6/11.2.0/ojdbc6-11.2.0.jar ./ojdbc6/maven-metadata-local.xml and this is the output: bal...@black:/usr/local/src/geotools-2.5.8$ mvn compile [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Geotools [INFO] Build tools for Geotools 2 [INFO] Maven plugins for Geotools 2 ... [INFO] [INFO] Building Geotools [INFO]task-segment: [compile] [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] Building Build tools for Geotools 2 [INFO]task-segment: [compile] [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] Building Maven plugins for Geotools 2 [INFO]task-segment: [compile] [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] Building Geotools Archetype [INFO]task-segment: [compile] [INFO] [INFO] [plugin:descriptor {execution: default-descriptor}] [INFO] Using 2 extractors. [INFO] Applying extractor for language: java [INFO] Extractor for language: java found 0 mojo descriptors. [INFO] Applying extractor for language: bsh [INFO] Extractor for language: bsh found 0 mojo descriptors. [WARNING] [WARNING] *** [WARNING] Deprecation Alert: [WARNING] No mojo descriptors were found in this project which has a packaging type of maven-plugin. [WARNING] In future versions of the plugin tools, this will fail the build. [WARNING] If this project is an archetype, change the packaging type from maven-plugin to maven-archetype. [WARNING] many similar blocks follow [INFO] [INFO] Building imagemosaic-jdbc module [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] snapshot org.h2database:h2:1.0-SNAPSHOT: checking for updates from maven2-repository.dev.java.net [INFO] snapshot org.h2database:h2:1.0-SNAPSHOT: checking for updates from osgeo [INFO] snapshot org.h2database:h2:1.0-SNAPSHOT: checking for updates from opengeo [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 31 source files to /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/target/classes [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/GeoRasterThread.java:[25,31] package oracle.spatial.georaster does not exist /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/GeoRasterThread.java:[26,31] package oracle.spatial.georaster does not exist /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/src/main/java
Re: build problem
On Ter, 02 Mar 2010, kolaloka wrote: and this is the output: bal...@black:/usr/local/src/geotools-2.5.8$ mvn compile [snip] [INFO] Building imagemosaic-jdbc module [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] snapshot org.h2database:h2:1.0-SNAPSHOT: checking for updates from maven2-repository.dev.java.net [INFO] snapshot org.h2database:h2:1.0-SNAPSHOT: checking for updates from osgeo [INFO] snapshot org.h2database:h2:1.0-SNAPSHOT: checking for updates from opengeo [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 31 source files to /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/target/classes [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/GeoRasterThread.java:[25,31] package oracle.spatial.georaster does not exist [and so on] Seems like you are missing one or more dependencies in the pom for this project, or their scopes are incorrect. -- Walking on water wasn't built in a day. -- Jack Kerouac Eduardo M KALINOWSKI edua...@kalinowski.com.br - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: build problem
Hi Csaba, This is what I find in the repository: bal...@black:~/.m2/repository/com/oracle$ find . ./sdoapi ./sdoapi/11.2.0 ./sdoapi/11.2.0/sdoapi-11.2.0.jar ./sdoapi/maven-metadata-local.xml ./xdb ./xdb/11.2.0 ./xdb/11.2.0/xdb-11.2.0.jar ./xdb/maven-metadata-local.xml ./sdotype ./sdotype/11.2.0 ./sdotype/11.2.0/sdotype-11.2.0.jar ./sdotype/maven-metadata-local.xml ./xmlparserv2 ./xmlparserv2/11.2.0 ./xmlparserv2/11.2.0/xmlparserv2-11.2.0.jar ./xmlparserv2/maven-metadata-local.xml ./sdoutl ./sdoutl/11.2.0 ./sdoutl/11.2.0/sdoutl-11.2.0.jar ./sdoutl/maven-metadata-local.xml ./sdooutl ./sdooutl/11.2.0 ./georasterapi ./georasterapi/11.2.0 ./georasterapi/11.2.0/georasterapi-11.2.0.jar ./georasterapi/maven-metadata-local.xml ./dummy_spatial ./dummy_spatial/8.1.8 ./dummy_spatial/8.1.8/dummy_spatial-8.1.8.jar.sha1 ./dummy_spatial/8.1.8/dummy_spatial-8.1.8.pom.sha1 ./dummy_spatial/8.1.8/dummy_spatial-8.1.8.pom ./dummy_spatial/8.1.8/dummy_spatial-8.1.8.jar ./ojdbc6 ./ojdbc6/11.2.0 ./ojdbc6/11.2.0/ojdbc6-11.2.0.jar ./ojdbc6/maven-metadata-local.xml and this is the output: bal...@black:/usr/local/src/geotools-2.5.8$ mvn compile [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Geotools [INFO] Build tools for Geotools 2 [INFO] Maven plugins for Geotools 2 ... [INFO] [INFO] Building Geotools [INFO]task-segment: [compile] [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] Building Build tools for Geotools 2 [INFO]task-segment: [compile] [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] Building Maven plugins for Geotools 2 [INFO]task-segment: [compile] [INFO] [INFO] No goals needed for project - skipping [INFO] [INFO] Building Geotools Archetype [INFO]task-segment: [compile] [INFO] [INFO] [plugin:descriptor {execution: default-descriptor}] [INFO] Using 2 extractors. [INFO] Applying extractor for language: java [INFO] Extractor for language: java found 0 mojo descriptors. [INFO] Applying extractor for language: bsh [INFO] Extractor for language: bsh found 0 mojo descriptors. [WARNING] [WARNING] *** [WARNING] Deprecation Alert: [WARNING] No mojo descriptors were found in this project which has a packaging type of maven-plugin. [WARNING] In future versions of the plugin tools, this will fail the build. [WARNING] If this project is an archetype, change the packaging type from maven-plugin to maven-archetype. [WARNING] many similar blocks follow [INFO] [INFO] Building imagemosaic-jdbc module [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] snapshot org.h2database:h2:1.0-SNAPSHOT: checking for updates from maven2-repository.dev.java.net [INFO] snapshot org.h2database:h2:1.0-SNAPSHOT: checking for updates from osgeo [INFO] snapshot org.h2database:h2:1.0-SNAPSHOT: checking for updates from opengeo [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 31 source files to /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/target/classes [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/GeoRasterThread.java:[25,31] package oracle.spatial.georaster does not exist /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/GeoRasterThread.java:[26,31] package oracle.spatial.georaster does not exist /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/GeoRasterThread.java:[27,31] package oracle.spatial.georaster does not exist /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/GeoRasterThread.java:[29,17] package oracle.sql does not exist /usr/local/src/geotools-2.5.8/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/i
Re: build problem
Hi, Maven should output the javac compilation error to you. If you didn't see it, it means Maven hasn't reached the point to compile it yet. Maybe you could send us the complete output you get from Maven to see why it doesn't work. It seems to me that you've installed the jar file correctly (maybe check if the file really is there, in ~/.m2/repository/com/oracle/ojdbc6/11.2.0/ ). Csaba On 03/02/2010 12:23 PM, Bámer Balázs wrote: Hi All, I have problems building the Geotools 2.5.8 source. It requires Maven 2.1.0, I have 2.2.1. It is just out of the box without Oracle jars, which I have to add to it. I installed them in the local repository with commands like mvn install:install-file -Dfile=/home/balazs/georaster/product/11.2.0/dbhome_1/jdbc/lib/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar and put fragments like com.oracle ojdbc6 11.2.0 jar false into the pom.xml in geotools source root. However, Maven keeps complaining about missing classes. What can be wrong? Can I have Maven output somehow the javac and similar steps of the build to be able to repeat it by hand? thank you in advance, best regards: Balázs Bámer Telefon, mobil TV, SMS, internet egy havi díjért. MédiaMánia díjcsomagok most dupla benne foglalt forgalommal. T-Mobile - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Build problem
I already answer to your previous mail but it seems it never arrive on the list. This pb is fixed in svn, it's due to a pb in scm execution. Emmanuel Malcolm Wong Ho a écrit : Continuum build failing, not sure what the cause is. Using Maven2 and Continuum1. Log :- jvm 1| 2005-11-01 09:00:00,013 [scheduler1_Worker-11] INFO SchedulesActivator - > Executing build job (DEFAULT_SCHEDULE)... jvm 1| 2005-11-01 09:00:00,053 [scheduler1_Worker-11] INFO Continuum - Enqueuing 'Maven Quick Start Archetype' (Build definition id=10 . jvm 1| 2005-11-01 09:00:00,154 [Thread-1] INFO ContinuumScm - Checking out project: 'Maven Quick Start Archetype', id: '10' to 'C:\blackb ird\continuum-1.0\bin\win32\..\..\apps\continuum\working-directory\10'. jvm 1| 2005-11-01 09:00:00,234 [Thread-1] WARN ConfigurationService - Error reading build output for build '25'. jvm 1| java.io.FileNotFoundException: C:\blackbird\continuum-1.0\bin\win32\..\..\apps\continuum\build-output-d irectory\10\25.log.txt (The system cannot find the file specified) jvm 1| at java.io.FileInputStream.open(Native Method) jvm 1| at java.io.FileInputStream.(FileInputStream.java:106) jvm 1| at org.codehaus.plexus.util.FileUtils.fileRead(FileUtils.java:269) jvm 1| at org.codehaus.plexus.util.FileUtils.fileRead(FileUtils.java:261) jvm 1| at org.apache.maven.continuum.configuration.DefaultConfigurationService.get BuildOutput(DefaultConfigurationService.java:167) jvm 1| at org.apache.maven.continuum.notification.DefaultContinuumNotificationDisp atcher.sendNotification(DefaultContinuumNotificationDispatcher.java:1 29) jvm 1| at org.apache.maven.continuum.notification.DefaultContinuumNotificationDisp atcher.buildComplete(DefaultContinuumNotificationDispatcher.java:96) jvm 1| at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build( DefaultBuildController.java:261) jvm 1| at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.exec uteTask(BuildProjectTaskExecutor.java:53) jvm 1| at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$Execut orRunnable.run(ThreadedTaskQueueExecutor.java:103) jvm 1| at java.lang.Thread.run(Thread.java:595) Malcolm Wong Ho An investment in knowledge always pays the best interest. -- Benjamin Franklin “This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.net/legal/email.aspx "
RE: Build problem
It looks like there is a problem checking out your sources. Please make sure that the SCM information in the project is correct and that you can use the same information to check out the project from the command line. -Original Message- From: Malcolm Wong Ho [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 01, 2005 07:01 To: continuum-users@maven.apache.org Subject: Build problem Continuum build failing, not sure what the cause is. Using Maven2 and Continuum1. Log :- jvm 1| 2005-11-01 09:00:00,013 [scheduler1_Worker-11] INFO SchedulesActivator - > Executing build job (DEFAULT_SCHEDULE)... jvm 1| 2005-11-01 09:00:00,053 [scheduler1_Worker-11] INFO Continuum - Enqueuing 'Maven Quick Start Archetype' (Build definition id=10 . jvm 1| 2005-11-01 09:00:00,154 [Thread-1] INFO ContinuumScm - Checking out project: 'Maven Quick Start Archetype', id: '10' to 'C:\blackb ird\continuum-1.0\bin\win32\..\..\apps\continuum\working-directory\10'. jvm 1| 2005-11-01 09:00:00,234 [Thread-1] WARN ConfigurationService - Error reading build output for build '25'. jvm 1| java.io.FileNotFoundException: C:\blackbird\continuum-1.0\bin\win32\..\..\apps\continuum\build-output-d irectory\10\25.log.txt (The system cannot find the file specified) jvm 1| at java.io.FileInputStream.open(Native Method) jvm 1| at java.io.FileInputStream.(FileInputStream.java:106) jvm 1| at org.codehaus.plexus.util.FileUtils.fileRead(FileUtils.java:269) jvm 1| at org.codehaus.plexus.util.FileUtils.fileRead(FileUtils.java:261) jvm 1| at org.apache.maven.continuum.configuration.DefaultConfigurationService.get BuildOutput(DefaultConfigurationService.java:167) jvm 1| at org.apache.maven.continuum.notification.DefaultContinuumNotificationDisp atcher.sendNotification(DefaultContinuumNotificationDispatcher.java:1 29) jvm 1| at org.apache.maven.continuum.notification.DefaultContinuumNotificationDisp atcher.buildComplete(DefaultContinuumNotificationDispatcher.java:96) jvm 1| at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build( DefaultBuildController.java:261) jvm 1| at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.exec uteTask(BuildProjectTaskExecutor.java:53) jvm 1| at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$Execut orRunnable.run(ThreadedTaskQueueExecutor.java:103) jvm 1| at java.lang.Thread.run(Thread.java:595) Malcolm Wong Ho An investment in knowledge always pays the best interest. -- Benjamin Franklin "This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.net/legal/email.aspx "
RE: Build problem related to test distribution
On Tue, 16 Sep 2003, Mark Langley wrote: > We also desire to make test utility classes (primarily Mock Objects) > available for use in testing of dependent projects. The approach of creating > XYZ.jar and XYZ-tests.jar artifacts from project XYZ seems to be the best > approach to this. Subsequent projects could then prescribe XYX-tests.jar as > a test-dependency in their project.xml if needed. > > I don't think this runs counter to any of the arguments presented on the > WhyYouCantCreateMultipleArtifactsInOneProject wiki page. Packaging an > additional jar from the test code need not impact any of the plugins (except > for a new test:deploy goal), and the build settings need not change. There > is no risk of recreating the multi-project plugin within a single project. > > Alternate suggestion #1 of distributing test code inside a production jar is > not a realistic solution in many (most?) environments. Point taken :) > > Alternate suggestion #2 of creating a new XYZ-test-support project creates a > circular dependency - I can't test XYZ without the support classes, and I > can't build the support classes without XYZ. I don't follow you here, perhaps you should try to clearify with a example In your original mail you wanted to create a source distribution and a test distribution. What is a test distribution? The src/main/java directory is for the source files of a artifact and the src/test/java is a set of tests for testing the artifact. They are not supposed to be general classes for use outside of the artifact. If you have a set of general test cases/util objects they really belong in a separate project. > > I am curious to learn if the concept of a XYX-tests.jar artifact has been > discussed before, and if so, why it would be rejected. > > Thanks, > > Mark > > > -Original Message- > From: Trygve Laugstøl [mailto:[EMAIL PROTECTED] > Sent: September 16, 2003 3:35 AM > To: Maven Users List > Subject: Re: Build problem related to test distribution > > > On Mon, 15 Sep 2003, Gil César Faria wrote: > > > Hello everybody! > > > > I have a basic project where I have some general utility classes used by > > all other maven projects. > > Inside this general project, i have some abstract test classes that > > should be used within all other > > test classes of all projects. All test classes, including those abstract > > classes are under test directory. > > > > When maven builds the distribution for this general project, it only > > includes the source classes, not > > the test classes. But when i try to build other projects that depends > > upon this general project, i cannot > > compile the tests because the abstract test classes cannot be found. > > > > I am not sure about the best solution for this problem and would like an > > advise from our > > more maven experienced coleagues: > > > > Can i generate more than one artifact (jar) for a single project ? some > > kind of source distribution and test distribution ... > > No > > http://wiki.codehaus.org/maven/WhyYouCantCreateMultipleArtifactsInOneProject > > > > > Should i generate only a single jar with all source and test classes > > inside it ? > > Don't see why not. The test class isnt a class for testing the artifact, > rather a part of you general stuff. Bear in mind that the testcase class > will be included if you end up building war or uberjars. > > > > > Should i create a new project to hold only the abstract test classes, > > and include it as a dependency for all other projects ? > > This is also a solution. Currently you can only state _dependencies_ for a > project so it doesn't add much value, but with a later version you can > state runtime/testtime dependencies and then it might be a good idea to > have it as a separate project. > > Guess the rest of your questions are answered by now? :) > > > > > Should i redefine dist:build to create a test distribution ? > > > > There is an automated way to tell maven that the test classes should be > > considered as a dependency ? > > > > There is another way to organize my project classes to solve this problem? > > > > Can I define source dependencies and test dependencies separatelly? > > > > Any other suggestions? > > > > Thanks in advance! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Build problem related to test distribution
We also desire to make test utility classes (primarily Mock Objects) available for use in testing of dependent projects. The approach of creating XYZ.jar and XYZ-tests.jar artifacts from project XYZ seems to be the best approach to this. Subsequent projects could then prescribe XYX-tests.jar as a test-dependency in their project.xml if needed. I don't think this runs counter to any of the arguments presented on the WhyYouCantCreateMultipleArtifactsInOneProject wiki page. Packaging an additional jar from the test code need not impact any of the plugins (except for a new test:deploy goal), and the build settings need not change. There is no risk of recreating the multi-project plugin within a single project. Alternate suggestion #1 of distributing test code inside a production jar is not a realistic solution in many (most?) environments. Alternate suggestion #2 of creating a new XYZ-test-support project creates a circular dependency - I can't test XYZ without the support classes, and I can't build the support classes without XYZ. I am curious to learn if the concept of a XYX-tests.jar artifact has been discussed before, and if so, why it would be rejected. Thanks, Mark -Original Message- From: Trygve Laugstøl [mailto:[EMAIL PROTECTED] Sent: September 16, 2003 3:35 AM To: Maven Users List Subject: Re: Build problem related to test distribution On Mon, 15 Sep 2003, Gil César Faria wrote: > Hello everybody! > > I have a basic project where I have some general utility classes used by > all other maven projects. > Inside this general project, i have some abstract test classes that > should be used within all other > test classes of all projects. All test classes, including those abstract > classes are under test directory. > > When maven builds the distribution for this general project, it only > includes the source classes, not > the test classes. But when i try to build other projects that depends > upon this general project, i cannot > compile the tests because the abstract test classes cannot be found. > > I am not sure about the best solution for this problem and would like an > advise from our > more maven experienced coleagues: > > Can i generate more than one artifact (jar) for a single project ? some > kind of source distribution and test distribution ... No http://wiki.codehaus.org/maven/WhyYouCantCreateMultipleArtifactsInOneProject > > Should i generate only a single jar with all source and test classes > inside it ? Don't see why not. The test class isnt a class for testing the artifact, rather a part of you general stuff. Bear in mind that the testcase class will be included if you end up building war or uberjars. > > Should i create a new project to hold only the abstract test classes, > and include it as a dependency for all other projects ? This is also a solution. Currently you can only state _dependencies_ for a project so it doesn't add much value, but with a later version you can state runtime/testtime dependencies and then it might be a good idea to have it as a separate project. Guess the rest of your questions are answered by now? :) > > Should i redefine dist:build to create a test distribution ? > > There is an automated way to tell maven that the test classes should be > considered as a dependency ? > > There is another way to organize my project classes to solve this problem? > > Can I define source dependencies and test dependencies separatelly? > > Any other suggestions? > > Thanks in advance! > > Trygve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Build problem related to test distribution
On Mon, 15 Sep 2003, Gil César Faria wrote: > Hello everybody! > > I have a basic project where I have some general utility classes used by > all other maven projects. > Inside this general project, i have some abstract test classes that > should be used within all other > test classes of all projects. All test classes, including those abstract > classes are under test directory. > > When maven builds the distribution for this general project, it only > includes the source classes, not > the test classes. But when i try to build other projects that depends > upon this general project, i cannot > compile the tests because the abstract test classes cannot be found. > > I am not sure about the best solution for this problem and would like an > advise from our > more maven experienced coleagues: > > Can i generate more than one artifact (jar) for a single project ? some > kind of source distribution and test distribution ... No http://wiki.codehaus.org/maven/WhyYouCantCreateMultipleArtifactsInOneProject > > Should i generate only a single jar with all source and test classes > inside it ? Don't see why not. The test class isnt a class for testing the artifact, rather a part of you general stuff. Bear in mind that the testcase class will be included if you end up building war or uberjars. > > Should i create a new project to hold only the abstract test classes, > and include it as a dependency for all other projects ? This is also a solution. Currently you can only state _dependencies_ for a project so it doesn't add much value, but with a later version you can state runtime/testtime dependencies and then it might be a good idea to have it as a separate project. Guess the rest of your questions are answered by now? :) > > Should i redefine dist:build to create a test distribution ? > > There is an automated way to tell maven that the test classes should be > considered as a dependency ? > > There is another way to organize my project classes to solve this problem? > > Can I define source dependencies and test dependencies separatelly? > > Any other suggestions? > > Thanks in advance! > > Trygve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]