Re: subproject dependency

2009-05-14 Thread fachhoch

If I run theinstall command with -e flag then I dont   get this error
please tell me   why I get error without -e flag ?

fachhoch wrote:
> 
> I created a maven project which has three sub projects one for ear , one
> for
> war and one for jar.War has dependency to jar and ear has dependency to
> war.  When I try to install  project i get this error
> 
> Reason: Failed to copy file for artifact[active project artifact:
> artifact = gov.audit:audit.jar:jar:1:compile;
> project: MavenProject: gov.audit:audit.jar:1 @
> E:\dev\eclipse\Audit\Audit.gov\audit.jar\pom.xml]
> 
> 
> I tried in other way first build jar , it works fine then when I build war
> I
> get this error
> 
> The following mojo encountered an error while executing:
> Group-Id: org.apache.maven.plugins
> Artifact-Id: maven-war-plugin
> Version: 2.1-alpha-1
> Mojo: war
> brought in via: packaging: war
> 
> While building project:
> Group-Id: gov.audit
> Artifact-Id: audit.war
> Version: 1
> From file: E:\dev\eclipse\Audit\Audit.gov\audit.war\pom.xml
> Reason: Failed to copy file for
> artifact[gov.audit:audit.jar:jar:1:compile]
> 
> also pom file for my war  project
> 
> 
>   
> Audit.gov
> gov.audit
> 1
>   
>   4.0.0
>   gov.audit
>   audit.war
>   war
>   audit.war Maven Webapp
>   1
>   http://maven.apache.org
>   
> audit
>   
>   
> 
> gov.audit
> audit.jar
> 1
> 
>   
> 
> 
> please tell me if i specified correctly dependency for my sub project ?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/subproject-dependency-tp23484464p23549820.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



subproject dependency

2009-05-11 Thread tubin gen
I created a maven project which has three sub projects one for ear , one for
war and one for jar.War has dependency to jar and ear has dependency to
war.  When I try to install  project i get this error

Reason: Failed to copy file for artifact[active project artifact:
artifact = gov.audit:audit.jar:jar:1:compile;
project: MavenProject: gov.audit:audit.jar:1 @
E:\dev\eclipse\Audit\Audit.gov\audit.jar\pom.xml]


I tried in other way first build jar , it works fine then when I build war I
get this error

The following mojo encountered an error while executing:
Group-Id: org.apache.maven.plugins
Artifact-Id: maven-war-plugin
Version: 2.1-alpha-1
Mojo: war
brought in via: packaging: war

While building project:
Group-Id: gov.audit
Artifact-Id: audit.war
Version: 1
>From file: E:\dev\eclipse\Audit\Audit.gov\audit.war\pom.xml
Reason: Failed to copy file for artifact[gov.audit:audit.jar:jar:1:compile]

also pom file for my war  project


  
Audit.gov
gov.audit
1
  
  4.0.0
  gov.audit
  audit.war
  war
  audit.war Maven Webapp
  1
  http://maven.apache.org
  
audit
  
  

gov.audit
audit.jar
1

  


please tell me if i specified correctly dependency for my sub project ?


Re: How to subproject dependency including test-class?

2008-10-14 Thread sean chen(陈思淼)
OK ,have move the BaseTestCase to the src/main/java 's test package .Thanks
Wayne.

2008/10/15 Wayne Fay <[EMAIL PROTECTED]>

> Either move the base test class out of src/test/java and into
> src/main/java, or use the test-jar approach:
> http://maven.apache.org/guides/mini/guide-attached-tests.html
>
> Wayne
>
> On Tue, Oct 14, 2008 at 6:34 PM, sean chen(陈思淼) <[EMAIL PROTECTED]>
> wrote:
> > I have 3 sub-projects, the structure is like this:MyProject-all
> > -common
> > --client
> > --server
> >
> > the client and server depend on the common project, the src/main/java
> depend
> > on common is Good. but when I have some base test class in the
> > common-project. when I try to extend it in the client-project, the mvn
> pops
> > compile exception but it's good in the eclipse project.
> > I think the maven project dependence just exclude the test-class,
> >
> > I know I can make a common-test-project which depends on all the other
> > project to solve this problem, but that not good to be. Is there other
> > resolutions? please tell me.
> >
>


Re: How to subproject dependency including test-class?

2008-10-14 Thread Wayne Fay
Either move the base test class out of src/test/java and into
src/main/java, or use the test-jar approach:
http://maven.apache.org/guides/mini/guide-attached-tests.html

Wayne

On Tue, Oct 14, 2008 at 6:34 PM, sean chen(陈思淼) <[EMAIL PROTECTED]> wrote:
> I have 3 sub-projects, the structure is like this:MyProject-all
> -common
> --client
> --server
>
> the client and server depend on the common project, the src/main/java depend
> on common is Good. but when I have some base test class in the
> common-project. when I try to extend it in the client-project, the mvn pops
> compile exception but it's good in the eclipse project.
> I think the maven project dependence just exclude the test-class,
>
> I know I can make a common-test-project which depends on all the other
> project to solve this problem, but that not good to be. Is there other
> resolutions? please tell me.
>


How to subproject dependency including test-class?

2008-10-14 Thread sean chen(陈思淼)
I have 3 sub-projects, the structure is like this:MyProject-all
-common
--client
--server

the client and server depend on the common project, the src/main/java depend
on common is Good. but when I have some base test class in the
common-project. when I try to extend it in the client-project, the mvn pops
compile exception but it's good in the eclipse project.
I think the maven project dependence just exclude the test-class,

I know I can make a common-test-project which depends on all the other
project to solve this problem, but that not good to be. Is there other
resolutions? please tell me.


RE: Subproject dependency copy trips up release plugin?

2007-02-12 Thread Brian E. Fox
You're missing the groupId in artifactItem:


  A
  ${pom.version}
  jar


This isn't inherited if not filled in.  

-Original Message-
From: shinsato [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 12, 2007 1:12 PM
To: users@maven.apache.org
Subject: Subproject dependency copy trips up release plugin?


We have a project with a few sub-projects.  One of those subprojects
uses the maven-dependency-plugin, copying the jar file artifact from one
of the sibling sub-projects.  The dependency plugin has worked fine in
another multi-project m2 buld and release when the dependency copy was
only referencing projects outside the multi-project's project tree.

But in the present multi-project release, copying that sibling jar file
with the dependency plugin causes the mvn release:prepare step to fail,
because it can't find the released version in the release repository.
It doesn't care about referencing sibling project dependencies from the
regular pom dependencies, it only chokes for the dependency:copy.

Is this a bug or a usage issue?

Here's a diagram for the issue with three pseudo-poms.  I omitted
groupId's, scm, distributionManagement, and other content from the poms
that were not necessary to communicate the basic issue.  Any ideas or
workaround would be appreciated.

superproject/
A/   -> no dependencies
B/   -> dependency:copy A

//superproject/pom.xml (abbrieviated)

  superproject
  pom
  1.0.0.1-SNAPSHOT
  
A
B
  


// superproject/A/pom.xml (abbrievated)

  
superproject
1.0.0.1-SNAPSHOT
  
  A
  1.0.0.1-SNAPSHOT
  

  
org.apache.maven.plugins
maven-compiler-plugin

  1.5
  1.5

  


// superproject/B/pom.xml (abbreviated)

  
superproject
1.0.0.1-SNAPSHOT
  
  B
  war
  1.0.0.1-SNAPSHOT

  
FooWar

  
org.apache.maven
maven-dependency-plugin

  
copy

  copy


  

  A
  ${pom.version}
  jar

  
 
${project.build.directory}/${pom.build.finalName}/jars<
/outputDirectory>

  

  

  

  

  A
  ${pom.version}

  


The error message during mvn release:prepare is basically:
[INFO] Building B
[INFO]task-segment: [clean, integration-test]
[INFO]


[INFO] [clean:clean] 
[INFO] [dependency:copy {execution: copy}]
[INFO] Configured Artifact: :A:null:1.0.0.1:jar
Downloading: /1.0.0.1/A-1.0.0.1.jar
[WARNING] Unable to get resource from repository sizzle ()
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

GroupId: 
ArtifactId: A
Version: 1.0.0.1

Reason: Unable to download the artifact from any repository

--
View this message in context:
http://www.nabble.com/Subproject-dependency-copy-trips-up-release-plugin
--tf3215460s177.html#a8929542
Sent from the Maven - Users mailing list archive at Nabble.com.


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



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



Subproject dependency copy trips up release plugin?

2007-02-12 Thread shinsato

We have a project with a few sub-projects.  One of those subprojects uses the
maven-dependency-plugin, copying the jar file artifact from one of the
sibling sub-projects.  The dependency plugin has worked fine in another
multi-project m2 buld and release when the dependency copy was only
referencing projects outside the multi-project's project tree.

But in the present multi-project release, copying that sibling jar file with
the dependency plugin causes the mvn release:prepare step to fail, because
it can't find the released version in the release repository.  It doesn't
care about referencing sibling project dependencies from the regular pom
dependencies, it only chokes for the dependency:copy.

Is this a bug or a usage issue?

Here's a diagram for the issue with three pseudo-poms.  I omitted groupId's,
scm, distributionManagement, and other content from the poms that were not
necessary to communicate the basic issue.  Any ideas or workaround would be
appreciated.

superproject/
A/   -> no dependencies
B/   -> dependency:copy A

//superproject/pom.xml (abbrieviated)

  superproject
  pom
  1.0.0.1-SNAPSHOT
  
A
B
  


// superproject/A/pom.xml (abbrievated)

  
superproject
1.0.0.1-SNAPSHOT
  
  A
  1.0.0.1-SNAPSHOT
  

  
org.apache.maven.plugins
maven-compiler-plugin

  1.5
  1.5

  


// superproject/B/pom.xml (abbreviated)

  
superproject
1.0.0.1-SNAPSHOT
  
  B
  war
  1.0.0.1-SNAPSHOT

  
FooWar

  
org.apache.maven
maven-dependency-plugin

  
copy

  copy


  

  A
  ${pom.version}
  jar

  
 
${project.build.directory}/${pom.build.finalName}/jars

  

  

  

  

  A
  ${pom.version}

  


The error message during mvn release:prepare is basically:
[INFO] Building B
[INFO]task-segment: [clean, integration-test]
[INFO]

[INFO] [clean:clean] 
[INFO] [dependency:copy {execution: copy}]
[INFO] Configured Artifact: :A:null:1.0.0.1:jar
Downloading: /1.0.0.1/A-1.0.0.1.jar
[WARNING] Unable to get resource from repository sizzle ()
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

GroupId: 
ArtifactId: A
Version: 1.0.0.1

Reason: Unable to download the artifact from any repository

-- 
View this message in context: 
http://www.nabble.com/Subproject-dependency-copy-trips-up-release-plugin--tf3215460s177.html#a8929542
Sent from the Maven - Users mailing list archive at Nabble.com.


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