Hi! @Randy, txs 4 the patch, good catch.
As I also commented in JIRA: A few points are still open 1.) using a different configuration XML (other than persistence.xml) should be provided as own plugin attribute (and not in the 'additional properties' list). 2.) using a different configuration XML must also work for the openjpa:sql and openjpa:schema mojos. I will implement this after I'm back from vacation next week. @Adam: Can you please checkout the latest from SVN and try it with this version? svn co https://svn.codehaus.org/mojo/trunk/mojo/openjpa-maven-plugin Do you have other wishes? So we can plan to make a 1.1 with ~ end of march. txs and LieGrue, strub --- Randy Watler <[email protected]> schrieb am Sa, 28.2.2009: > Von: Randy Watler <[email protected]> > Betreff: Re: [ANN] OpenJPA Maven Plugin 1.0 Released > An: [email protected] > Datum: Samstag, 28. Februar 2009, 5:38 > Mark/Adam, > > I have filed a JIRA ticket with a patch for this issue: > http://jira.codehaus.org/browse/MOJO-1309 > > I am not sure why Adam is specifying the > 'properties' property, but we > use it to ensure the enhancement is processing based off of > a specific > project persistence.xml file... there are multiple > persistence.xml files > on the classpath. I feel this is a fairly important bug to > fix since I > think it is generally a regression from the 1.0-alpha > version. > > HTH, > > Randy Watler > Apache Portals Jetspeed2 Committer > > Mark Struberg wrote: > > Adam, > > > > For what I've seen the 'properties' > property specifies a file which contains the configuration. > > So I'm honestly a bit confused about the value: > > META-INF/persistence.xml#OpenJpaTest > > > > Can you please tell me what you like to achieve and > how your config file really looks like (including real > filename). > > > > > > Please note that the ant tasks imho calls the > PCEnhancer only via spawning an own java cmd. So any error > occurring may not get to your eyes there. > > > > > > txs, > > strub > > > > --- Mark Struberg <[email protected]> schrieb am > Fr, 27.2.2009: > > > > > >> Von: Mark Struberg <[email protected]> > >> Betreff: Re: [ANN] OpenJPA Maven Plugin 1.0 > Released > >> An: [email protected] > >> Datum: Freitag, 27. Februar 2009, 0:11 > >> Thanks for the response Adam! > >> I will try to create an integration test based on > your > >> info. > >> > >> LieGrue, > >> strub > >> > >> > >> --- Adam Hardy <[email protected]> > schrieb > >> am Do, 26.2.2009: > >> > >> > >>> Von: Adam Hardy > <[email protected]> > >>> Betreff: Re: [ANN] OpenJPA Maven Plugin 1.0 > Released > >>> An: [email protected] > >>> Datum: Donnerstag, 26. Februar 2009, 0:59 > >>> Mark Struberg on 25/02/09 09:49, wrote: > >>> > >>>> The Maven team is pleased to announce the > release > >>>> > >> of > >> > >>> the > >>> > >>>> openjpa-maven-plugin-1.0 > >>>> > >>>> > >>>> The plugin documentation can be found > here: > >>>> > >>>> > http://mojo.codehaus.org/openjpa-maven-plugin/ > >>>> > >>> I gave it a test run and I have an error. > After > >>> > >> looking > >> > >>> thro the docs, the source and looking at the > debug, I > >>> > >> still > >> > >>> can't figure it out. I get this error: > >>> > >>> org.apache.openjpa.lib.util.ParseException: > >>> > >>> > >> > org.apache.openjpa.conf.openjpaconfigurationi...@52dd4e95.properties > >> > >>> = META-INF/persistence.xml#OpenJpaTest > >>> at > >>> > >>> > >> > org.apache.openjpa.lib.util.Options.setInto(Options.java:237) > >> > >>> at > >>> > >>> > >> > org.apache.openjpa.lib.util.Options.setInto(Options.java:181) > >> > >>> at > >>> > >>> > >> > org.apache.openjpa.lib.conf.Configurations.populateConfiguration(Configurations.java:357) > >> > >>> at > >>> > >>> > >> > org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4438) > >> > >>> at > >>> > >>> > >> > org.apache.openjpa.enhance.PCEnhancer$1.run(PCEnhancer.java:4409) > >> > >>> at > >>> > >>> > >> > org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:708) > >> > >>> .... > >>> Caused by: > java.lang.reflect.InvocationTargetException > >>> at > >>> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > >>> > >> Method) > >> > >>> at > >>> > >>> > >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > >> > >>> at > >>> > >>> > >> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > >> > >>> at > >>> > >> java.lang.reflect.Method.invoke(Method.java:597) > >> > >>> at > >>> > >>> > >> > org.apache.openjpa.lib.util.Options.invoke(Options.java:401) > >> > >>> at > >>> > >>> > >> > org.apache.openjpa.lib.util.Options.setInto(Options.java:234) > >> > >>> ... 27 more > >>> Caused by: java.util.MissingResourceException: > >>> META-INF/persistence.xml#OpenJpaTest#null > >>> at > >>> > >>> > >> > org.apache.openjpa.lib.conf.ProductDerivations.load(ProductDerivations.java:272) > >> > >>> at > >>> > >>> > >> > org.apache.openjpa.lib.conf.ConfigurationImpl.setProperties(ConfigurationImpl.java:762) > >> > >>> ... 33 more > >>> > >>> > >>> My config currently uses antrun, so I know I > don't > >>> > >> have > >> > >>> any major issues here. > >>> This is in my pom: > >>> > >>> <plugin> > >>> > >>> > <artifactId>maven-war-plugin</artifactId> > >>> <configuration> > >>> > >>> > <warName>${project.artifactId}</warName> > >>> </configuration> > >>> </plugin> > >>> <plugin> > >>> > >>> > >> <groupId>org.codehaus.mojo</groupId> > >> > >>> > >>> > >>> > >> > <artifactId>openjpa-maven-plugin</artifactId> > >> > >>> <executions> > >>> <execution> > >>> <id>JPA Enhance</id> > >>> > <phase>process-classes</phase> > >>> <goals> > >>> <goal>enhance</goal> > >>> </goals> > >>> </execution> > >>> </executions> > >>> <configuration> > >>> <toolProperties> > >>> <property> > >>> > <name>properties</name> > >>> > >>> > >>> > >> > <value>META-INF/persistence.xml#OpenJpaTest</value> > >> > >>> </property> > >>> </toolProperties> > >>> <classes> > >>> > >>> > >>> > >> > ${build.outputDirectory}/org/permacode/patternrepo/domain/entity/ > >> > >>> </classes> > >>> </configuration> > >>> </plugin> > >>> > >>> Any idea what it could be, seeing that extra > #null on > >>> > >> the > >> > >>> end of the persistence filename? > >>> > >>> Regards > >>> Adam > >>> > > > > > > > > > >
