Search Results

Search found 8004 results on 321 pages for 'maven plugin'.

Page 13/321 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • executing a script from maven inside a multi module project

    - by Roman
    Hi everyone. I have this multi-module project. In the beginning of each build I would like to run some bat file. So i did the following: <profile> <id>deploy-db</id> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1</version> </plugin> </plugins> <pluginManagement> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1</version> <executions> <execution> <phase>validate</phase> <goals> <goal>exec</goal> </goals> <inherited>false</inherited> </execution> </executions> <configuration> <executable>../database/schemas/import_databases.bat</executable> </configuration> </plugin> </plugins> </pluginManagement> </build> </profile> when i run the mvn verify -Pdeploy-db from the root I get this script executed over and over again in each of my modules. I want it to be executed only once, in the root module. What is there that I am missing ? Thanks

    Read the article

  • Specify JDK for Maven to use

    - by DanInDC
    Hi all. I am trying to build a Hudson plugin I've modified and it requires jdk1.6. This is fine, but I don't see how I can tell maven where the different jdk is. I've found few mentions on the internet but they don't seem to apply to me. Some suggest adding some config to .m2/settings.xml but I don't have a settings.xml. Plus, I don't want to use 1.6 for all maven builds. One kink is I am using mvn in cygwin, if that matters at all. It appears I should be able to make the specification in the project pom file, but the existing pom is pretty bare. So bottom line is, is there a way to specify a jdk for a single invocation of maven?

    Read the article

  • Exec Maven Plugin to Command Line

    - by mistercaste
    I have an application developed in NetBeans/Maven that can be started via command line with: mvn exec:exec "-Dexec.executable=C:\\Java\\jdk1.6.0_33\\bin\\java.exe" "-Dexec.args=-Dlog4j.properties=... -classpath %classpath com.xxx.MyLauncher" -Dexec.classpathScope=runtime -Dexec.workingdir= Now I need to run the application through the standard java command line method, like: java -Dlog4j.properties=... -jar myapp-1.2-SNAPSHOT.jar Unfortunately this does not work in the same manner, as I get the following exception: opencard.core.util.OpenCardPropertyLoadingException: property file not found Questions: What is the difference between launching applications with the Exec-Maven-plugin and the standard java execution on command line? Is there an easy way to convert a Maven execution script to a standard command line? How to run the application succesfully?

    Read the article

  • Activate different Maven profiles depending on current module?

    - by Yaba
    We have a multi module build with modules using different technologies, like Java and Flex. Is it somehow possible to activate different profiles based on the module that is compiled currently? I tried it with an activation like <profile> <id>flex</id> <activation> <file> <exists>${basedir}/src/main/flex</exists> </file> </activation> ... </profile But it didn't work, although the use of ${basedir} is documented in the Maven documentation (this is a bug in Maven). Is there a different possibility to have different activations based on the current module? Or does Maven only allow to activate a profile for all modules or not at all?

    Read the article

  • Hudson can't find local maven repository (including 3rd party jars)

    - by MH
    Hi all, I have created a Maven2 project. Everything works fine. Now, I have set up a Hudson project in order to make nightly builds possible. Hudson should check out the current project state from a Subversion repository, run the tests, build the project and deploy everyting to a repository. My Subversion repositroy contains my Maven2 project but no jars located in my local Maven repository (.m2). That's probably why hudson finishes with a failure, saying that some 3rd party jars are't available. Here, I have to say that there are some jars in my local Maven repository (.m2), which aren't available in any Maven repositories. Hence, there is no possibility to download these jars. Has Hudson the ability to connect to the local .m2 repository? Or is there another way to make these jar files available to Hudson? Thanks a million in advance for your help.

    Read the article

  • maven-archetype-webapp eclipse problem

    - by Bruce
    Hi all, I'm trying to create a very simple webapp with maven and eclipse, but I'm having no joy at all, in fact the reverse of joy. I go to File - New Project, select Maven Project, and select the maven-archetype-webapp. When I finish the wizard, a webapp structure gets generated but with no 'java' directory under main, just resources and webapp. So I right click on main and select new Class. The class gets created under resources (?!), and furthermore, there seems to be no compilation of it by java. I can make stupid errors and no syntax highlighting comes up. It's like java isn't recognizing it. Alternatively I have tried creating a new 'java' directory under main where it should be, but still with the same non-existent java symptoms. What gives? This is driving me insane.. Thanks all!

    Read the article

  • Setting up Maven for a team

    - by Bytecode Ninja
    I have used Maven extensively for my personal projects, but now I have to set it up for a small team of 5-7 developers. My main question is, what's the recommended approach for managing dependencies to commercial libraries that are not available in the Maven repos? How can I manage the dependency of these commercial libraries on the open source libraries that they use and are available in Maven repos? Also, are there any other recommendations and advices that I should know or implement to make the setup as efficient, effective, and smooth as possible? Thanks in advance.

    Read the article

  • Debugging maven junit tests with filtered resources?

    - by hstoerr
    We are using filtered testResources in JUnit-tests that are usually executed by the maven surefire plugin. That is, the pom contains a section <build> <testResources> <testResource> <directory>src/test/resources</directory> <filtering>true</filtering> </testResource> </testResources> ... How can I run such JUnit-tests in the debugger? If I execute the tests in eclipse the tests fail since the test resources are not filtered. If the filtered test resources would be written somewhere into the target directory, I could just use this as an additional source path - but this is not the case. If I try to run the maven build in eclipse with Debug As / maven test , the build does not stop in the breakpoints. Any other ideas?

    Read the article

  • Using Maven shade plugin in a multi module project

    - by Manoj
    I have a scenario where-in I need to create an uber jar of a multi module maven project including all modules and their dependencies. I tried using maven shade plugin. but it seems to work only when I use it at the module level. If I add the plugin entry in parent pom then the build breaks (it tries to shade the parent pom) [INFO] Replacing original artifact with shaded artifact. [INFO] Replacing null with C:\Projects\foo.bar\target\foobar-0.0.1-SNAPSHOT-shaded.pom [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error creating shaded jar: null It does seem to make sense since the <packaging> for the parent maven project is pom. But there should be some way to create an uber jar for a multi module project... Any ideas people???

    Read the article

  • Maven - add dependency on artifact source

    - by Jacob Hansson
    I have two maven modules, one that ends up as a jar, and one war that depends on that jar. I want the jar module to package it's source code together with the compiled classes in the jar, so that the second module is able to access it. I have tried using the maven-source-plugin, but I am confused as to how to add a dependency on the output of that. It seems that the dependency by default goes to the compiled jar, and not the source-code jar (ending with "-source.jar") that maven-source-plugin creates. How do I add the "-source.jar" as a dependency, while still preserving the dependency on the compiled sources?

    Read the article

  • Maven workspace resolution horked

    - by user237815
    I'm using m2eclipse to manage maven projects. Somehow I did a bad thing, and now the system is behaving as if workspace resolution is disabled. I have several projects that depend on a main project. This project has a version of 4.0-SNAPSHOT, and all the dependent projects reference it in the dependencies section of their poms. Everything was working fine until I created an entirely new project and mistakenly copied the pom from the main project into the new project. Suddenly, all of the dependent projects got the error: "The container 'Maven Dependencies" references non existing library C:\users\myusername.m2\com\mydomain\myproject\4.0-SNAPSHOT\myproject-4.0-SNAPSHOT.jar I zapped the offending new project, but the error remains for all the dependent projects. I've made no changes (to my knowledge) in the main project or any of the dependent projects, so I'm guessing something got changed in the Eclipse environment. Does m2eclipse or Maven itself maintain settings anywhere that I can blow away?

    Read the article

  • Customized generation/filtering resources with maven

    - by zamza
    I wonder what is the Maven way in my situation. My application has a bunch of configuration files, let's call them profiles. Each profile configuration file is a *.properties file, that contains keys/values and some comments on these keys/values semantics. The idea is to generate these *.properties to have unified comments in all of them. My plan is to create a template.properties file that contains something like #Comments for key1/value1 key1=${key1.value} #Comments for key2/value2 key2=${key2.value} and a bunch of files like #profile_data_1.properties key1.value=profile_1_key_1_value key2.value=profile_1_key_2_value #profile_data_2.properties key1.value=profile_2_key_1_value key2.value=profile_2_key_2_value Then bind to generate-resources phase to create a copy of template.properties per profile_data_*, and filter that copy with profile_data_*.properties as a filter. The easiest way is probably to create an ant build file and use antrun plugin. But that is not a Maven way, is it? Other option is to create a Maven plugin for that tiny task. Somehow, I don't like that idea (plugin deployment is not what I want very much).

    Read the article

  • How to execute maven tasks in eclipse (Sonatype plugin)

    - by Bruce
    Hi all I know it must be something simple, but I just can't figure it out.. I'm using the Sonatype maven plugin on eclipse. When I want to build a war file for a webapp project, the only way I know to do it is to use the command line and type mvn package. I've looked all through the right click menu and I can't find any way to do it from eclipse. There's a maven submenu that seems to have no options to do with building, and there's a run menu that doesn't seem right - I don't want to run my project - I just want to build it. There is a maven build option in the run menu, but if I run it, a configuration window pops up for me to enter goals in.. How I do I just do a simple mvn package, but through gui? What am I missing? Thanks!

    Read the article

  • Why maven is not working in eclipse indigo?

    - by user1067665
    I'm trying to make a simple log in/ log out web application with maven and I'm creating the project with the command: " mvn archetype:generate " and choose 341 and it'll be created with the structure below: webapp -----src/main/java -----Referenced Libraries -----Maven Dependencies -----src -----target pom.xml But when I add some dependencies and update the project something weird happening with the structure of the project according to the picture below: webapp -----src/main/java -----Referenced Libraries -----JRE System Library -----src -----target pom.xml and it's not working any more. As you can see the the first one has a Maven dependencies Library but the second one has been changed to JRE System Library. I use mac os lion and eclipse indigo. Anyone how knows why is like that? Tancks

    Read the article

  • Installing paperclip plugin

    - by mnml
    I'm trying to install the paperclip plugin with the following command: ruby script/plugin install git://github.com/thoughtbot/paperclip.git But I'm getting some errors: ruby script/plugin install git://github.com/thoughtbot/paperclip.git --force svn: '/home/app/vendor/plugins' is not a working copy /usr/lib/ruby/1.8/open-uri.rb:32:in `initialize': No such file or directory - git://github.com/thoughtbot/paperclip.git (Errno::ENOENT) from /usr/lib/ruby/1.8/open-uri.rb:32:in `open_uri_original_open' from /usr/lib/ruby/1.8/open-uri.rb:32:in `open' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:863:in `fetch_dir' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:857:in `fetch' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:856:in `each' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:856:in `fetch' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:219:in `install_using_http' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:169:in `send' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:169:in `install' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:734:in `parse!' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:732:in `each' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:732:in `parse!' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:447:in `parse!' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:463:in `parse!' from ./script/../config/../vendor/rails/railties/lib/commands/plugin.rb:871 from script/plugin:3:in `require' from script/plugin:3 Is it because I'm using a old rails version?

    Read the article

  • Maven. How to include specific folder or file when assemblying project depending on is it dev build or production?

    - by user563588
    Using maven-assembly-plugin <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.1</version> <configuration> <descriptors> <descriptor>descriptor.xml</descriptor> </descriptors> <finalName>xxx-impl-${pom.version}</finalName> <outputDirectory>target/assembly</outputDirectory> <workDirectory>target/assembly/work</workDirectory> </configuration> in descriptor.xml file we can specify <fileSets> <fileSet> <directory>src/install</directory> <outputDirectory>/</outputDirectory> </fileSet> </fileSets> Is it possible to include specific file from this folder or sub-folder depending on profile? Or some other way... Like this: <profiles> <profile> <id>dev</id> <activation> <activeByDefault>false</activeByDefault> </activation> <build> <resources> <resource> <directory>src/install/dev</directory> <includes> <include>**/*</include> </includes> </resource> </resources> </build> </profile> <profile> <id>prod</id> <build> <resources> <resource> <directory>src/install/prod</directory> <includes> <include>**/*</include> </includes> </resource> </resources> </build> </profile> </profiles> But it puts resources in jar when packaging. But we need to put it in zip when assemblying as I already mentioned above :( Thanks!

    Read the article

  • Looking for a AutoZoom browser plugin

    - by AngryHacker
    I have a pretty large 24" wide screen with a pretty high resolution. When I browse, some sites have a fixed layout and there is basically a narrow column. So I typically zoom in to the point just before the level where I have to scroll horizontally. Is there a browser plugin that auto-zooms in (or via a button or gesture or whatever) to the max available real estate? I'd prefer a plugin for Chrome, but Firefox will do too.

    Read the article

  • Using maven to generate an ear file for ADF...?

    - by Zombies
    I am noticing that Oracle ADF has its own EAR structure. There is an adf folder created like so, inside the EAR, along with the WAR file and standard META-INF directory is this 'adf' directory: adf /com /companypackagehere bc4j.xcfg /META-INF adf-config.xml connections.xml Must I recreate this using file moves...?

    Read the article

  • Errors rose when a Netbean Maven Project tries to run

    - by Zakaria
    Hi everybody, I installed NetBeans 6.8 on Vista and and I'm trying to execute a simple Maven Project. When I ran the project, I got this set of errors: WARNING: You are running embedded Maven builds, some build may fail due to incompatibilities with latest Maven release. To set Maven instance to use for building, click here. Scanning for projects... [#process-resources] [resources:resources] Using default encoding to copy filtered resources. [#compile] [compiler:compile] Nothing to compile - all classes are up to date [exec:exec] [EL Info]: 2010-04-04 18:22:54.907--ServerSession(15532856)--EclipseLink, version: Eclipse Persistence Services - 2.0.0.v20091127-r5931 [EL Severe]: 2010-04-04 18:22:54.929--ServerSession(15532856)--Local Exception Stack: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Exception in thread "main" javax.persistence.PersistenceException: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found. Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found. at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82) at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:392) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195) at com.mycompany.chapter2_ex1.Main.main(Main.java:31) Caused by: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found. at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368) at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151) at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at com.mycompany.chapter2_ex1.Main.main(Main.java:31) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368) ... 4 more [ERROR]The following mojo encountered an error while executing: [ERROR]Group-Id: org.codehaus.mojo [ERROR]Artifact-Id: exec-maven-plugin [ERROR]Version: 1.1.1 [ERROR]Mojo: exec [ERROR]brought in via: Direct invocation [ERROR]While building project: [ERROR]Group-Id: com.mycompany [ERROR]Artifact-Id: chapter2_ex1 [ERROR]Version: 1.0-SNAPSHOT [ERROR]From file: C:\Users\Charlotte\Documents\NetBeansProjects\chapter2_ex1\pom.xml [ERROR]Reason: Result of cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_11\bin\java.exe" -classpath C:\Users\Charlotte\Documents\NetBeansProjects\chapter2_ex1\target\classes;C:\Users\Charlotte\.m2\repository\javax\persistence\persistence-api\1.0\persistence-api-1.0.jar;C:\Users\Charlotte\.m2\repository\org\eclipse\persistence\javax.persistence\2.0.0\javax.persistence-2.0.0.jar;C:\Users\Charlotte\.m2\repository\org\eclipse\persistence\eclipselink\2.0.0-RC1\eclipselink-2.0.0-RC1.jar com.mycompany.chapter2_ex1.Main" execution is: '1'. ------------------------------------------------------------------------ For more information, run with the -e flag ------------------------------------------------------------------------ BUILD FAILED ------------------------------------------------------------------------ Total time: 3 seconds Finished at: Sun Apr 04 18:22:55 CEST 2010 Final Memory: 47M/94M ------------------------------------------------------------------------ Theses exceptions rose even if I can run the database by using the console (ij) and when I connect the Database, no errors are showing. Can you help me please? Thank you very much. Regards.

    Read the article

  • Maven2 multi-module ejb 3.1 project - deployment error

    - by gerry
    The problem is taht I get the following error qhile deploying my project to Glassfish: java.lang.RuntimeException: Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging But, let us start on how the project structure looks like in Maven2... I've build the following scenario: MultiModuleJavaEEProject - parent module - model --- packaged as jar - ejb1 ---- packaged as ebj - ejb2 ---- packaged as ebj - web ---- packaged as war So model, ejb1, ejb2 and web are children/modules of the parent MultiModuleJavaEEProject. _ejb1 depends on model. _ejb2 depends on ejb1. _web depends on ejb2. the pom's look like: _parent: <?xml version="1.0" encoding="UTF-8"?> <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>org.dyndns.geraldhuber.testing</groupId> <artifactId>MultiModuleJavaEEProject</artifactId> <packaging>pom</packaging> <version>1.0</version> <name>MultiModuleJavaEEProject</name> <url>http://maven.apache.org</url> <modules> <module>model</module> <module>ejb1</module> <module>ejb2</module> <module>web</module> </modules> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.7</version> <scope>test</scope> </dependency> </dependencies> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ejb-plugin</artifactId> <version>2.2</version> <configuration> <ejbVersion>3.1</ejbVersion> <jarName>${project.groupId}.${project.artifactId}-${project.version}</jarName> </configuration> </plugin> </plugins> </pluginManagement> </build> </project> _model: <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> <parent> <groupId>testing</groupId> <artifactId>MultiModuleJavaEEProject</artifactId> <version>1.0</version> </parent> <artifactId>model</artifactId> <packaging>jar</packaging> <version>1.0</version> <name>model</name> <url>http://maven.apache.org</url> </project> _ejb1: <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> <parent> <groupId>testing</groupId> <artifactId>MultiModuleJavaEEProject</artifactId> <version>1.0</version> </parent> <artifactId>ejb1</artifactId> <packaging>ejb</packaging> <version>1.0</version> <name>ejb1</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.ejb</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>testing</groupId> <artifactId>model</artifactId> <version>1.0</version> </dependency> </dependencies> </project> _ejb2: <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> <parent> <groupId>testing</groupId> <artifactId>MultiModuleJavaEEProject</artifactId> <version>1.0</version> </parent> <artifactId>ejb2</artifactId> <packaging>ejb</packaging> <version>1.0</version> <name>ejb2</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.ejb</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>testing</groupId> <artifactId>ejb1</artifactId> <version>1.0</version> </dependency> </dependencies> </project> _web: <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>MultiModuleJavaEEProject</artifactId> <groupId>testing</groupId> <version>1.0</version> </parent> <groupId>testing</groupId> <artifactId>web</artifactId> <version>1.0</version> <packaging>war</packaging> <name>web Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.ejb</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>testing</groupId> <artifactId>ejb2</artifactId> <version>1.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.0</version> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> </archive> </configuration> </plugin> </plugins> <finalName>web</finalName> </build> </project> And the model is just a simple Pojo: package testing.model; public class Data { private String data; public String getData() { return data; } public void setData(String data) { this.data = data; } } And the ejb1 contains only one STATELESS ejb. package testing.ejb1; import javax.ejb.Stateless; import testing.model.Data; @Stateless public class DataService { private Data data; public DataService(){ data = new Data(); data.setData("Hello World!"); } public String getDataText(){ return data.getData(); } } As well as the ejb2 is only a stateless ejb: package testing.ejb2; import javax.ejb.EJB; import javax.ejb.Stateless; import testing.ejb1.DataService; @Stateless public class Service { @EJB DataService service; public Service(){ } public String getText(){ return service.getDataText(); } } And the web module contains only a Servlet: package testing.web; import java.io.IOException; import java.io.PrintWriter; import javax.ejb.EJB; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import testing.ejb2.Service; public class SimpleServlet extends HttpServlet { @EJB Service service; public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println( "SimpleServlet Executed" ); out.println( "Text: "+service.getText() ); out.flush(); out.close(); } } And the web.xml file in the web module looks like: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>Archetype Created Web Application</display-name> <servlet> <servlet-name>simple</servlet-name> <servlet-class>testing.web.SimpleServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>simple</servlet-name> <url-pattern>/simple</url-pattern> </servlet-mapping> </web-app> So no further files are set up by me. There is no ejb-jar.xml in any ejb files, because I'm using EJB 3.1. So I think ejb-jar.xml descriptors are optional. I this right? But the problem is, the already mentioned error: java.lang.RuntimeException: Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging Can anybody help?

    Read the article

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

    - by Abhijit Hukkeri
    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> <artifactId>common-dataobject</artifactId> <packaging>jar</packaging> <name>common-dataobject</name> <version>1.0</version> <dependencies> </dependencies> <build> <plugins> <plugin> <groupId>org.jibx</groupId> <artifactId>maven-jibx-plugin</artifactId> <version>1.2.1</version> <configuration> <directory>src/main/resources/jibx_mapping</directory> <includes> <includes>binding.xml</includes> </includes> <verbose>false</verbose> </configuration> <executions> <execution> <goals> <goal>bind</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>make-business-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <appendAssemblyId>false</appendAssemblyId> <finalName>flight-dto</finalName> <descriptors> <descriptor>src/main/assembly/car-assembly.xml</descriptor> </descriptors> <attach>true</attach> </configuration> </execution> <execution> <id>make-gui-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <appendAssemblyId>false</appendAssemblyId> <finalName>app_gui</finalName> <descriptors> <descriptor>src/main/assembly/bike-assembly.xml</descriptor> </descriptors> <attach>true</attach> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> Here is my assembly file <assembly> <id>app_business</id> <formats> <format>jar</format> </formats> <baseDirectory>target</baseDirectory> <includeBaseDirectory>false</includeBaseDirectory> <fileSets> <fileSet> <directory>${project.build.outputDirectory}</directory> <outputDirectory></outputDirectory> <includes> <include>com/dataobjects/**</include> </includes> </fileSet> </fileSets> </assembly>

    Read the article

  • jetty-blazeds and maven (com.adobe.flex#flex-messaging-core missing)

    - by Ali
    Hi all, I want to setup jetty with jetty-blazeds extension. Everything looks fine but when I run maven to get the dependencies, I get: UNRESOLVED DEPENDENCIES com.adobe.flex#flex-messaging-core;3.2.0: not found com.adobe.flex#flex-messaging-common;3.2.0: not found Does anyone know a maven repository that contains these dependencies ? Thank you, -A

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >