maven-2

How to get hibernate3-maven-plugin hbm2ddl to find JDBC driver?

你说的曾经没有我的故事 提交于 2019-12-06 12:45:17
问题 I have a Java project I am building with Maven. I am now trying to get the hibernate3-maven-plugin to run the hbm2ddl tool to generate a schema.sql file I can use to create the database schema from my annotated domain classes. This is a JPA application that uses Hibernate as the provider. In my persistence.xml file I call out the mysql driver: <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/> <property name="hibernate.connection.driver_class" value="com.mysql

Is it possible to read a properties file from all .war files deployed in a JBoss container

风流意气都作罢 提交于 2019-12-06 12:12:12
I've managed to deploy a .war to the Jboss web container containing and read the pom.properties located under /META-INF/groupid-dir/artifactid-dir/ To access the file I've used the following code inside a JSP in the same war: ServletContext servletContext = getServletConfig().getServletContext(); InputStream in = servletContext.getResourceAsStream("META-INF/maven/groupid-dir/artifactid-dir/pom.properties"); This works just fine. But I want to be able to dynamically read pom.propertes from ALL .war deployed in the container. Is this possible or do I only have access to the context for the one

Using Maven to run a WAR dynamically in Tomcat, how does one add classpath entries so only Tomcat sees them?

自古美人都是妖i 提交于 2019-12-06 11:31:14
Scenario is such: I have a webapp that I'd like to run dynamically with the tomcat-maven-plugin's tomcat:run goal . The wrinkle is that I have numerous classpath resources that need to differ between the packaged artifact and the one run off a local workstation. Failed Attempts: 1.) My first attempt was to use the builder-helper-maven-plugin, but it won't work because the target configuration files will (inconsistently!) work their way into the packaged WAR archive. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.3</version>

Java maven development slow

纵然是瞬间 提交于 2019-12-06 10:17:04
问题 I am developing a war/java website that is built via maven. Currently, I have to make changes... tell maven to build them... then deploy to Tomcat. This is around 40seconds . So every change I make, I have to wait >=40seconds to see the change. This is becoming very frustrating, so I have tried to speed up the deployment. I deployed the site via maven with war:exploded. Now, I edit the files live in 'deployed' format. The problem being I will need to move these changes back to the source

How to stop Maven renaming installed jars

二次信任 提交于 2019-12-06 08:42:52
问题 I am installing to Maven repository our internal files using mvn install:install command. All Jars installed in such way have version name added automatically as a suffix. Since we have many batch scripts with the Jars names it is very inconvenient for us. How this auto-renaming can be switched off? 回答1: You can't. Dependency resolution in Maven works because Maven has conventions and the naming of artifacts is one of them. So you can't turn off the way maven install artifacts (and you

Maven Grails Plugin Environment

隐身守侯 提交于 2019-12-06 07:59:24
how do I specify build goals like development, test or production environment in the maven grails plugin when packaging a war file for deployment? Thanks You can also set it in the <configuration> section <plugin> <groupId>org.grails</groupId> <artifactId>grails-maven-plugin</artifactId> <version>1.3.7</version> <executions> <execution> <goals> <goal>maven-war</goal> </goals> <configuration> <env>prod</env> </configuration> </execution> </executions> </plugin> Set grails.env when running maven: mvn package -Dgrails.env=development If you omit this option, the environment defaults to production

Is there a way to disable the local maven repository?

若如初见. 提交于 2019-12-06 07:44:29
This may sound crazy but we have our developers all working on the same Linux machine, this machine also has nexus installed as our maven repo. Effectively everyone ends up with artefacts in their ~/.m2/ folder which are also duplicated in the nexus server. Is it possible to simply tell maven to only look at the artefacts in nexus? I have for the moment set the property <localRepository>/path/to/global/repo</localRepository> in our global maven config, but unsure if this could cause a problem if two users are grabbing the same file at the same time. We do this because the company won't buy us

How to publish multiple jar files to maven on a clean install

五迷三道 提交于 2019-12-06 07:43:19
问题 I have a used the maven assembly plugin to create multiple jar from one jar now the problem is that I have to publish these jar to the local repo, just like other maven jars publish by them self when they are built maven clean install how will I be able to do this here is my pom file <project> <parent> <groupId>parent.common.bundles</groupId> <version>1.0</version> <artifactId>child-bundle</artifactId> </parent> <modelVersion>4.0.0</modelVersion> <groupId>common.dataobject</groupId>

How to configure a longer version Number in artifactory

南楼画角 提交于 2019-12-06 07:28:08
问题 The version-numbers for our jars have to be longer them x.x.x. We would rather need x.x.x.x to integrate some old-fashioned self-made mechanism. This is, because we tag our software with x.x.x and as soon as we have a delivery to a customer one specific jar has to be build exactly at this point of time to fit to another backend, which communicates with our program. For that reason this one jar has the version 2.3.4.1, when generated and in next delivery of the same Version it is build and

How can I see jboss console with maven

半世苍凉 提交于 2019-12-06 07:25:39
I started jboss-5.1.0.GA server with maven2, is there a possibility that I can see what is happening in the console. I'm using eclipse plugin to run maven. Is it possible to see console in eclipse or elsewhere? Here is what I mean by console : Is it possible to see this output somewhere? I took this screen shot when manually running jboss. When I start the server with maven here is what I get : [INFO] [war:war] [INFO] Packaging webapp [INFO] Assembling webapp[snrf] in [C:\HOME\c0mrade\Workspaces\Eclipse 3.5 Classic\snrf\target\0.0.1-SNAPSHOT] [INFO] Processing war project [INFO] Webapp