pom.xml clarification; new to Maven
Hello, As stated I'm new to Maven and have been reading a getting started guide. I'm trying to learn Maven because I want to use i-Jetty (for Android webapps). At first I had no idea what the provided pom.xml file meant but I think I understand it so if I'm not correct then please correct me. I'm going to post a snippet to make sure I understand what is going on. The artifacts are like jars posted to a central repository such as the exec-maven-plugin used in the snippet below. What I don't understand is the variables they used below under the configuration tag: ${android.home}. Where would these variables be defined? For now I'm following the simple webapp for Android so no libraries for Android are called but if I used any I would have a with and artifactId for Android, correct? SNIPPET --- org.codehaus.mojo exec-maven-plugin 1.1 generate-dex process-classes exec ${android.home}/${android-platform}/tools/dx --dex --verbose --core-library --output=${project.build.directory}/classes.dex --positions=lines ${project.build.directory}/classes/ I will be importing the project into Eclipse which gives errors for some unresolved calls, but they will be resolved when I compile with mvn? Thanks, I will surely be asking more Chris -- View this message in context: http://old.nabble.com/pom.xml-clarification--new-to-Maven-tp28823522p28823522.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
Packaged jar cannot access class of a dependency??
Hi all, I'm trying to test out db4o (new to db in general) and so I created a new project to test dumping some random data in. I use three classes import com.db4o.ObjectContainer; import com.db4o.ObjectSet; import com.db4o.cs.Db4oClientServer; In my pom.xml I include the db4o repository and the dependency, I wasn't able to connect to the repository at one point so I installed it to my local repo and everything was building.. When I goto run the jar I get an class not found exception with Db4oClientServer, I searched threw the db4o jar and the class is in there... Here's the error: bash-3.2$ java -jar Db4oServer.jar Running server test... Exception in thread "main" java.lang.NoClassDefFoundError: com/db4o/cs/Db4oClientServer at myTest.db4o.client.TestClient.test(TestClient.java:32) at myTest.db4o.client.TestClient.main(TestClient.java:22) Caused by: java.lang.ClassNotFoundException: com.db4o.cs.Db4oClientServer at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 2 more I don't know what I messed up but it doesn't like something. When I search through the jar maven packaged I only see my classes, is the db4o jar supposed to be included as well? Can someone help me out? Thanks! -- View this message in context: http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315587.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: Packaged jar cannot access class of a dependency??
I thought maven would include the db4o jar in my project jar? If I specify -classpath and point to db4o.jar then java can't find my test class. bash-3.2$ java -classpath ./db4o-8.0.184.15484-all-java5.jar -jar Db4oServer.jar Does not even run.. -- View this message in context: http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315628.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: Packaged jar cannot access class of a dependency??
Thanks for replying with the link, I've already included the main class in my pom Majority of my pom Db4oServer maven-compiler-plugin 1.5 1.5 org.apache.maven.plugins maven-jar-plugin ${groupId}.TestClient ${groupId} development ${pom.url} maven-assembly-plugin ${groupId}.TestClient jar-with-dependencies -- View this message in context: http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315651.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: Packaged jar cannot access class of a dependency??
What confuses me is that it doesn't complain about the other two classes, ObjectContainer and ObjectSet? -- View this message in context: http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315664.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: Packaged jar cannot access class of a dependency??
Thanks for the link, I'll look into it. I want to create a library that will handle everything for me so I can pass it an Object to store, I need to test the client first to make sure it can store.. -- View this message in context: http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4328333.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: Packaged jar cannot access class of a dependency??
I added a tag and it included the classpath in the manifest, I thought I was getting somewhere but still get the same error.. I ended up using a new eclipse project and copying my stuff over and exporting as exec jar and it works... -- View this message in context: http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4328511.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