maven-2

spring - hibernate load *.hbm.xml from classpath resource

别来无恙 提交于 2019-12-01 18:53:00
I have some hbm.xml files in classpath resource located in src/main/resources maven's folder. I used spring's LocalSessionFactoryBean to load these files with the following bean config: <bean id="hibernateSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSourceOracle"/> <property name="mappingResources"> <list> <value>mapping/SystemUser.hbm.xml</value> <value>mapping/SystemCredential.hbm.xml</value> <value>mapping/SystemProvince.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <value> hibernate

mvn package fails with Required Artifact Missing even though it exists in my Remote Repository

社会主义新天地 提交于 2019-12-01 18:20:26
I'm trying to run mvn clean package on my Maven project and it fails with the message: "required artifact is missing" for the artifact net.ezswitch:ResourcesComponent:jar:0.0.14 I've configured my settings.xml to include my Remote Repository and if I navigate, on my browser, I can actually find this Jar in my repository, but Maven can't, somehow. I've checked that the Maven version that I'm running is the one for which the settings.xml file that I've edited takes effect, because if I disable the Profile that I configured there, Maven fails with a different message. I'm using Maven 2.2.1 on MAC

Maven: avoid deploying project package-implied artifact during standard build lifecycle

我与影子孤独终老i 提交于 2019-12-01 18:01:37
Is it possible to avoid deploying the artifact that is built according to the project packaging during 'deploy:deploy' processing? I mean the following: suppose we have a 'pom.xml' for web application and define packaging type as 'war' ; we want to assemble either '*.war' artifact or '*.zip' that contains our application as well as a servlet container; we want to deploy only that '*.zip' artifact during 'deploy:deploy' processing; I.e. I want to be able to run 'mvn deploy' and has the following results: 'myapp.war' is constructed; 'myapp-standalone.zip' is constructed; 'myapp-standalone.zip'

Resolving Maven circular dependencies between test, testhelper, and project-under-test

流过昼夜 提交于 2019-12-01 17:58:12
my set up is this. I have project A , and a test project depending on A : A <- A_t I also have other projects depending on A (and their tests): A <- B <- B_t To simplify some of the testing I introduce a new library helping test stuff based on A : A <- Atesthelper So A_t (and B_t ) will depend on this test helper, like this: A <- A_t ^ | | v Atesthelper However when I create Maven projects (pom.xml) it seems the usual thing is to bundle both the project and the test of that project in the same pom.xml. And I create a new pom.xml for the Atesthelper So now it becomes: (A <- A_t) ^ | | v

Maven Error reading assemblies: No assembly descriptors found

為{幸葍}努か 提交于 2019-12-01 17:49:47
问题 Following this Guide I ran the command mvn assembly:assembly and got the Build Failure of Error reading assemblies: No assembly descriptors found. I've looked at numerous questions on this, but to no avail. From this post, I created a .xml with this inside: <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http:/

Struts2 Error when Deploying: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory

感情迁移 提交于 2019-12-01 17:13:21
I'm creating a basic Struts2, Maven webApp and getting this error when I deploy to Tomcat 6 or Jetty. Has anyone seen this? 2010-07-29 15:33:38.801::WARN: failed struts2 Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/workspaces/test/test/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101) at com

Resolving Maven circular dependencies between test, testhelper, and project-under-test

怎甘沉沦 提交于 2019-12-01 17:12:35
问题 my set up is this. I have project A , and a test project depending on A : A <- A_t I also have other projects depending on A (and their tests): A <- B <- B_t To simplify some of the testing I introduce a new library helping test stuff based on A : A <- Atesthelper So A_t (and B_t ) will depend on this test helper, like this: A <- A_t ^ | | v Atesthelper However when I create Maven projects (pom.xml) it seems the usual thing is to bundle both the project and the test of that project in the

Child not finding parent pom in flat structured multi module maven build

跟風遠走 提交于 2019-12-01 17:10:09
I'm setting up a multi module project with a flat structure, i.e. parent and child are in the same base directory. Parent is defined as <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>company</groupId> <artifactId>parent</artifactId> <packaging>pom</packaging> <version>1-0-SNAPSHOT</version> <name>child</name> <modules> <module>../child</module> </modules> (...) while the child it defined as

How to use javadoc:aggregate properly in multi-module maven project?

放肆的年华 提交于 2019-12-01 17:08:26
This is my parent pom.xml file (part of it) in a multi-module project: ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> </plugins> </build> ... This plugin is inherited in all sub-modules and I don't think it's a correct approach. When I'm running mvn javadoc:aggregate the documentation is generated in target/site/apidoc , but the log is full of warnings: ... [WARNING] Removing: aggregate from forked lifecycle, to prevent recursive invocation. ... What am I doing wrong? You need to enable aggregation for this

Struts2 Error when Deploying: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory

二次信任 提交于 2019-12-01 16:52:16
问题 I'm creating a basic Struts2, Maven webApp and getting this error when I deploy to Tomcat 6 or Jetty. Has anyone seen this? 2010-07-29 15:33:38.801::WARN: failed struts2 Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/workspaces/test/test/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208) at org.apache