Hi Martin, As I undestand, I shoud have many pom.xml, every new folders shoud have its pom.xml?
2011/6/22 Martin Gainty <[email protected]> > > most of us on the list are build engineers (Wes and Lukaz for sure) so i'll > take the liberty of answering this: > you'll want to segregate src/main/java/com.mycampany.beans from > src/main/java/com.mycampany.beans and setup pom for each artifact in > separate folders: > > in your beans folder: > <?xml version="1.0" encoding="UTF-8"?> > <!-- > /* > * $Id: pom.xml 1048956 2010-12-14 06:52:13Z lukaszlenart $ > * > * Licensed to the Apache Software Foundation (ASF) under one > * or more contributor license agreements. See the NOTICE file > * distributed with this work for additional information > * regarding copyright ownership. The ASF licenses this file > * to you under the Apache License, Version 2.0 (the > * "License"); you may not use this file except in compliance > * with the License. You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * Unless required by applicable law or agreed to in writing, > * software distributed under the License is distributed on an > * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > * KIND, either express or implied. See the License for the > * specific language governing permissions and limitations > * under the License. > * this license will keep the lawyers away > */ > --> > <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> > <!-- if there is ANYTHING you need from a parent pom include your parent > pom here --> > <!-- if you dont need any attributes from parent dont include parent > configuration --> > <parent> > <groupId>org.apache.struts</groupId> > <artifactId>struts2-apps</artifactId> > <version>2.2.1.1</version> > </parent> > <groupId>com.mycampany</groupId> > <artifactId>beans</artifactId> > <version>1.0</version> > </project> > mvn -e -X compile > mvn -e -X package > mvn -e -X install:install-file -DgroupId=com.mycampany -DartifactId=beans > -Dversion=1.0 -Dfile=pom.xml -Dpackaging=pom > mvn -e -X deploy:deploy-file -DgroupId=com.mycampany -DartifactId=beans > -Dversion=1.0 -Dfile=beans-1.0.jar -Dpackaging=jar -url > file:///C:/m2-repo > > where C:/m2-repo is location of local maven repository > > in your services folder: > once the beans are installed you can reference the service create another > folder and recursive copy the contents to that folder: > <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> > <!-- if there is ANYTHING you need from a parent pom include the parent > pom here --> > <!-- if not dont include parent to /parent --> > <parent> > <groupId>org.apache.struts</groupId> > <artifactId>struts2-apps</artifactId> > <version>2.2.1.1</version> > </parent> > <groupId>com.mycampany</groupId> > <artifactId>services</artifactId> > <version>1.0</version> > <dependencies> > <dependency> > <groupId>com.mycampany</groupId> > <artifactId>beans</artifactId> > <version>1.0</version> > </dependency> > </dependencies> > </project> > mvn -e -X compile > mvn -e -X package > mvn -e -X install:install-file -DgroupId=com.mycampany -DartifactId=service > -Dversion=1.0 -Dfile=pom.xml -Dpackaging=pom > mvn -e -X deploy:deploy-file -DgroupId=com.mycampany -DartifactId=service > -Dversion=1.0 -Dfile=services-1.0.jar -Dpackaging=jar -url > file:///C:/m2-repo > > http://maven.apache.org/plugins/maven-install-plugin/ > http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html > you can execute install and deploy plugins together but it is best to > execute one at a time if there are errors or exceptions > Martin Gainty > ______________________________________________ > Jogi és Bizalmassági kinyilatkoztatás/Verzicht und > Vertraulichkeitanmerkung/Note de déni et de confidentialité > > > Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy > jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése > nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi > alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen > megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet > tartalma miatt. > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht > dient lediglich dem Austausch von Informationen und entfaltet keine > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le > destinataire prévu, nous te demandons avec bonté que pour satisfaire > informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie > de ceci est interdite. Ce message sert à l'information seulement et n'aura > pas n'importe quel effet légalement obligatoire. Étant donné que les email > peuvent facilement être sujets à la manipulation, nous ne pouvons accepter > aucune responsabilité pour le contenu fourni. > > > > > > Date: Wed, 22 Jun 2011 08:30:36 -0400 > > Subject: [OT] Re: adding more package via Maven > > From: [email protected] > > To: [email protected] > > > > Are you aware there's a Maven mailing list? > > > > You may need to be a bit more specific with what you're trying to do > > as well--is something going wrong? What behavior are you seeing, and > > how does it differ from what you expect? > > > > Dave > > > > On Wed, Jun 22, 2011 at 8:24 AM, Mohamed SIDI <[email protected]> > wrote: > > > Hello there, > > > > > > I apologize to post this issue here in this maling list witch is > reserved > > > for Struts issues, > > > > > > I'm working on a Maven2's project, I would like to add a new package, > my > > > current architecure look like : > > > > > > src/main/java/com.mycampany.beans > > > > > > I want to add via maven the package > /src/main/java/com.mycampany.services > > > > > > Can some one help me for doing this > > > > > > Thanks > > > > > > -- > > > > > > > > > Cordialement > > > > > > Mohamed > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > -- Cordialement Mohamed

