Adding a repository to the settings.xml
Dear all, I have a simple spring project and I'm trying to build it with maven. But it fails because a dependency is not resolved. Here is the message I get : Missing: -- 1) org.apache.velocity.tools:velocity-tools:jar:2.0-beta1 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.velocity.tools -DartifactId=velocity-tools -Dversion=2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.apache.velocity.tools -DartifactId=velocity-tools -Dversion=2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.stephane:spring-demo-server:jar:1.0-SNAPSHOT 2) org.apache.velocity.tools:velocity-tools:jar:2.0-beta1 2) javax.transaction:jta:jar:1.0.1B Try downloading the file manually from: http://java.sun.com/products/jta Then, install it using the command: mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.stephane:spring-demo-server:jar:1.0-SNAPSHOT 2) org.hibernate:hibernate:jar:3.2.0.ga 3) javax.transaction:jta:jar:1.0.1B 3) org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.velocity.tools -DartifactId=velocity-tools-view -Dversion=2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.apache.velocity.tools -DartifactId=velocity-tools-view -Dversion=2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.stephane:spring-demo-server:jar:1.0-SNAPSHOT 2) org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1 -- 3 required artifacts are missing. I suppose I need to add a repository in my settings.xml file. At first my settings.xml file looked like : http://old.nabble.com/file/p27664272/settings.xml settings.xml So I tried this but it did not help : http://old.nabble.com/file/p27664272/new_settings.xml new_settings.xml Here is my pom.xmk file : http://old.nabble.com/file/p27664272/pom.xml pom.xml Any clue ? Thanks. -- View this message in context: http://old.nabble.com/Adding-a-repository-to-the-settings.xml-tp27664272p27664272.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: Adding a repository to the settings.xml
I'd like to have this by default. Can I have this setup outside of any profile so as not to make it profile specific ? If I can I would prefer not to have to specify a profile simply to setup a repository. -- View this message in context: http://old.nabble.com/Adding-a-repository-to-the-settings.xml-tp27664272p27666165.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: Adding a repository to the settings.xml
It seems it worked since the jar file is now looked up in the repositories listed in my settings.xml file. Downloading: http://repo2.maven.org/maven2//org/apache/velocity/tools/velocity-tools-view/2.0-beta1/velocity-tools-view-2.0-beta1.jar [INFO] Unable to find resource 'org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1' in repository maven2 (http://repo2.maven.org/maven2/) Downloading: http://www.ibiblio.org/maven//org/apache/velocity/tools/velocity-tools-view/2.0-beta1/velocity-tools-view-2.0-beta1.jar [INFO] Unable to find resource 'org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1' in repository ibiblio (http://www.ibiblio.org/maven/) Downloading: http://mvnrepository.com//org/apache/velocity/tools/velocity-tools-view/2.0-beta1/velocity-tools-view-2.0-beta1.jar [INFO] Unable to find resource 'org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1' in repository maven (http://mvnrepository.com/) Downloading: http://repo1.maven.org/maven2/org/apache/velocity/tools/velocity-tools-view/2.0-beta1/velocity-tools-view-2.0-beta1.jar [INFO] Unable to find resource 'org.apache.velocity.tools:velocity-tools-view:jar:2.0-beta1' in repository central (http://repo1.maven.org/maven2) [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. I guess I now have to find which repository hosts this velocity tools jar file. -- View this message in context: http://old.nabble.com/Adding-a-repository-to-the-settings.xml-tp27664272p27666480.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
Maven filter and hsqldb mem hibernate.hbm2ddl.auto
Hello, I have a pom.xml file with a filter for some data source properties. The filter works for the data source properties, that is, for: hibernate.dialect=org.hibernate.dialect.HSQLDialect dataSource.driverClassName=org.hsqldb.jdbcDriver dataSource.url=jdbc:hsqldb:mem:testdb dataSource.username=sa dataSource.password= and my integration test is successful. But when having also the following property in the filter file hibernate.hbm2ddl.auto=create I get an error message saying the sql statement could not be performed because the table does not exist. What happens is that HSQLDB (in memory) does not create my table before running the test, if the hibernate.hbm2ddl.auto is in the filter file instead of being hard coded in the spring hibernate factory bean. But the property hibernate.dialect does not pose such a problem. It is happily replaced by the value in the filter file. I would like to have the property hibernate.hbm2ddl.auto being replaced by the value in the filter file, so as to have a different value, when running the integration test in HSQLDB (value should be create) and when running in production (value should be validate). http://old.nabble.com/file/p28504415/spring-hibernate.xml spring-hibernate.xml http://old.nabble.com/file/p28504415/data-source.properties data-source.properties http://old.nabble.com/file/p28504415/pom.xml pom.xml -- View this message in context: http://old.nabble.com/Maven-filter-and-hsqldb-mem-hibernate.hbm2ddl.auto-tp28504415p28504415.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: Maven filter and hsqldb mem hibernate.hbm2ddl.auto
Hi Jemos, Thanks for your reply. But I wonder how come the file in the target directory shows all the properties being filtered fine. A look at the file core/target/classes/spring-hibernate.xml shows the property place holders replaced by the corresponding values. But a look at the file core/target/test-classes/spring-hibernate.xml shows that the property place holders were NOT replaced. So, the filtering works in a way that escapes me... It seems to filter something, creating a filtered file at core/target/classes/spring-hibernate.xml but not doing it for the file core/target/test-classes/spring-hibernate.xml What puzzles me is that I only run an integration test with the command: mvn clean test -Pitest Here are the generated files in the target directory, one in classes/ filtered fine and the other one in test-classes not filtered: http://old.nabble.com/file/p28505207/spring-hibernate.xml spring-hibernate.xml http://old.nabble.com/file/p28505207/spring-hibernate.xml spring-hibernate.xml -- View this message in context: http://old.nabble.com/Maven-filter-and-hsqldb-mem-hibernate.hbm2ddl.auto-tp28504415p28505207.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: Maven filter and hsqldb mem hibernate.hbm2ddl.auto
Hum... I wonder what you meant here.. -- View this message in context: http://old.nabble.com/Maven-filter-and-hsqldb-mem-hibernate.hbm2ddl.auto-tp28504415p28505451.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: Maven filter and hsqldb mem hibernate.hbm2ddl.auto
I just realized that I had attached the module pom.xml file instead of the parent one, so you could not really see the setup I have.. Here is the parent pom.xml file: http://old.nabble.com/file/p28512487/pom.xml pom.xml -- View this message in context: http://old.nabble.com/Maven-filter-and-hsqldb-mem-hibernate.hbm2ddl.auto-tp28504415p28512487.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