Re: Working around "Can't compile test sources when main sources are missing a module descriptor"

2023-07-12 Thread Ceki Gülcü


Hi Mark,

I ran into a similar problem today, July 12th.

In the logback project in order to test support for jigsaw/jpms in
maven-module 'x', we create a maven-module called x-blackbox. The
x-blackbox module contains junit5 tests under src/test/java and without
a src/main folder. This works nicely.

I have tried to do the same for the jul-to-slf4j module in slf4j. Thus,
I have created jul-to-slf4j-bloackbox module following the same recipe
as in the logback project.

To my astonishment this resulted in the following error:

Execution default-testCompile of goal
org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile
failed: Can't compile test sources when main sources are missing a
module descriptor

I have tried fixing the problem by tweaking plugin and jdk versions to
no avail.  However, as far as I can tell, the only significant
difference between slf4j and logback is that slf4j uses junit4 and
logback uses junit5. Moving jul-to-slf4j-bloackbox module into a
distinct project and using junit 5 fixed the issue.

It seems to me that moving to Junit 5 is the critical element.

WARNING: The assertion above is speculative as I have not tried to
debunk said assertion.

Best regards,

ps. I did not have time to read
   https://github.com/junit-team/junit5/discussions/3370

-- 
Ceki Gülcü

Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch

On 6/29/2023 7:02 PM, Mark Raynsford wrote:
> (Re-sent using correct address!)
> 
> Hello!
> 
> I recently started a discussion thread on the JUnit 5 repos detailing a
> problem I'd been running into on a lot of projects:
> 
>   https://github.com/junit-team/junit5/discussions/3370
> 
> Long story short: In my projects, for various reasons, I put all of the
> tests in one module rather than having a src/test/java in each. This
> works fine, except for the fact that I have to maintain duplicate module
> descriptors in the src/main/java and src/main/test directories of the
> *.tests module, and I also have to maintain a shadow package hierarchy
> in src/main/java filled with empty classes (one for each exported
> package).
> 
> I'm about to start experimenting with putting test sources in
> src/main/java in the *.tests module, but I'm slightly nervous about
> doing this. It's quite an obvious divergence from Maven's conventions
> (although arguably putting all tests in a *.tests module might be
> considered one too [although the conventions were chosen before
> Java platform modules existed!]). I'm not clear on how all of the tools
> might misbehave if tests aren't in the source directory they're expected
> to be in.
> 
> I realized I'm really only doing this because the Maven Compiler plugin
> produces the error above if I don't have module descriptors in both
> directories:
> 
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
> (default-testCompile) on project com.io7m.idstore.tests: Execution
> default-testCompile of goal
> org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
> failed: Can't compile test sources when main sources are missing a
> module descriptor -> [Help 1]
> 
> Is there perhaps a better way to get the Compiler plugin to ignore
> src/main/java and just compile the tests?
> 

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



Working around "Can't compile test sources when main sources are missing a module descriptor"

2023-06-29 Thread Mark Raynsford
(Re-sent using correct address!)

Hello!

I recently started a discussion thread on the JUnit 5 repos detailing a
problem I'd been running into on a lot of projects:

  https://github.com/junit-team/junit5/discussions/3370

Long story short: In my projects, for various reasons, I put all of the
tests in one module rather than having a src/test/java in each. This
works fine, except for the fact that I have to maintain duplicate module
descriptors in the src/main/java and src/main/test directories of the
*.tests module, and I also have to maintain a shadow package hierarchy
in src/main/java filled with empty classes (one for each exported
package).

I'm about to start experimenting with putting test sources in
src/main/java in the *.tests module, but I'm slightly nervous about
doing this. It's quite an obvious divergence from Maven's conventions
(although arguably putting all tests in a *.tests module might be
considered one too [although the conventions were chosen before
Java platform modules existed!]). I'm not clear on how all of the tools
might misbehave if tests aren't in the source directory they're expected
to be in.

I realized I'm really only doing this because the Maven Compiler plugin
produces the error above if I don't have module descriptors in both
directories:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
(default-testCompile) on project com.io7m.idstore.tests: Execution
default-testCompile of goal
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
failed: Can't compile test sources when main sources are missing a
module descriptor -> [Help 1]

Is there perhaps a better way to get the Compiler plugin to ignore
src/main/java and just compile the tests?

-- 
Mark Raynsford | https://www.io7m.com



pgp0cfaNm2HEt.pgp
Description: OpenPGP digital signature


Re: Can't compile my classes with maven.

2015-02-02 Thread Adrien Rivard
I would add :

1) maven-eclipse-plugin is not to be used anymore. If you need it in
eclipse don't use any maven plugin but only http://eclipse.org/m2e/

2) exec-maven-plugin is not for compilation, it's for execution inside a
maven build (comment says otherwise). You seem to have mixing it with
maven-assembly-plugin (configuration is clearly wrong)

3) If you need to run it, I would rather use
http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/
and remove the 3 last plugins.



On Mon, Feb 2, 2015 at 3:40 PM, Karl Heinz Marbaise khmarba...@gmx.de
wrote:

 Hi,

 first rule in Maven keep the conventions[1]...meaning convention over
 configuration:

 source code:

 src/main/java

 resources for production code:

 src/main/resources

 Tests:

 src/test/java

 resources for tests:

 src/test/resources

 move your files to the correct location
 etc.


 Remove the following lines:

 sourceDirectory${basedir}/src/org/apache/hadoop/mapred/examples/sourceDirectory


 maven-compiler-plugin:
   includes
 includesrc/**/*.java/include
   /includes


 does not make sense at all:

 resources
 resource
 directorytarget/directory
 includesinclude**/*.class/include/includes
 /resource
 resource
 directorysrc/main/resources/META-INF/directory
 targetPath${basedir}/target/targetPath
 includes includelog4j.properties/include
 includeservers.json/include /includes
 /resource
 /resources



 Kind regards
 Karl Heinz Marbaise

 [1] http://maven.apache.org/guides/introduction/
 introduction-to-the-standard-directory-layout.html


 On 2/2/15 3:27 PM, xeonmailinglist wrote:

 Hi,

 I can’t compile my java class using my |pom.xml|, and I can’t find the
 problem. Can anyone help me to point what it is wrong?

 Directory structure

 |hadoop-wordcount-coc$ tree
 .
 ├── output.txt
 ├── pom.xml
 └── src
  └── org
  └── apache
  └── hadoop
  └── mapred
  └── examples
  ├── WordCount.java
  └── workbench.xmi
 |

 output of the jar created with with |pom.xml|

 |hadoop-wordcount-coc$ jar tf target/wordcount.jar
 META-INF/
 META-INF/MANIFEST.MF
 META-INF/maven/
 META-INF/maven/org.apache.hadoop.mapred.example/
 META-INF/maven/org.apache.hadoop.mapred.example/WordCount/
 META-INF/maven/org.apache.hadoop.mapred.example/WordCount/pom.xml
 META-INF/maven/org.apache.hadoop.mapred.example/WordCount/pom.properties
 |

 |pom.xml|

 |hadoop-wordcount-coc$ cat pom.xml
 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/xsd/maven-4.0.0.xsd;
modelVersion4.0.0/modelVersion

groupIdorg.apache.hadoop.mapred.example/groupId
artifactIdWordCount/artifactId
version1.0-SNAPSHOT/version
packagingjar/packaging

nameWordCount CoC/name
urlhttp://maven.apache.org/url

properties
  jdk.version1.7/jdk.version
  junit.version4.11/junit.version
  log4j.version1.2.17/log4j.version
/properties


dependencies
  dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version4.8.2/version
scopetest/scope
  /dependency
dependency
  groupIdorg.apache.hadoop/groupId
  artifactIdhadoop-yarn-api/artifactId
  version2.6.0/version
/dependency
/dependencies

 build
finalNamewordcount/finalName

 sourceDirectory${basedir}/src/org/apache/hadoop/mapred/
 examples/sourceDirectory

plugins

  !-- download source code in Eclipse, best practice --
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-eclipse-plugin/artifactId
version2.9/version
configuration
  downloadSourcestrue/downloadSources
  downloadJavadocsfalse/downloadJavadocs
/configuration
  /plugin

  !-- Set a compiler level --
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
version2.3.2/version
configuration
  source${jdk.version}/source
  target${jdk.version}/target
  includes
includesrc/**/*.java/include
  /includes
/configuration
  /plugin

  !-- Compile the code --
   !-- plugin
  artifactIdexec-maven-plugin/artifactId
  configuration

 mainClassorg.apache.hadoop.mapred.examples.WordCount/mainClass
archive
  manifest
mainClassfully.qualified.MainClass/mainClass
  /manifest
  manifestEntries
  Class-Path./Class-Path
  /manifestEntries
/archive
descriptorRefs
  descriptorRefjar-with-dependencies/descriptorRef
/descriptorRefs
 

Re: Can't compile my classes with maven.

2015-02-02 Thread Karl Heinz Marbaise

Hi,

first rule in Maven keep the conventions[1]...meaning convention over 
configuration:


source code:

src/main/java

resources for production code:

src/main/resources

Tests:

src/test/java

resources for tests:

src/test/resources

move your files to the correct location
etc.


Remove the following lines:

sourceDirectory${basedir}/src/org/apache/hadoop/mapred/examples/sourceDirectory 



maven-compiler-plugin:
  includes
includesrc/**/*.java/include
  /includes


does not make sense at all:

resources
resource
directorytarget/directory
includesinclude**/*.class/include/includes
/resource
resource
directorysrc/main/resources/META-INF/directory
targetPath${basedir}/target/targetPath
includes includelog4j.properties/include
includeservers.json/include /includes
/resource
/resources



Kind regards
Karl Heinz Marbaise

[1] 
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html


On 2/2/15 3:27 PM, xeonmailinglist wrote:

Hi,

I can’t compile my java class using my |pom.xml|, and I can’t find the
problem. Can anyone help me to point what it is wrong?

Directory structure

|hadoop-wordcount-coc$ tree
.
├── output.txt
├── pom.xml
└── src
 └── org
 └── apache
 └── hadoop
 └── mapred
 └── examples
 ├── WordCount.java
 └── workbench.xmi
|

output of the jar created with with |pom.xml|

|hadoop-wordcount-coc$ jar tf target/wordcount.jar
META-INF/
META-INF/MANIFEST.MF
META-INF/maven/
META-INF/maven/org.apache.hadoop.mapred.example/
META-INF/maven/org.apache.hadoop.mapred.example/WordCount/
META-INF/maven/org.apache.hadoop.mapred.example/WordCount/pom.xml
META-INF/maven/org.apache.hadoop.mapred.example/WordCount/pom.properties
|

|pom.xml|

|hadoop-wordcount-coc$ cat pom.xml
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/xsd/maven-4.0.0.xsd;
   modelVersion4.0.0/modelVersion

   groupIdorg.apache.hadoop.mapred.example/groupId
   artifactIdWordCount/artifactId
   version1.0-SNAPSHOT/version
   packagingjar/packaging

   nameWordCount CoC/name
   urlhttp://maven.apache.org/url

   properties
 jdk.version1.7/jdk.version
 junit.version4.11/junit.version
 log4j.version1.2.17/log4j.version
   /properties


   dependencies
 dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
   version4.8.2/version
   scopetest/scope
 /dependency
   dependency
 groupIdorg.apache.hadoop/groupId
 artifactIdhadoop-yarn-api/artifactId
 version2.6.0/version
   /dependency
   /dependencies

build
   finalNamewordcount/finalName

sourceDirectory${basedir}/src/org/apache/hadoop/mapred/examples/sourceDirectory

   plugins

 !-- download source code in Eclipse, best practice --
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-eclipse-plugin/artifactId
   version2.9/version
   configuration
 downloadSourcestrue/downloadSources
 downloadJavadocsfalse/downloadJavadocs
   /configuration
 /plugin

 !-- Set a compiler level --
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
   version2.3.2/version
   configuration
 source${jdk.version}/source
 target${jdk.version}/target
 includes
   includesrc/**/*.java/include
 /includes
   /configuration
 /plugin

 !-- Compile the code --
  !-- plugin
 artifactIdexec-maven-plugin/artifactId
 configuration

mainClassorg.apache.hadoop.mapred.examples.WordCount/mainClass
   archive
 manifest
   mainClassfully.qualified.MainClass/mainClass
 /manifest
 manifestEntries
 Class-Path./Class-Path
 /manifestEntries
   /archive
   descriptorRefs
 descriptorRefjar-with-dependencies/descriptorRef
   /descriptorRefs
 /configuration
 groupIdorg.codehaus.mojo/groupId
 version1.2.1/version
 /plugin --


 !-- Make this jar executable --
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-jar-plugin/artifactId
   configuration
   mainClassorg.apache.hadoop.mapred.examples.WordCount/mainClass
   excludes
 exclude**/log4j.properties/exclude
   /excludes
 archive
   manifest
 addClasspathtrue/addClasspath

mainClassorg.apache.hadoop.mapred.examples.WordCount/mainClass
 classpathPrefixdependency-jars//classpathPrefix
   /manifest
 /archive
   /configuration
 

Can't compile my classes with maven.

2015-02-02 Thread xeonmailinglist

Hi,

I can’t compile my java class using my |pom.xml|, and I can’t find the 
problem. Can anyone help me to point what it is wrong?


Directory structure

|hadoop-wordcount-coc$ tree
.
├── output.txt
├── pom.xml
└── src
└── org
└── apache
└── hadoop
└── mapred
└── examples
├── WordCount.java
└── workbench.xmi
|

output of the jar created with with |pom.xml|

|hadoop-wordcount-coc$ jar tf target/wordcount.jar
META-INF/
META-INF/MANIFEST.MF
META-INF/maven/
META-INF/maven/org.apache.hadoop.mapred.example/
META-INF/maven/org.apache.hadoop.mapred.example/WordCount/
META-INF/maven/org.apache.hadoop.mapred.example/WordCount/pom.xml
META-INF/maven/org.apache.hadoop.mapred.example/WordCount/pom.properties
|

|pom.xml|

|hadoop-wordcount-coc$ cat pom.xml
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/xsd/maven-4.0.0.xsd;
  modelVersion4.0.0/modelVersion

  groupIdorg.apache.hadoop.mapred.example/groupId
  artifactIdWordCount/artifactId
  version1.0-SNAPSHOT/version
  packagingjar/packaging

  nameWordCount CoC/name
  urlhttp://maven.apache.org/url

  properties
jdk.version1.7/jdk.version
junit.version4.11/junit.version
log4j.version1.2.17/log4j.version
  /properties


  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version4.8.2/version
  scopetest/scope
/dependency
  dependency
groupIdorg.apache.hadoop/groupId
artifactIdhadoop-yarn-api/artifactId
version2.6.0/version
  /dependency
  /dependencies

build
  finalNamewordcount/finalName
  
sourceDirectory${basedir}/src/org/apache/hadoop/mapred/examples/sourceDirectory
  plugins

!-- download source code in Eclipse, best practice --
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-eclipse-plugin/artifactId
  version2.9/version
  configuration
downloadSourcestrue/downloadSources
downloadJavadocsfalse/downloadJavadocs
  /configuration
/plugin

!-- Set a compiler level --
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-compiler-plugin/artifactId
  version2.3.2/version
  configuration
source${jdk.version}/source
target${jdk.version}/target
includes
  includesrc/**/*.java/include
/includes
  /configuration
/plugin

!-- Compile the code --
 !-- plugin
artifactIdexec-maven-plugin/artifactId
configuration
  mainClassorg.apache.hadoop.mapred.examples.WordCount/mainClass
  archive
manifest
  mainClassfully.qualified.MainClass/mainClass
/manifest
manifestEntries
Class-Path./Class-Path
/manifestEntries
  /archive
  descriptorRefs
descriptorRefjar-with-dependencies/descriptorRef
  /descriptorRefs
/configuration
groupIdorg.codehaus.mojo/groupId
version1.2.1/version
/plugin --


!-- Make this jar executable --
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-jar-plugin/artifactId
  configuration
  mainClassorg.apache.hadoop.mapred.examples.WordCount/mainClass
  excludes
exclude**/log4j.properties/exclude
  /excludes
archive
  manifest
addClasspathtrue/addClasspath
mainClassorg.apache.hadoop.mapred.examples.WordCount/mainClass
classpathPrefixdependency-jars//classpathPrefix
  /manifest
/archive
  /configuration
/plugin

!-- Copy project dependency --
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-dependency-plugin/artifactId
  version2.5.1/version
  executions
  execution
idcopy-dependencies/id
phasepackage/phase
goals
  goalcopy-dependencies/goal
/goals
configuration
!-- exclude junit, we need runtime dependency only --
includeScoperuntime/includeScope

outputDirectory${project.build.directory}/dependency-jars//outputDirectory
/configuration
  /execution
  /executions
/plugin
  /plugins
  resources
  resource
  directorytarget/directory
  includesinclude**/*.class/include/includes
  /resource
  resource
  directorysrc/main/resources/META-INF/directory
  targetPath${basedir}/target/targetPath
  includes includelog4j.properties/include
  includeservers.json/include /includes
  /resource
  /resources
/build
/project
|

​


Re: Can't compile

2007-08-17 Thread Johann Reyes
Hello Mathias

what you need is to remove the runtime scope from your hibernate
dependencies. Just delete the scope line. That is telling maven that you
don't need those jars to compile your classes, just to run it.

For more info about scopes, you can find it here:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

Regards

Johann Reyes


Can't compile

2007-08-16 Thread Mathias P.W Nilsson

Ok this is very strange. I can't use mvn compile. I've tried it all. Delete
all files in respository and try again.

I then tried the mvn -e compile:compile and got the following error

The plugin 'org.apache.maven.plugins:maven-compile-plugin' does not exist or
no valid version could be found

When I look in my respository the folder only contains a xml. I tried to
download the maven-compile-plugin but i doesn't exist. It's only the
maven-compiler-plugin notice the COMPILER and not COMPILE

why is compile used? Why is it trying to download compile when I have sat
compiler. Look at this POM file

I'm near crying here.

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;
  modelVersion4.0.0/modelVersion
  groupIdse.digitalsupport.ftc/groupId
  artifactIdFTC/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameFTC/name
  urlhttp://maven.apache.org/url
  dependencies

dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scoperuntime/scope
/dependency
dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate/artifactId
  version3.2.5.ga/version
  scoperuntime/scope
/dependency
dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate-annotations/artifactId
  version3.3.0.ga/version
  scoperuntime/scope
/dependency
dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate-entitymanager/artifactId
  version3.3.1.ga/version
  scoperuntime/scope
/dependency
  dependency
  groupIdjboss/groupId
  artifactIdjboss-common-core/artifactId
  version2.2.0.GA/version
  scoperuntime/scope
/dependency
dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate-commons-annotations/artifactId
  version3.3.0.ga/version
  scoperuntime/scope
/dependency
   dependency
  groupIdmysql/groupId
  artifactIdmysql-connector-java/artifactId
  version5.0.5/version
  scoperuntime/scope
/dependency
 
dependency
  groupIdc3p0/groupId
  artifactIdc3p0/artifactId
  version0.9.0/version
  scoperuntime/scope
/dependency
  /dependencies
  build
  pluginManagement
plugins
  plugin 
groupIdorg.apache.maven.plugins/groupId 
artifactIdmaven-compiler-plugin/artifactId 
configuration 
source1.5/source 
target1.5/target 
/configuration 
/plugin 
plugin

groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-maven-plugin/artifactId
version2.0-alpha-2/version
configuration
executions
execution

phasegenerate-sources/phase
goals

goalhbm2ddl/goal
/goals
/execution
/executions
components

component
namehbm2ddl/name

implementationannotationconfiguration/implementation

/component
component
namehbm2hbmxml/name

outputDirectorysrc/main/resources/outputDirectory

/component
/components
componentProperties
droptrue/drop
createtrue/create

configurationfilesrc/main/resources/hibernate.cfg.xml/configurationfile

outputfilenameschema.sql/outputfilename
/componentProperties
/configuration
/plugin
/plugins
/pluginManagement
resources
resource
directorysrc/main/resources/directory
filteringtrue/filtering
/resource
/resources
  /build
  
/project

-- 
View this message in context: 

Re: Can't compile

2007-08-16 Thread Wayne Fay
Try mvn compile.

The name of the plugin is compiler. The method you're executing is
named compile. So the long way would be mvn compiler:compile.
Note the r in the first one. But mvn compile is a short-cut.

Wayne

On 8/16/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

 Ok this is very strange. I can't use mvn compile. I've tried it all. Delete
 all files in respository and try again.

 I then tried the mvn -e compile:compile and got the following error

 The plugin 'org.apache.maven.plugins:maven-compile-plugin' does not exist or
 no valid version could be found

 When I look in my respository the folder only contains a xml. I tried to
 download the maven-compile-plugin but i doesn't exist. It's only the
 maven-compiler-plugin notice the COMPILER and not COMPILE

 why is compile used? Why is it trying to download compile when I have sat
 compiler. Look at this POM file

 I'm near crying here.

 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;
  modelVersion4.0.0/modelVersion
  groupIdse.digitalsupport.ftc/groupId
  artifactIdFTC/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameFTC/name
  urlhttp://maven.apache.org/url
  dependencies

dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scoperuntime/scope
/dependency
dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate/artifactId
  version3.2.5.ga/version
  scoperuntime/scope
/dependency
dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate-annotations/artifactId
  version3.3.0.ga/version
  scoperuntime/scope
/dependency
dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate-entitymanager/artifactId
  version3.3.1.ga/version
  scoperuntime/scope
/dependency
  dependency
  groupIdjboss/groupId
  artifactIdjboss-common-core/artifactId
  version2.2.0.GA/version
  scoperuntime/scope
/dependency
dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate-commons-annotations/artifactId
  version3.3.0.ga/version
  scoperuntime/scope
/dependency
   dependency
  groupIdmysql/groupId
  artifactIdmysql-connector-java/artifactId
  version5.0.5/version
  scoperuntime/scope
/dependency

dependency
  groupIdc3p0/groupId
  artifactIdc3p0/artifactId
  version0.9.0/version
  scoperuntime/scope
/dependency
  /dependencies
  build
  pluginManagement
plugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
source1.5/source
target1.5/target
/configuration
/plugin
plugin

groupIdorg.codehaus.mojo/groupId
artifactIdhibernate3-maven-plugin/artifactId
version2.0-alpha-2/version
configuration
executions
execution

 phasegenerate-sources/phase
goals

 goalhbm2ddl/goal
/goals
/execution
/executions
components

component
namehbm2ddl/name

 implementationannotationconfiguration/implementation

/component
component
namehbm2hbmxml/name

 outputDirectorysrc/main/resources/outputDirectory

/component
/components
componentProperties
droptrue/drop
createtrue/create

 configurationfilesrc/main/resources/hibernate.cfg.xml/configurationfile

 outputfilenameschema.sql/outputfilename
/componentProperties
/configuration
/plugin
/plugins
/pluginManagement
resources
resource
directorysrc/main/resources/directory
filteringtrue/filtering

Re: Can't compile

2007-08-16 Thread Mathias P.W Nilsson

getting exactly the same error.. I going mad here. Can't even
compile. 

/Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/User.java:[11,25]
package javax.persistence does not exist

/Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/User.java:[12,25]
package javax.persistence does not exist

/Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/User.java:[13,25]
package javax.persistence does not exist

/Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[3,25]
package javax.persistence does not exist

/Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[4,25]
package javax.persistence does not exist

/Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[5,25]
package javax.persistence does not exist

/Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[6,25]
package javax.persistence does not exist

/Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[7,25]
package javax.persistence does not exist



AND 1000 more lines. How come. In the eclipse everything looks fine. No
errors but I can't compile it. 
-- 
View this message in context: 
http://www.nabble.com/Can%27t-compile-tf4281613s177.html#a12188034
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Can't compile

2007-08-16 Thread Wayne Fay
Apparently, you have not declared a dependency (probably want
provided scope) against an artifact that contains javax.persistence
classes.

Again, Google is your friend (mvn hibernate jpa):
http://rupeal.wordpress.com/2007/02/14/maven-2-and-hibernate-annotations/

Wayne

On 8/16/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

 getting exactly the same error.. I going mad here. Can't even
 compile.

 /Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/User.java:[11,25]
 package javax.persistence does not exist

 /Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/User.java:[12,25]
 package javax.persistence does not exist

 /Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/User.java:[13,25]
 package javax.persistence does not exist

 /Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[3,25]
 package javax.persistence does not exist

 /Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[4,25]
 package javax.persistence does not exist

 /Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[5,25]
 package javax.persistence does not exist

 /Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[6,25]
 package javax.persistence does not exist

 /Users/mathias/Documents/workspace/FTC/src/main/java/se/digitalsupport/ftc/dto/UserMapping.java:[7,25]
 package javax.persistence does not exist



 AND 1000 more lines. How come. In the eclipse everything looks fine. No
 errors but I can't compile it.
 --
 View this message in context: 
 http://www.nabble.com/Can%27t-compile-tf4281613s177.html#a12188034
 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]



Re: Can't compile

2007-08-16 Thread Mathias P.W Nilsson

Thanks! You a lifesaver. By supplying provided instead of runtime it
worked. 

Thanks again! :clap:
-- 
View this message in context: 
http://www.nabble.com/Can%27t-compile-tf4281613s177.html#a12188842
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Can't compile

2007-08-16 Thread Tom Huybrechts
On 8/16/07, Wayne Fay [EMAIL PROTECTED] wrote:
 Try mvn compile.

 The name of the plugin is compiler. The method you're executing is
 named compile. So the long way would be mvn compiler:compile.
 Note the r in the first one. But mvn compile is a short-cut.

It's not really a shortcut (they are not identical)

'mvn compiler:compile executes one goal in the compiler plugin. 'mvn
compile' executes all the phases in your lifecycle up to compile. So
that would include generating sources, resources etc. The
compiler:compile goal is included in the compile phase.

Unless you know what you're doing, better use 'mvn compile...

Tom


 Wayne

 On 8/16/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:
 
  Ok this is very strange. I can't use mvn compile. I've tried it all. Delete
  all files in respository and try again.
 
  I then tried the mvn -e compile:compile and got the following error
 
  The plugin 'org.apache.maven.plugins:maven-compile-plugin' does not exist or
  no valid version could be found
 
  When I look in my respository the folder only contains a xml. I tried to
  download the maven-compile-plugin but i doesn't exist. It's only the
  maven-compiler-plugin notice the COMPILER and not COMPILE
 
  why is compile used? Why is it trying to download compile when I have sat
  compiler. Look at this POM file
 
  I'm near crying here.
 
  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;
   modelVersion4.0.0/modelVersion
   groupIdse.digitalsupport.ftc/groupId
   artifactIdFTC/artifactId
   packagingjar/packaging
   version1.0-SNAPSHOT/version
   nameFTC/name
   urlhttp://maven.apache.org/url
   dependencies
 
 dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
   version3.8.1/version
   scoperuntime/scope
 /dependency
 dependency
   groupIdorg.hibernate/groupId
   artifactIdhibernate/artifactId
   version3.2.5.ga/version
   scoperuntime/scope
 /dependency
 dependency
   groupIdorg.hibernate/groupId
   artifactIdhibernate-annotations/artifactId
   version3.3.0.ga/version
   scoperuntime/scope
 /dependency
 dependency
   groupIdorg.hibernate/groupId
   artifactIdhibernate-entitymanager/artifactId
   version3.3.1.ga/version
   scoperuntime/scope
 /dependency
   dependency
   groupIdjboss/groupId
   artifactIdjboss-common-core/artifactId
   version2.2.0.GA/version
   scoperuntime/scope
 /dependency
 dependency
   groupIdorg.hibernate/groupId
   artifactIdhibernate-commons-annotations/artifactId
   version3.3.0.ga/version
   scoperuntime/scope
 /dependency
dependency
   groupIdmysql/groupId
   artifactIdmysql-connector-java/artifactId
   version5.0.5/version
   scoperuntime/scope
 /dependency
 
 dependency
   groupIdc3p0/groupId
   artifactIdc3p0/artifactId
   version0.9.0/version
   scoperuntime/scope
 /dependency
   /dependencies
   build
   pluginManagement
 plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 configuration
 source1.5/source
 target1.5/target
 /configuration
 /plugin
 plugin
 
 groupIdorg.codehaus.mojo/groupId
 artifactIdhibernate3-maven-plugin/artifactId
 version2.0-alpha-2/version
 configuration
 executions
 execution
 
  phasegenerate-sources/phase
 goals
 
  goalhbm2ddl/goal
 /goals
 /execution
 /executions
 components
 
 component
 namehbm2ddl/name
 
  implementationannotationconfiguration/implementation
 
 /component
 component
 namehbm2hbmxml/name
 
  outputDirectorysrc/main/resources/outputDirectory
 
 /component
 /components
 componentProperties
 droptrue/drop
 

Re: Can't compile project

2007-03-02 Thread Thierry Lach

Noticed this again while going through some of the old emails I had marked
for followup.

There is a maven 2 repository also

https://maven2-repository.dev.java.net/

On 2/18/07, Mark Derricutt [EMAIL PROTECTED] wrote:


On 2/19/07, Wendy Smoak [EMAIL PROTECTED] wrote:

  2) javax.transaction:jta:jar:1.0.1B

 That must be one of the Sun jars that can't go into the central repo
 due to licensing.  Only the pom is there:
 http://repo1.maven.org/maven2/javax/transaction/jta/1.0.1B/


Regarding this - I see that Suns maven repository [1] includes this as
javax.transaction:transaction-api.

Given that Sun is now open sourcing things, and making these libraries
freely available via their own repository, is it not possible to sync
their
repository with the master?

Mark

[1] https://maven-repository.dev.java.net/ - its a maven 1 repository thou
:(



Can't compile project

2007-02-18 Thread lightbulb432

When I do a mvn -e compiler:compile in the root of my project with a pom.xml
in it, I get the following output. It doesn't work, and I'm not sure why.
Any ideas how I can get it to work? 

It's saying that it can't find the file from the remote repository, but
those files were all automatically downloaded into my local repository from
earlier, using those same remote repositories...so I'm not sure whether
that's the problem...

Thanks.


C:\Documents and Settings\Admin\My Documents\Workspace\myprojectmvn -e
compiler
:compile
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'compiler'.
[INFO]
-
---
[INFO] Building Unnamed - com.myproject:myproject:jar:0.0.1
[INFO]task-segment: [compiler:compile]
[INFO]
-
---
Downloading:
http://maven.softeu.cz//org/apache/myfaces/tomahawk/tomahawk/1.1.3/
tomahawk-1.1.3.pom
[WARNING] Unable to get resource from repository softeu-repo
(http://maven.softe
u.cz/)
Downloading:
http://repo1.maven.org/maven2/org/apache/myfaces/tomahawk/tomahawk/
1.1.3/tomahawk-1.1.3.pom
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org
/maven2)
Downloading:
http://maven.softeu.cz//org/apache/myfaces/tomahawk/tomahawk/1.1.3/
tomahawk-1.1.3.jar
[WARNING] Unable to get resource from repository softeu-repo
(http://maven.softe
u.cz/)
Downloading:
http://repo1.maven.org/maven2/org/apache/myfaces/tomahawk/tomahawk/
1.1.3/tomahawk-1.1.3.jar
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org
/maven2)
Downloading:
http://maven.softeu.cz//javax/transaction/jta/1.0.1B/jta-1.0.1B.jar

[WARNING] Unable to get resource from repository softeu-repo
(http://maven.softe
u.cz/)
Downloading:
http://repo1.maven.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.
1B.jar
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org
/maven2)
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

Missing:
--
1) org.apache.myfaces.tomahawk:tomahawk:jar:1.1.3

  Try downloading the file manually from the project website.

  Then, install it using the command:
  mvn install:install-file -DgroupId=org.apache.myfaces.tomahawk
-DartifactI
d=tomahawk \
  -Dversion=1.1.3 -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
1) com.myproject:myproject:jar:0.0.1
2) jboss.seam.profiles:seam-facelets:jar:1.1.6.GA
3) org.apache.myfaces.tomahawk:tomahawk:jar:1.1.3

2) javax.transaction:jta:jar:1.0.1B

  Try downloading the file manually from:
  http://java.sun.com/products/jta

  Then, install it using the command:
  mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta
\
  -Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
1) com.myproject:myproject:jar:0.0.1
2) jboss.seam.profiles:seam-facelets:jar:1.1.6.GA
3) jboss.seam:jboss-seam-ui:jar:1.1.6.GA
4) jboss.seam:jboss-seam:jar:1.1.6.GA
5) org.hibernate:hibernate-annotations:jar:3.2.1.ga
6) org.hibernate:hibernate:jar:3.2.1.ga
7) javax.transaction:jta:jar:1.0.1B

--
2 required artifacts are missing.

for artifact:
  com.myproject:myproject:jar:0.0.1

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  softeu-repo (http://maven.softeu.cz/)


[INFO]

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Missing:
--
1) org.apache.myfaces.tomahawk:tomahawk:jar:1.1.3

  Try downloading the file manually from the project website.

  Then, install it using the command:
  mvn install:install-file -DgroupId=org.apache.myfaces.tomahawk
-DartifactI
d=tomahawk \
  -Dversion=1.1.3 -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
1) com.myproject:myproject:jar:0.0.1
2) jboss.seam.profiles:seam-facelets:jar:1.1.6.GA
3) org.apache.myfaces.tomahawk:tomahawk:jar:1.1.3

2) javax.transaction:jta:jar:1.0.1B

  Try downloading the file manually from:
  http://java.sun.com/products/jta

  Then, install it using the command:
  mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta
\
  -Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
1) com.myproject:myproject:jar:0.0.1
2) jboss.seam.profiles:seam-facelets:jar:1.1.6.GA
3) jboss.seam:jboss-seam-ui:jar:1.1.6.GA
4) jboss.seam:jboss-seam:jar:1.1.6.GA
5) org.hibernate:hibernate-annotations:jar:3.2.1.ga
6) org.hibernate:hibernate:jar:3.2.1.ga
7) 

Re: Can't compile project

2007-02-18 Thread Wendy Smoak

On 2/18/07, lightbulb432 [EMAIL PROTECTED] wrote:


When I do a mvn -e compiler:compile in the root of my project with a pom.xml
in it, I get the following output. It doesn't work, and I'm not sure why.
Any ideas how I can get it to work?


Try mvn package or mvn install instead of the plugin:goal syntax
you are using.


It's saying that it can't find the file from the remote repository, but
those files were all automatically downloaded into my local repository from
earlier, using those same remote repositories...so I'm not sure whether
that's the problem...


What makes you sure the files were downloaded earlier?  Has this build
completed successfully in the past?


[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

Missing:
--
1) org.apache.myfaces.tomahawk:tomahawk:jar:1.1.3

...

  Path to dependency:
1) com.myproject:myproject:jar:0.0.1
2) jboss.seam.profiles:seam-facelets:jar:1.1.6.GA
3) org.apache.myfaces.tomahawk:tomahawk:jar:1.1.3


Tomahawk 1.1.3 is not in the central Maven repo.  See:
http://wiki.apache.org/myfaces/Using_MyFaces_in_a_Project_built_with_Maven


2) javax.transaction:jta:jar:1.0.1B


That must be one of the Sun jars that can't go into the central repo
due to licensing.  Only the pom is there:
http://repo1.maven.org/maven2/javax/transaction/jta/1.0.1B/

--
Wendy

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



Re: Can't compile project

2007-02-18 Thread Mark Derricutt

On 2/19/07, Wendy Smoak [EMAIL PROTECTED] wrote:


 2) javax.transaction:jta:jar:1.0.1B

That must be one of the Sun jars that can't go into the central repo
due to licensing.  Only the pom is there:
http://repo1.maven.org/maven2/javax/transaction/jta/1.0.1B/



Regarding this - I see that Suns maven repository [1] includes this as
javax.transaction:transaction-api.

Given that Sun is now open sourcing things, and making these libraries
freely available via their own repository, is it not possible to sync their
repository with the master?

Mark

[1] https://maven-repository.dev.java.net/ - its a maven 1 repository thou
:(