Using custom properties in archetypes

2008-10-07 Thread Andre Dantas Rocha
Hi all,

 

Is that possible to use custom properties during the archetype creation?

 

My pom.xml has the structure below and I'm typing mvn archetype:generate
-DarchetypeArtifactId=myArchetypeName  -DsystemName=, but the
"systemName" property is ignored...

 



  ...

  

MySystem

  

  ...

  ${systemName}

  ...



 

How can I do this?

 

Thanks,

 

Andre

 

 



Has anybody successfully used "check" and "pmd" goals together?

2008-10-02 Thread Andre Dantas Rocha
Hi all,

 

I've been trying for about three days using the 'pmd' and 'check' goals
together. I don't know why, but every time I enable 'check' goal the report
returns "PMD found no problems in your source code".

 

If I run without 'check' goal I can find a lot of problems in the code. The
configuration is below.

 

Could anybody help me?

 

Thanks,

 

Andre

 



   ${systemName}

   

  

 org.apache.maven.plugins

 maven-jxr-plugin

 2.1

 

true

  

  

  

 org.apache.maven.plugins

 maven-pmd-plugin

 2.4





pmd

   

  pt_BR

  false

  false

  ${maven.compiler.source}

  100

  

 ${configDir}/cef-pmd.xml

   

  true

  true   

  false

  5

   

   compile

   

  pmd

  cpd

  check

  cpd-check 

   

 

 

  

   





Empty report with maven-pmd-plugin

2008-10-01 Thread Andre Dantas Rocha
Hi all,

 

I'm facing a big problem using pmd plugin. If I use "pmd" and "cpd" goals
only, everything works fine. When I use "check" and "cpd-check" goals,
however, I get an empty report...

 

(below my pmd configuration).

 

Any clues?

 

Thanks,

 

Andre

 

 



   org.apache.maven.plugins

   maven-pmd-plugin

   2.4

   

  

 

pt_BR

true

false

false

${maven.compiler.source}

true

100



   ${configDir}/cef-pmd.xml

 



false

5

 

 package

 

pmd

cpd

   

check

cpd-check

 

  

   





Using locales with maven-pmd-plugin

2008-10-01 Thread Andre Dantas Rocha
Hi all,

 

I'm trying unsuccessfully using i18n with PMD plugin. Actually I don't know
where to put my pt_BR properties file.

 

My project is an EAR project and  the configuration for reports is shown
above. All site is in pt_BR, but PMD and Checkstyle.

 

Could anybody help me?

 

Thanks,

 

Andre

 



   

   

 
org.apache.maven.plugins

 
maven-jxr-plugin

 
2.1

 


 
true

 


   

   

   

 
org.apache.maven.plugins

 
maven-pmd-plugin

 
2.4

 


 
pt_BR

 
true

 
false

 
false

 
${maven.compiler.source}

 
true

 
100


 


 
${configDir}/cef-pmd.xml

 


 


   

   

   

 
org.apache.maven.plugins

 
maven-checkstyle-plugin

 
2.2

 


 
false

 
config/sun_checks.xml

 
true

 


   

 


   

 
org.apache.maven.plugins

 
maven-site-plugin

 
2.0-beta-7

 


 
pt_BR

 


   


   

   

 
org.apache.maven.plugins

 
maven-project-info-reports-plugin

 
2.1

   

 


 


 
index

 
dependencies

 


 


   

   

   





Accessing child/parent properties

2008-09-24 Thread Andre Dantas Rocha
Hi all,

 

I'd like to access a child pom property from its parent. Is it possible?
Something with this syntax: ${parentProject.childProject.property}.

 

The problem is that I have an EAR project and would like to use properties
from EJB and WAR projects and vice-versa.

 

Thanks,

 

Andre



RES: Packaging fails on EAR project

2008-09-23 Thread Andre Dantas Rocha
Hi Wayne,

This EJB will be used only in this project, and I will re-package it every 
time. Because of this I believe it is not the best option to do.

(it's my opinion, but I just started using Maven)

Andre

-Mensagem original-
De: Wayne Fay [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 23 de setembro de 2008 15:34
Para: Maven Users List
Assunto: Re: Packaging fails on EAR project

Maven needs all the dependencies you've declared to be available in
your local repository (or in the module list somewhere under your
current project) for a build to succeed.

What is your reason for not wanting to install the EJB artifact? Why
is it "not the best thing to do"??

Wayne

On Tue, Sep 23, 2008 at 10:43 AM, Andre Dantas Rocha
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
>
>
> I've trying to package a EAR application unsuccessfully. My pom.xml
> references a EJB module this way:
>
>
>
> 
>
>   br.gov.caixa.maven
>
>   APPLICATION-ejb
>
>   1.0
>
>   provided
>
> 
>
>
>
> Everything seems ok, but I received the error below. There is an issue on
> jira ( <http://jira.codehaus.org/browse/MRELEASE-129>
> http://jira.codehaus.org/browse/MRELEASE-129) describing this problem, but
> there is no solution yet.
>
>
>
> I wouldn't like to install the APPLICATION-ejb-1.0.jar artifact (I believe
> it's not the best thing to do) . How can I solve this problem?
>
>
>
> Please help me, I've tried all possible ways to find a solution...
>
>
>
> Thanks,
>
>
>
> Andre
>
>
>
>
>
> C:\Andre\Projetos\exemplo-maven>mvn clean package
>
> [INFO] Scanning for projects...
>
> [INFO] Reactor build order:
>
> [INFO]   project
>
> [INFO]   enterprise java beans
>
> [INFO]   java servlets
>
> [INFO]   ear assembly
>
> [INFO]
> 
>
> [INFO] Building project
>
> [INFO]task-segment: [clean, package]
>
> [INFO]
> 
>
> [INFO] [clean:clean]
>
> [INFO] [site:attach-descriptor]
>
> [INFO]
> 
>
> [INFO] Building enterprise java beans
>
> [INFO]task-segment: [clean, package]
>
> [INFO]
> 
>
> [INFO] [clean:clean]
>
> [INFO] Deleting directory C:\Andre\Projetos\exemplo-maven\ejbs\target
>
> [INFO] [resources:resources]
>
> [INFO] Using default encoding to copy filtered resources.
>
> [INFO] [compiler:compile]
>
> [INFO] Compiling 3 source files to
> C:\Andre\Projetos\exemplo-maven\ejbs\target\classes
>
> [INFO] [resources:testResources]
>
> [INFO] Using default encoding to copy filtered resources.
>
> [INFO] [compiler:testCompile]
>
> [INFO] No sources to compile
>
> [INFO] [surefire:test]
>
> [INFO] No tests to run.
>
> [INFO] [ejb:ejb]
>
> [INFO] Building ejb APPLICATION-ejb-1.0 with ejbVersion 2.1
>
> [INFO] Building jar:
> C:\Andre\Projetos\exemplo-maven\ejbs\target\APPLICATION-ejb-1.0.jar
>
> [INFO]
> 
>
> [INFO] Building java servlets
>
> [INFO]task-segment: [clean, package]
>
> [INFO]
> 
>
> [INFO] [clean:clean]
>
> [INFO] [resources:resources]
>
> [INFO] Using default encoding to copy filtered resources.
>
> Downloading:
> http://repository.jboss.com/maven2//commons-chain/commons-chain/1.2/commons-
> chain-1.2.pom
>
> Downloading:
> http://repo1.maven.org/maven2/commons-chain/commons-chain/1.2/commons-chain-
> 1.2.pom
>
> Downloading:
> http://repository.jboss.com/maven2//br/gov/caixa/maven/APPLICATION-ejb/1.0/A
> PPLICATION-ejb-1.0.jar
>
> Downloading:
> http://repo1.maven.org/maven2/br/gov/caixa/maven/APPLICATION-ejb/1.0/APPLICA
> TION-ejb-1.0.jar
>
> [INFO]
> 
>
> [ERROR] BUILD ERROR
>
> [INFO]
> 
>
> [INFO] Failed to resolve artifact.
>
>
>
> Missing:
>
> --
>
> 1) br.gov.caixa.maven:APPLICATION-ejb:jar:1.0
>
>
>
>  Try downloading the file manually from the project website.
>
>
>
>  Then, install it using the command:
>
>  mvn install:install-file -DgroupId=br.gov.caixa.maven
> -DartifactId=APPLICATION-ejb -Dversion=1.0 -Dpackaging=jar
> -Dfile=/path/to/file
&

RES: Packaging fails on EAR project

2008-09-23 Thread Andre Dantas Rocha
Problem solved using this code:


   br.gov.caixa.maven
   APPLICATION-ejb
   1.0
   compile
   ejb




-Mensagem original-
De: Andre Dantas Rocha [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 23 de setembro de 2008 14:44
Para: users@maven.apache.org
Assunto: Packaging fails on EAR project

Hi all,

 

I've trying to package a EAR application unsuccessfully. My pom.xml
references a EJB module this way:

 



   br.gov.caixa.maven

   APPLICATION-ejb

   1.0

   provided



 

Everything seems ok, but I received the error below. There is an issue on
jira ( <http://jira.codehaus.org/browse/MRELEASE-129>
http://jira.codehaus.org/browse/MRELEASE-129) describing this problem, but
there is no solution yet.

 

I wouldn't like to install the APPLICATION-ejb-1.0.jar artifact (I believe
it's not the best thing to do) . How can I solve this problem?

 

Please help me, I've tried all possible ways to find a solution...

 

Thanks,

 

Andre

 

 

C:\Andre\Projetos\exemplo-maven>mvn clean package

[INFO] Scanning for projects...

[INFO] Reactor build order: 

[INFO]   project

[INFO]   enterprise java beans

[INFO]   java servlets

[INFO]   ear assembly

[INFO]


[INFO] Building project

[INFO]task-segment: [clean, package]

[INFO]


[INFO] [clean:clean]

[INFO] [site:attach-descriptor]

[INFO]


[INFO] Building enterprise java beans

[INFO]task-segment: [clean, package]

[INFO]


[INFO] [clean:clean]

[INFO] Deleting directory C:\Andre\Projetos\exemplo-maven\ejbs\target

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Compiling 3 source files to
C:\Andre\Projetos\exemplo-maven\ejbs\target\classes

[INFO] [resources:testResources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:testCompile]

[INFO] No sources to compile

[INFO] [surefire:test]

[INFO] No tests to run.

[INFO] [ejb:ejb]

[INFO] Building ejb APPLICATION-ejb-1.0 with ejbVersion 2.1

[INFO] Building jar:
C:\Andre\Projetos\exemplo-maven\ejbs\target\APPLICATION-ejb-1.0.jar

[INFO]


[INFO] Building java servlets

[INFO]task-segment: [clean, package]

[INFO]


[INFO] [clean:clean]

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

Downloading:
http://repository.jboss.com/maven2//commons-chain/commons-chain/1.2/commons-
chain-1.2.pom

Downloading:
http://repo1.maven.org/maven2/commons-chain/commons-chain/1.2/commons-chain-
1.2.pom

Downloading:
http://repository.jboss.com/maven2//br/gov/caixa/maven/APPLICATION-ejb/1.0/A
PPLICATION-ejb-1.0.jar

Downloading:
http://repo1.maven.org/maven2/br/gov/caixa/maven/APPLICATION-ejb/1.0/APPLICA
TION-ejb-1.0.jar

[INFO]


[ERROR] BUILD ERROR

[INFO]


[INFO] Failed to resolve artifact.

 

Missing:

--

1) br.gov.caixa.maven:APPLICATION-ejb:jar:1.0

 

  Try downloading the file manually from the project website.

 

  Then, install it using the command: 

  mvn install:install-file -DgroupId=br.gov.caixa.maven
-DartifactId=APPLICATION-ejb -Dversion=1.0 -Dpackaging=jar
-Dfile=/path/to/file

 

  Alternatively, if you host your own repository you can deploy the file
there: 

  mvn deploy:deploy-file -DgroupId=br.gov.caixa.maven
-DartifactId=APPLICATION-ejb -Dversion=1.0 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

 

  Path to dependency: 

1) br.gov.caixa.maven:APPLICATION-web:war:1.0

2) br.gov.caixa.maven:APPLICATION-ejb:jar:1.0

 

--

1 required artifact is missing.

 

for artifact: 

  br.gov.caixa.maven:APPLICATION-web:war:1.0

 

from the specified remote repositories:

  repository.jboss.com (http://repository.jboss.com/maven2/),

  central (http://repo1.maven.org/maven2),

  maven2-snapshots.jboss.com (http://snapshots.jboss.com/)

 

 

[INFO]


[INFO] For more information, run Maven with the -e switch

[INFO]


[INFO] Total time: 23 seconds

[INFO] Finished at: Tue Sep 23 14:36:18 BRT 2008

[INFO] Final Memory: 13M/23M

[INFO]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi

Packaging fails on EAR project

2008-09-23 Thread Andre Dantas Rocha
Hi all,

 

I've trying to package a EAR application unsuccessfully. My pom.xml
references a EJB module this way:

 



   br.gov.caixa.maven

   APPLICATION-ejb

   1.0

   provided



 

Everything seems ok, but I received the error below. There is an issue on
jira ( 
http://jira.codehaus.org/browse/MRELEASE-129) describing this problem, but
there is no solution yet.

 

I wouldn't like to install the APPLICATION-ejb-1.0.jar artifact (I believe
it's not the best thing to do) . How can I solve this problem?

 

Please help me, I've tried all possible ways to find a solution...

 

Thanks,

 

Andre

 

 

C:\Andre\Projetos\exemplo-maven>mvn clean package

[INFO] Scanning for projects...

[INFO] Reactor build order: 

[INFO]   project

[INFO]   enterprise java beans

[INFO]   java servlets

[INFO]   ear assembly

[INFO]


[INFO] Building project

[INFO]task-segment: [clean, package]

[INFO]


[INFO] [clean:clean]

[INFO] [site:attach-descriptor]

[INFO]


[INFO] Building enterprise java beans

[INFO]task-segment: [clean, package]

[INFO]


[INFO] [clean:clean]

[INFO] Deleting directory C:\Andre\Projetos\exemplo-maven\ejbs\target

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:compile]

[INFO] Compiling 3 source files to
C:\Andre\Projetos\exemplo-maven\ejbs\target\classes

[INFO] [resources:testResources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:testCompile]

[INFO] No sources to compile

[INFO] [surefire:test]

[INFO] No tests to run.

[INFO] [ejb:ejb]

[INFO] Building ejb APPLICATION-ejb-1.0 with ejbVersion 2.1

[INFO] Building jar:
C:\Andre\Projetos\exemplo-maven\ejbs\target\APPLICATION-ejb-1.0.jar

[INFO]


[INFO] Building java servlets

[INFO]task-segment: [clean, package]

[INFO]


[INFO] [clean:clean]

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

Downloading:
http://repository.jboss.com/maven2//commons-chain/commons-chain/1.2/commons-
chain-1.2.pom

Downloading:
http://repo1.maven.org/maven2/commons-chain/commons-chain/1.2/commons-chain-
1.2.pom

Downloading:
http://repository.jboss.com/maven2//br/gov/caixa/maven/APPLICATION-ejb/1.0/A
PPLICATION-ejb-1.0.jar

Downloading:
http://repo1.maven.org/maven2/br/gov/caixa/maven/APPLICATION-ejb/1.0/APPLICA
TION-ejb-1.0.jar

[INFO]


[ERROR] BUILD ERROR

[INFO]


[INFO] Failed to resolve artifact.

 

Missing:

--

1) br.gov.caixa.maven:APPLICATION-ejb:jar:1.0

 

  Try downloading the file manually from the project website.

 

  Then, install it using the command: 

  mvn install:install-file -DgroupId=br.gov.caixa.maven
-DartifactId=APPLICATION-ejb -Dversion=1.0 -Dpackaging=jar
-Dfile=/path/to/file

 

  Alternatively, if you host your own repository you can deploy the file
there: 

  mvn deploy:deploy-file -DgroupId=br.gov.caixa.maven
-DartifactId=APPLICATION-ejb -Dversion=1.0 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

 

  Path to dependency: 

1) br.gov.caixa.maven:APPLICATION-web:war:1.0

2) br.gov.caixa.maven:APPLICATION-ejb:jar:1.0

 

--

1 required artifact is missing.

 

for artifact: 

  br.gov.caixa.maven:APPLICATION-web:war:1.0

 

from the specified remote repositories:

  repository.jboss.com (http://repository.jboss.com/maven2/),

  central (http://repo1.maven.org/maven2),

  maven2-snapshots.jboss.com (http://snapshots.jboss.com/)

 

 

[INFO]


[INFO] For more information, run Maven with the -e switch

[INFO]


[INFO] Total time: 23 seconds

[INFO] Finished at: Tue Sep 23 14:36:18 BRT 2008

[INFO] Final Memory: 13M/23M

[INFO]