On 06/07/2013 12:52 PM, Francesco Chicchiriccò wrote:
On 07/06/2013 12:49, Nik wrote:
Thanks Andrea,

Updating both the parent and core poms as you advise (and also doing the same for the console pom, just in case!).
gives the following:

[nik@anvil syncope-archetype]$ rm -rf ~/.m2
[nik@anvil syncope-archetype]$ mvn clean package -Dbundles.directory=/opt/syncope/bundles -Dlog.directory=/opt/syncope/log
/usr/lib/jvm/java
[INFO] Scanning for projects...

:
:
[INFO] Configured Artifact: org.connid.bundles:org.connid.bundles.db.table:2.1.5:jar Downloading: https://repository.apache.org/content/repositories/snapshots/org/connid/bundles/org.connid.bundles.db.table/2.1.5/org.connid.bundles.db.table-2.1.5.jar Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/connid/bundles/org.connid.bundles.db.table/2.1.5/org.connid.bundles.db.table-2.1.5.jar Downloading: http://repo.maven.apache.org/maven2/org/connid/bundles/org.connid.bundles.db.table/2.1.5/org.connid.bundles.db.table-2.1.5.jar [INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Syncope sample project ..................... SUCCESS [34.787s] [INFO] Apache Syncope sample project core ................ FAILURE [6:12.988s]
[INFO] Apache Syncope sample project console ............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6:56.866s
[INFO] Finished at: Fri Jun 07 12:42:01 CEST 2013
[INFO] Final Memory: 30M/104M
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.7:copy (set-bundles) on project core: Unable to find artifact. Could not find artifact org.connid.bundles:org.connid.bundles.db.table:jar:2.1.5 in ASF (https://repository.apache.org/content/repositories/snapshots/)
[...]
POINTS TO NOTE:

http://repo.maven.apache.org/maven2/org/connid/bundles/org.connid.bundles.db.table/2.1.5/org.connid.bundles.db.table-2.1.5.jar
DOES NOT EXIST

http://repo.maven.apache.org/maven2/org/connid/bundles/db/org.connid.bundles.db.table/2.1.5/org.connid.bundles.db.table-2.1.5.jar
DOES EXIT

CONCLUSION

Need to add ../db/.. or softlink db with org.connid.bundles.db.tablepath??? A bug perhaps?

No, you simply need to check where you put the wrong groupId :-)

It has to be

<groupId>org.connid.bundles.db</groupId>
<artifactId>org.connid.bundles.db.table</artifactId>

everywhere: check again and you will find the mistake.


Ok...I know there is a mistake but I don't know where ... I have been searching Francesco ;-) so...

If your above statement is correct:

1) [nik@anvil syncope-archetype]$ grep groupId . -R | grep connid | grep db | grep pom.xml
./core/pom.xml: <groupId>org.connid.bundles.db</groupId>
./pom.xml: <groupId>org.connid.bundles.db</groupId>
./console/pom.xml: <groupId>org.connid.bundles.db</groupId>
[nik@anvil syncope-archetype]$
[nik@anvil syncope-archetype]$ grep artifactId . -R | grep connid | grep db | grep pom.xml
./core/pom.xml:<artifactId>org.connid.bundles.db.table</artifactId>
./pom.xml: <artifactId>org.connid.bundles.db.table</artifactId>
./console/pom.xml:<artifactId>org.connid.bundles.db.table</artifactId>
[nik@anvil syncope-archetype]$

then(it is as you say everywhere)

2) mvn clean package -Dbundles.directory=/opt/syncope/bundles -Dlog.directory=/opt/syncope/log

should work? but:

[nik@anvil syncope-archetype]$ mvn clean package -Dbundles.directory=/opt/syncope/bundles -Dlog.directory=/opt/syncope/log
/usr/lib/jvm/java
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Apache Syncope sample project
[INFO] Apache Syncope sample project core
[INFO] Apache Syncope sample project console
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Syncope sample project 1.1.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ syncope-archetype --- [INFO] Deleting /home/nik/UShareSoft/WKS/syncopeOnGlassfish/syncope-archetype/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-java) @ syncope-archetype ---
[INFO]
[INFO] --- gmaven-plugin:1.5:execute (default) @ syncope-archetype ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-javadoc-legal-files) @ syncope-archetype ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ syncope-archetype ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Syncope sample project core 1.1.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ core ---
[INFO] Deleting /home/nik/UShareSoft/WKS/syncopeOnGlassfish/syncope-archetype/core/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-java) @ core ---
[INFO]
[INFO] --- gmaven-plugin:1.5:execute (default) @ core ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 18 resources
[INFO]
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-javadoc-legal-files) @ core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ core ---
[INFO] No sources to compile
[INFO]
[INFO] --- openjpa-maven-plugin:2.2.2:enhance (enhancer) @ core ---
377 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.Task". 768 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.role.RAttrUniqueValue". 782 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.AbstractAttr" 793 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.role.RSchema" 795 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.AccountPolicy" 811 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.PasswordPolicy" 836 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.role.RDerSchema" 839 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.SyncPolicy" 850 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.role.RVirSchema" 858 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.user.USchema" 860 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.user.UDerSchema" 868 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.user.UVirSchema" 870 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.membership.MSchema" 872 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.membership.MDerSchema" 874 syncopePersistenceUnit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.syncope.core.persistence.beans.membership.MVirSchema" 879 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.membership.MAttrUniqueValue". 888 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.membership.MAttr". 899 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.role.SyncopeRole". 929 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.user.UAttrUniqueValue". 937 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.role.RAttr". 950 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.role.RMapping". 959 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.Report". 972 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.Policy". 981 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.ConnInstance". 999 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.ReportletConfInstance". 1006 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.TaskExec". 1010 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.user.UMappingItem". 1015 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.membership.MAttrValue". 1020 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.role.RMappingItem". 1025 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.user.SyncopeUser". 1051 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.membership.Membership". 1064 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.user.UAttr". 1073 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.role.RAttrValue". 1078 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.ReportExec". 1083 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.user.UMapping". 1090 syncopePersistenceUnit INFO [main] openjpa.Tool - Enhancer running on type "org.apache.syncope.core.persistence.beans.user.UAttrValue".
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-dependency-plugin:2.7:copy (set-bundles) @ core ---
[INFO] Configured Artifact: org.connid.bundles:org.connid.bundles.db.table:2.1.5:jar [INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Syncope sample project ..................... SUCCESS [2.019s]
[INFO] Apache Syncope sample project core ................ FAILURE [2.610s]
[INFO] Apache Syncope sample project console ............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.964s
[INFO] Finished at: Fri Jun 07 14:35:50 CEST 2013
[INFO] Final Memory: 31M/343M
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.7:copy (set-bundles) on project core: Unable to find artifact. Failure to find org.connid.bundles:org.connid.bundles.db.table:jar:2.1.5 in https://repository.apache.org/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of ASF has elapsed or updates are forced
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.connid.bundles -DartifactId=org.connid.bundles.db.table -Dversion=2.1.5 -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there: [ERROR] mvn deploy:deploy-file -DgroupId=org.connid.bundles -DartifactId=org.connid.bundles.db.table -Dversion=2.1.5 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] org.connid.bundles:org.connid.bundles.db.table:jar:2.1.5
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] ASF (https://repository.apache.org/content/repositories/snapshots/, releases=true, snapshots=true), [ERROR] activiti (https://artifacts.alfresco.com/nexus/content/groups/public/, releases=true, snapshots=true), [ERROR] sonatype (https://oss.sonatype.org/content/repositories/snapshots, releases=false, snapshots=true), [ERROR] apache.snapshots (http://repository.apache.org/snapshots, releases=false, snapshots=true), [ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :core
[nik@anvil syncope-archetype]$

But if I remove the xml wiki advicefor :

_QUOTE_
and adding the following rows to maven-dependency-plugin

<configuration>
            <artifactItems>
              <artifactItem>
                <groupId>org.connid.bundles</groupId>
                <artifactId>${connid.bundle.name}</artifactId>
                <version>${connid.bundle.version}</version>
                <outputDirectory>${bundles.directory}</outputDirectory>
              </artifactItem>
            </artifactItems>
</configuration>
_UNQUOTE_

and life with maven becomes less complicated:-)

:
[INFO] Building war: /home/nik/UShareSoft/WKS/syncopeOnGlassfish/syncope-archetype/console/target/syncope-console.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ console --- [INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Syncope sample project ..................... SUCCESS [1.944s]
[INFO] Apache Syncope sample project core ................ SUCCESS [17.333s]
[INFO] Apache Syncope sample project console ............. SUCCESS [48.293s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:07.913s
[INFO] Finished at: Fri Jun 07 14:50:00 CEST 2013
[INFO] Final Memory: 30M/467M
[INFO] ------------------------------------------------------------------------
[nik@anvil syncope-archetype]$

rgds,
Nik


Reply via email to