Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to tell if it did anything? #7

Open
GoogleCodeExporter opened this issue Mar 17, 2015 · 5 comments
Open

How to tell if it did anything? #7

GoogleCodeExporter opened this issue Mar 17, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

I'm sure this is a silly question (and not a bug I know), but I have the plugin 
running and I don't know if it is doing anything or not.  Is there some output 
from the plugin to say whether it did anything or not?

What steps will reproduce the problem?
1. add or remove plugin from pom.xml
2. mvn package
3. check entity class files

What is the expected output? What do you see instead?
I would expect the files in the target directory to be larger once weaved, but 
I see exact same sizes as I do without the plugin install.


What version of the product are you using? On what operating system?
1.0.4
eclipselink 2.4.1

Please provide any additional information below.
I have eclipselink.weaving set to static, which doesn't seem to complain 
whether or not I have the plugin active in the pom.xml.


[INFO] --- eclipselink-staticweave-maven-plugin:1.0.4:weave (default) @ 
torchlms ---
[EL Finest]: 2013-07-16 
22:08:28.78--ServerSession(1361324633)--Thread(Thread[main,5,main])--Begin 
predeploying Persistence Unit torchlms; session torchlms; state Initial; 
factoryCount 0
[EL Finest]: 2013-07-16 
22:08:28.789--ServerSession(1361324633)--Thread(Thread[main,5,main])--property=e
clipselink.weaving.changetracking; default value=true
[EL Finest]: 2013-07-16 
22:08:28.789--ServerSession(1361324633)--Thread(Thread[main,5,main])--property=e
clipselink.weaving.lazy; default value=true
[EL Finest]: 2013-07-16 
22:08:28.792--ServerSession(1361324633)--Thread(Thread[main,5,main])--property=e
clipselink.weaving.eager; default value=false
[EL Finest]: 2013-07-16 
22:08:28.794--ServerSession(1361324633)--Thread(Thread[main,5,main])--property=e
clipselink.weaving.fetchgroups; default value=true
[EL Finest]: 2013-07-16 
22:08:28.796--ServerSession(1361324633)--Thread(Thread[main,5,main])--property=e
clipselink.weaving.internal; default value=true
[EL Finest]: 2013-07-16 
22:08:28.8--ServerSession(1361324633)--Thread(Thread[main,5,main])--property=ecl
ipselink.multitenant.tenants-share-emf; default value=true
[EL Finest]: 2013-07-16 
22:08:28.801--ServerSession(1361324633)--Thread(Thread[main,5,main])--property=e
clipselink.multitenant.tenants-share-cache; default value=false
[EL Finest]: 2013-07-16 
22:08:28.815--ServerSession(1361324633)--Thread(Thread[main,5,main])--property=e
clipselink.metadata-source; default value=null
[EL Finest]: 2013-07-16 
22:08:28.816--ServerSession(1361324633)--Thread(Thread[main,5,main])--property=e
clipselink.jpa.uppercase-column-names; value=true
[EL Finer]: 2013-07-16 
22:08:28.817--ServerSession(1361324633)--Thread(Thread[main,5,main])--Searching 
for default mapping file in file:/c:/dev/myproject/target/classes/
[EL Finer]: 2013-07-16 
22:08:28.831--ServerSession(1361324633)--Thread(Thread[main,5,main])--Found a 
default mapping file at file:/c:/dev/myproject/target/classes/META-INF/orm.xml 
for root URL file:/c:/dev/myproject/target/classes/
[EL Finer]: 2013-07-16 
22:08:29.134--ServerSession(1361324633)--Thread(Thread[main,5,main])--Searching 
for default mapping file in file:/c:/dev/myproject/target/classes/
[EL Finest]: 2013-07-16 
22:08:29.152--ServerSession(1361324633)--Thread(Thread[main,5,main])--End 
predeploying Persistence Unit torchlms; session torchlms; state Predeployed; 
factoryCount 0
[INFO]


Original issue reported on code.google.com by [email protected] on 17 Jul 2013 at 4:35

@GoogleCodeExporter
Copy link
Author

To verify it was at least hitting the right directory, I changed the target.  
It ran and populated the new target directory with everything in my source 
directory.  Then I stashed all my changes, delete the actual source/target 
directory, updated config, refreshed, clean built, etc.

Comparing the 2 directories everything was identical except for the 
eclipselink.weaving set to false and static in the different setups.  So I 
believe everything is setup and running, but it isn't doing anything.  So I am 
sure I am missing something else?!@?

Thanks!

Original comment by [email protected] on 17 Jul 2013 at 4:58

@GoogleCodeExporter
Copy link
Author

Ok, so the output is from the eclipselink weaving stuff and not necessarily 
from this plugin I now realize.  I configured this the ant task way and get 
pretty much the same results.

So this isn't really a question about the plugin itself, but about the weaving 
in general.  Not the right forum, but I would appreciate any input from 
knowledgeable folks.  What type of files should I expect to have change.  I was 
assuming my @Entity
JPA entity classes.

Thanks


Original comment by [email protected] on 17 Jul 2013 at 5:41

@GoogleCodeExporter
Copy link
Author

Thank you all for joining me on this adventure.  Hopefully this will help some 
other lost soul, or you can delete the whole issue if you so desire.

You have to specify which classes you want things to operate on in your 
persistence.xml.  Or for Eclipselink (and other providers) you can auto detect 
all @Entity classes by setting exclude-unlisted-classes to false as follows...

<persistence-unit name="torchlms" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
...


Thank you


Original comment by [email protected] on 17 Jul 2013 at 5:54

@GoogleCodeExporter
Copy link
Author

Final note.  <exclude-unlisted-classes>false</exclude-unlisted-classes>  worked 
at compile time for me, but not at run time.  Either Eclipselink didn't like it 
or didn't like it in combination with spring data JPA.  I had to list the 
classes individually and remove it.  

When it was there it gave an error saying to either add the <class> reference 
in or else the global exclude-unlisted-classes set to false, which was already 
there.

Original comment by [email protected] on 17 Jul 2013 at 6:44

@GoogleCodeExporter
Copy link
Author

I think this would help you.
http://flexguse.wordpress.com/2013/08/10/maven-spring-data-jpa-eclipselink-and-s
tatic-weaving/
-Salai

Original comment by [email protected] on 30 Aug 2013 at 9:32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant